组件添加add方法

This commit is contained in:
Harvey committed 2019-11-22 16:34:31 +08:00
1 parent 1d859e2049
commit 2fcd44e8e7
28 files changed
+303 -328

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
import Component from './utils/component';
export default class Layer extends Component {
constructor(art) {
super(art);
this.$parent = art.template.$layers;
art.on('ready', () => {
art.option.layers.forEach(item => {
this.add(item);
});
});
}
}