bugfix on message
This commit is contained in:
parent
55b608a6b8
commit
17628aab7b
2 changed files with 7 additions and 2 deletions
|
@ -29,7 +29,10 @@ Notification.newInstance = properties => {
|
||||||
},
|
},
|
||||||
component: notification,
|
component: notification,
|
||||||
destroy () {
|
destroy () {
|
||||||
|
notification.closeAll();
|
||||||
|
setTimeout(function() {
|
||||||
document.body.removeChild(document.getElementsByClassName('ivu-message')[0].parentElement);
|
document.body.removeChild(document.getElementsByClassName('ivu-message')[0].parentElement);
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -81,13 +81,15 @@
|
||||||
},
|
},
|
||||||
close (name) {
|
close (name) {
|
||||||
const notices = this.notices;
|
const notices = this.notices;
|
||||||
|
|
||||||
for (let i = 0; i < notices.length; i++) {
|
for (let i = 0; i < notices.length; i++) {
|
||||||
if (notices[i].name === name) {
|
if (notices[i].name === name) {
|
||||||
this.notices.splice(i, 1);
|
this.notices.splice(i, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
closeAll () {
|
||||||
|
this.notices = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue