添加更多错误机制

This commit is contained in:
Harvey Zack committed 2018-10-29 09:08:35 +08:00
1 parent eb879d3e2d
commit f6c236c260
8 files changed
+32 -19

No files matched your search

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