forked from github/dataease
fix: 修复复用存量视图未清理历史选择框的问题
This commit is contained in:
parent
929d1f64e2
commit
e176d364c6
@ -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 设置当前组件数据及状态
|
||||
|
@ -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)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user