fix(仪表板-过滤器按钮): 清空按钮可以拖入多个

This commit is contained in:
fit2cloud-chenyw
2022-08-25 14:59:25 +08:00
parent 95dbfd14a2
commit 2a97a51164
4 changed files with 19 additions and 33 deletions

View File

@@ -135,6 +135,16 @@ export default {
},
deleteComponent() {
if (this.curComponent.type === 'custom-button' && this.curComponent.serviceName === 'buttonSureWidget') {
let len = this.componentData.length
while (len--) {
const item = this.componentData[len]
if (item.type === 'custom-button' && item.serviceName === 'buttonResetWidget') {
this.componentData.splice(len, 1)
}
}
}
this.$emit('amRemoveItem')
this.deleteCurCondition()
this.$store.commit('deleteComponent')

View File

@@ -368,7 +368,7 @@ export default {
},
'cfilters': {
handler: function(val1, val2) {
if (isChange(val1, val2) && !this.isFirstLoad) {
if ((isChange(val1, val2) || isChange(val1, this.filters)) && !this.isFirstLoad) {
this.getData(this.element.propValue.viewId)
}
},