添加设置样式小工具

This commit is contained in:
Harvey Zack committed 2018-10-30 16:53:13 +08:00
1 parent 6e4087a080
commit 96a6e1eb0e
14 files changed
+113 -109

No files matched your search

+2 -2
View File
@@ -1,4 +1,4 @@
import { append, setStyle } from './utils';
import { append, setStyles } from './utils';
let id = 0;
export default class Layers {
@@ -27,7 +27,7 @@ export default class Layers {
$layer.setAttribute('class', `art-layer art-layer-${option.name || id}`);
$layer.style.zIndex = option.index || id;
append($layer, option.html);
setStyle($layer, option.style || {});
setStyles($layer, option.style || {});
refs.$layers.appendChild($layer);
this.art.emit('layers:add', $layer);
callback && callback($layer);