Skip to content

Commit 196ea6f

Browse files
Merge pull request dataease#8377 from dataease/pr@dev-v2@fix_system_filter
fix: 树形选择器点击节点选中数据无效
2 parents 7232e22 + c97940b commit 196ea6f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

core/core-frontend/src/components/drawer-filter/src/DrawerTreeFilter.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
22
import { propTypes } from '@/utils/propTypes'
33
import { ElTreeSelect } from 'element-plus-secondary'
4-
import { computed, reactive, ref, PropType, toRefs } from 'vue'
4+
import { computed, reactive, ref, PropType, toRefs, watch } from 'vue'
55
import { useI18n } from '@/hooks/web/useI18n'
66
const { t } = useI18n()
77
interface TreeConfig {
@@ -60,6 +60,15 @@ const optionListNotSelect = computed(() => {
6060
const clear = () => {
6161
state.currentStatus = []
6262
}
63+
watch(
64+
() => state.currentStatus,
65+
() => {
66+
treeChange()
67+
},
68+
{
69+
immediate: true
70+
}
71+
)
6372
defineExpose({
6473
clear
6574
})
@@ -74,7 +83,6 @@ defineExpose({
7483
ref="filterTree"
7584
:teleported="false"
7685
style="width: 100%"
77-
@change="treeChange"
7886
v-model="state.currentStatus"
7987
:data="optionListNotSelect"
8088
:highlight-current="true"

0 commit comments

Comments
 (0)