删除多余事件

This commit is contained in:
Harvey committed 2019-11-28 10:10:29 +08:00
1 parent e0faa3fe68
commit 7ff61b4660
38 files changed
+266 -516

No files matched your search

+4 -1
View File
@@ -136,7 +136,10 @@ export default class Control extends Component {
add(getOption, callback) {
const option = typeof getOption === 'function' ? getOption(this.art) : getOption;
errorHandle(option.position, 'Controls option.position can not be empty');
errorHandle(
['top', 'left', 'right'].includes(option.position),
`Control option.position must one of 'top', 'left', 'right'`,
);
const { $progress, $controlsLeft, $controlsRight } = this.art.template;
switch (option.position) {