dev_ec^2
hjm 5 years ago
parent bf97b69a8b
commit b09f0f1d9d

@ -320,6 +320,9 @@ class studentsList extends Component{
isAdmin && on('updateNavSuccess', this.updateNavSuccess)
}
componentWillUnmount() {
if (this.clipboard) {
this.clipboard.destroy()
}
const isAdmin = this.props.isAdmin()
if (isAdmin) {
off('addStudentSuccess', this.addStudentSuccessListener)
@ -420,12 +423,14 @@ class studentsList extends Component{
invite_code: result.data.invite_code,
isSpin:false
}, () => {
if (!this.clipboard) {
const clipboard = new ClipboardJS('.copybtn');
clipboard.on('success', (e) => {
this.props.showNotification('复制成功')
});
this.clipboard = clipboard
if (course_group_id) {
if (!this.clipboard) {
const clipboard = new ClipboardJS('.copybtn');
clipboard.on('success', (e) => {
this.props.showNotification('复制成功')
});
this.clipboard = clipboard
}
}
})
}

Loading…
Cancel
Save