add loading

This commit is contained in:
Harvey Zack committed 2018-10-15 17:36:10 +08:00
1 parent e319afd422
commit 7cdf9f69e6
14 files changed
+329 -6

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
export default class Notice {
constructor(art) {
this.art = art;
}
show(msg) {
const { refs: { $notice } } = this.art;
$notice.style.display = 'block';
$notice.innerHTML = msg instanceof Error ? msg.message.trim() : msg;
}
hide() {
const { refs: { $notice } } = this.art;
$notice.style.display = 'none';
}
}