Merge pull request #7393 from dataease/pr@dev@fix_filter_required_reset

fix: 文本下拉设置必填后反复编辑逻辑错误
This commit is contained in:
fit2cloud-chenyw 2023-12-27 12:21:38 +08:00 committed by GitHub
commit 395ada8033
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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()
},