调整传参方式

This commit is contained in:
Harvey Zack committed 2018-11-03 09:20:25 +08:00
1 parent d0fdab870d
commit e4668df2db
20 files changed
+127 -163

No files matched your search

+1 -2
View File
@@ -129,10 +129,9 @@ export default class Controls {
const $control = document.createElement('div');
$control.setAttribute('class', `art-control art-control-${name}`);
$control.dataset.controlIndex = option.index || id;
option.$control = $control;
this.commonMethod(control);
(this.$map[option.position] || (this.$map[option.position] = [])).push($control);
control.apply && control.apply(this.art);
control.apply && control.apply(this.art, $control);
this[name] = control;
}
}