fix: 文本下拉设置必填后反复编辑逻辑错误

This commit is contained in:
fit2cloud-chenyw 2023-12-27 12:20:39 +08:00
parent 8d07e7039b
commit 41b9ec2537
3 changed files with 7 additions and 0 deletions

View File

@ -509,6 +509,7 @@ export default {
this.$store.commit('setComponentWithId', this.currentFilterCom)
this.$store.commit('recordSnapshot', 'sureFilter')
this.$store.commit('setCurComponent', { component: this.currentFilterCom, index: this.curComponentIndex })
this.$store.commit('delLastValidFilterWithId', this.currentFilterCom.id)
bus.$emit('reset-default-value', this.currentFilterCom)
this.closeFilter()
},

View File

@ -928,6 +928,11 @@ const data = {
},
resetLastValidFilters(state) {
state.lastValidFilters = {}
},
delLastValidFilterWithId(state, id) {
if (state.lastValidFilters[id]) {
delete state.lastValidFilters[id]
}
}
},
modules: {

View File

@ -1269,6 +1269,7 @@ export default {
this.$store.commit('recordSnapshot', 'sureFilter')
this.$store.commit('setCurComponent', { component: this.currentFilterCom, index: this.curComponentIndex })
this.$store.commit('setComponentFromList', this.currentFilterCom)
this.$store.commit('delLastValidFilterWithId', this.currentFilterCom.id)
bus.$emit('reset-default-value', this.currentFilterCom)
this.closeFilter()
},