添加样式小工具

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 Mask {
constructor(art) {
@@ -24,13 +24,13 @@ export default class Mask {
show() {
const { $mask } = this.art.refs;
$mask.style.display = 'block';
setStyle($mask, 'display', 'block');
this.art.emit('mask:show', $mask);
}
hide() {
const { $mask } = this.art.refs;
$mask.style.display = 'none';
setStyle($mask, 'display', 'none');
this.art.emit('mask:show', $mask);
}
}