This commit is contained in:
Harvey Zack committed 2018-10-21 14:20:35 +08:00
1 parent 1b3b2de8d4
commit 0c6a297ee7
12 files changed
+374 -308

No files matched your search

+2 -2
View File
@@ -4,7 +4,7 @@ export default class Notice {
this.timer = null;
}
show(msg, autoHide) {
show(msg, autoHide = true, time = 1000) {
const { $notice } = this.art.refs;
$notice.style.display = 'block';
$notice.innerHTML = msg instanceof Error ? msg.message.trim() : msg;
@@ -12,7 +12,7 @@ export default class Notice {
clearTimeout(this.timer);
this.timer = setTimeout(() => {
this.hide();
}, 1000);
}, time);
}
this.art.emit('notice:show', $notice);
}