添加样式小工具

This commit is contained in:
Harvey Zack committed 2018-10-30 17:04:32 +08:00
1 parent 96a6e1eb0e
commit 47438ed73f
10 files changed
+56 -54

No files matched your search

+3 -3
View File
@@ -1,5 +1,5 @@
import icons from './icons';
import { append } from './utils';
import { append, setStyle } from './utils';
export default class Loading {
constructor(art) {
@@ -14,13 +14,13 @@ export default class Loading {
hide() {
const { $loading } = this.art.refs;
$loading.style.display = 'none';
setStyle($loading, 'display', 'none');
this.art.emit('loading:hide', $loading);
}
show() {
const { $loading } = this.art.refs;
$loading.style.display = 'flex';
setStyle($loading, 'display', 'flex');
this.art.emit('loading:show', $loading);
}
}