Merge pull request #7328 from dataease/pr@dev@fix_filter_first_item

fix: 下拉过滤器首项会影响其他仪表板
This commit is contained in:
fit2cloud-chenyw
2023-12-25 16:21:41 +08:00
committed by GitHub

View File

@@ -98,7 +98,8 @@ export default {
separator: ',',
timeMachine: null,
changeIndex: 0,
flag: uuid.v1()
flag: uuid.v1(),
hasDestroy: false
}
},
computed: {
@@ -274,6 +275,7 @@ export default {
beforeDestroy() {
bus.$off('onScroll', this.onScroll)
bus.$off('reset-default-value', this.resetDefaultValue)
this.hasDestroy = true
},
methods: {
selectOnScroll() {
@@ -384,6 +386,9 @@ export default {
}
},
fillFirstSelected() {
if (this.hasDestroy) {
return
}
if (this.selectFirst && this.data?.length) {
this.fillFirstValue()
this.$emit('filter-loaded', {