fix(过滤组件): 全屏导致选择的过滤器值消失 close #8076
This commit is contained in:
parent
d3f30edf5d
commit
371cc8c110
@ -371,7 +371,8 @@ export default {
|
||||
if (this.refreshHandler()) {
|
||||
return
|
||||
}
|
||||
if (this.element.options.value) {
|
||||
const existLastValidFilters = this.$store.state.lastValidFilters && this.$store.state.lastValidFilters[this.element.id]?.length
|
||||
if (this.element.options.value || existLastValidFilters) {
|
||||
this.values = this.fillValueDerfault()
|
||||
this.dateChange(this.values)
|
||||
}
|
||||
|
||||
@ -86,7 +86,8 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.element.options.value) {
|
||||
const existLastValidFilters = this.$store.state.lastValidFilters && this.$store.state.lastValidFilters[this.element.id]?.length
|
||||
if (this.element.options.value || existLastValidFilters) {
|
||||
this.value = this.fillValueDerfault()
|
||||
this.search()
|
||||
}
|
||||
|
||||
@ -144,7 +144,8 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.element.options.value && this.element.options.value.length > 0) {
|
||||
const existLastValidFilters = this.$store.state.lastValidFilters && this.$store.state.lastValidFilters[this.element.id]?.length
|
||||
if ((this.element.options.value && this.element.options.value.length > 0) || existLastValidFilters) {
|
||||
const values = this.fillValueDerfault()
|
||||
this.form.min = values[0]
|
||||
if (values.length > 1) {
|
||||
|
||||
@ -370,7 +370,7 @@ export default {
|
||||
this.firstChange(this.value)
|
||||
return
|
||||
}
|
||||
if (this.value.toString() !== eleVal && this.defaultValueStr === eleVal) {
|
||||
if (this.value?.toString() !== eleVal && this.defaultValueStr === eleVal) {
|
||||
this.value = this.fillValueDerfault()
|
||||
this.changeValue(this.value)
|
||||
}
|
||||
@ -387,7 +387,8 @@ export default {
|
||||
},
|
||||
initLoad() {
|
||||
this.initOptions(this.fillFirstSelected)
|
||||
if (this.element.options.value && !this.selectFirst) {
|
||||
const existLastValidFilters = this.$store.state.lastValidFilters && this.$store.state.lastValidFilters[this.element.id]?.length
|
||||
if ((this.element.options.value || existLastValidFilters) && !this.selectFirst) {
|
||||
this.value = this.fillValueDerfault()
|
||||
this.changeValue(this.value)
|
||||
}
|
||||
|
||||
@ -342,7 +342,8 @@ export default {
|
||||
initLoad() {
|
||||
this.value = this.element.options.attrs.multiple ? [] : null
|
||||
this.initOptions()
|
||||
if (this.element.options.value) {
|
||||
const existLastValidFilters = this.$store.state.lastValidFilters && this.$store.state.lastValidFilters[this.element.id]?.length
|
||||
if (this.element.options.value || existLastValidFilters) {
|
||||
this.value = this.fillValueDerfault()
|
||||
this.changeValue(this.value)
|
||||
}
|
||||
|
||||
@ -275,7 +275,8 @@ export default {
|
||||
this.value = this.fillValueDerfault()
|
||||
this.data = []
|
||||
this.initOptions()
|
||||
if (this.element.options.value) {
|
||||
const existLastValidFilters = this.$store.state.lastValidFilters && this.$store.state.lastValidFilters[this.element.id]?.length
|
||||
if (this.element.options.value || existLastValidFilters) {
|
||||
this.value = this.fillValueDerfault()
|
||||
this.changeValue(this.value)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user