Merge pull request #8285 from dataease/pr@dev@fix_fullscreen_clean_filter

fix(过滤器): 全屏会清空过滤器中内容 close #8076
This commit is contained in:
fit2cloud-chenyw 2024-03-04 10:30:18 +08:00 committed by GitHub
commit e9c19b0e39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 6 additions and 6 deletions

View File

@ -371,7 +371,7 @@ export default {
if (this.refreshHandler()) {
return
}
const existLastValidFilters = this.$store.state.lastValidFilters && this.$store.state.lastValidFilters[this.element.id]?.length
const existLastValidFilters = this.$store.state.lastValidFilters && this.$store.state.lastValidFilters[this.element.id]
if (this.element.options.value || existLastValidFilters) {
this.values = this.fillValueDerfault()
this.dateChange(this.values)

View File

@ -86,7 +86,7 @@ export default {
}
},
created() {
const existLastValidFilters = this.$store.state.lastValidFilters && this.$store.state.lastValidFilters[this.element.id]?.length
const existLastValidFilters = this.$store.state.lastValidFilters && this.$store.state.lastValidFilters[this.element.id]
if (this.element.options.value || existLastValidFilters) {
this.value = this.fillValueDerfault()
this.search()

View File

@ -144,7 +144,7 @@ export default {
}
},
created() {
const existLastValidFilters = this.$store.state.lastValidFilters && this.$store.state.lastValidFilters[this.element.id]?.length
const existLastValidFilters = this.$store.state.lastValidFilters && this.$store.state.lastValidFilters[this.element.id]
if ((this.element.options.value && this.element.options.value.length > 0) || existLastValidFilters) {
const values = this.fillValueDerfault()
this.form.min = values[0]

View File

@ -387,7 +387,7 @@ export default {
},
initLoad() {
this.initOptions(this.fillFirstSelected)
const existLastValidFilters = this.$store.state.lastValidFilters && this.$store.state.lastValidFilters[this.element.id]?.length
const existLastValidFilters = this.$store.state.lastValidFilters && this.$store.state.lastValidFilters[this.element.id]
if ((this.element.options.value || existLastValidFilters) && !this.selectFirst) {
this.value = this.fillValueDerfault()
this.changeValue(this.value)

View File

@ -342,7 +342,7 @@ export default {
initLoad() {
this.value = this.element.options.attrs.multiple ? [] : null
this.initOptions()
const existLastValidFilters = this.$store.state.lastValidFilters && this.$store.state.lastValidFilters[this.element.id]?.length
const existLastValidFilters = this.$store.state.lastValidFilters && this.$store.state.lastValidFilters[this.element.id]
if (this.element.options.value || existLastValidFilters) {
this.value = this.fillValueDerfault()
this.changeValue(this.value)

View File

@ -275,7 +275,7 @@ export default {
this.value = this.fillValueDerfault()
this.data = []
this.initOptions()
const existLastValidFilters = this.$store.state.lastValidFilters && this.$store.state.lastValidFilters[this.element.id]?.length
const existLastValidFilters = this.$store.state.lastValidFilters && this.$store.state.lastValidFilters[this.element.id]
if (this.element.options.value || existLastValidFilters) {
this.value = this.fillValueDerfault()
this.changeValue(this.value)