fix: 修复复用存量视图未清理历史选择框的问题

This commit is contained in:
wangjiahao 2022-05-25 14:51:15 +08:00
parent 929d1f64e2
commit e176d364c6
2 changed files with 11 additions and 5 deletions

View File

@ -208,9 +208,11 @@ export default {
handleClick() {
const events = this.config.events
Object.keys(events).forEach(event => {
this[event](events[event])
})
if (events) {
Object.keys(events).forEach(event => {
this[event](events[event])
})
}
},
elementMouseDown(e) {
// private

View File

@ -75,18 +75,22 @@ export default {
})
})
} else if (params.showType === 'view') {
_this.componentData = []
const componentId = uuid.v1()
_this.canvasStyleData = deepCopy(DEFAULT_COMMON_CANVAS_STYLE_STRING)
const userView = {
... deepCopy(USER_VIEW),
'id': componentId }
'id': componentId,
'auxiliaryMatrix': false }
userView.style.width = _this.canvasStyleData.width
userView.style.height = _this.canvasStyleData.height
userView['propValue'] = {
'viewId': params.showId,
'id': componentId
}
_this.componentData.push(userView)
_this.$nextTick(() => {
_this.componentData.push(userView)
})
}
}
}