@@ -23,7 +23,16 @@ import {
23
23
import NodeList , { MOTION_KEY , MotionEntity } from './NodeList' ;
24
24
import { conductCheck } from './utils/conductUtil' ;
25
25
import DropIndicator from './DropIndicator' ;
26
- import { computed , defineComponent , onMounted , onUnmounted , reactive , ref , watchEffect } from 'vue' ;
26
+ import {
27
+ computed ,
28
+ defineComponent ,
29
+ onMounted ,
30
+ onUnmounted ,
31
+ reactive ,
32
+ ref ,
33
+ shallowRef ,
34
+ watchEffect ,
35
+ } from 'vue' ;
27
36
import initDefaultProps from '../_util/props-util/initDefaultProps' ;
28
37
import type { CheckInfo } from './props' ;
29
38
import { treeProps } from './props' ;
@@ -59,12 +68,12 @@ export default defineComponent({
59
68
const destroyed = ref ( false ) ;
60
69
let delayedDragEnterLogic : Record < Key , number > = { } ;
61
70
const indent = ref ( ) ;
62
- const selectedKeys = ref ( [ ] ) ;
63
- const checkedKeys = ref ( [ ] ) ;
64
- const halfCheckedKeys = ref ( [ ] ) ;
65
- const loadedKeys = ref ( [ ] ) ;
66
- const loadingKeys = ref ( [ ] ) ;
67
- const expandedKeys = ref ( [ ] ) ;
71
+ const selectedKeys = shallowRef ( [ ] ) ;
72
+ const checkedKeys = shallowRef ( [ ] ) ;
73
+ const halfCheckedKeys = shallowRef ( [ ] ) ;
74
+ const loadedKeys = shallowRef ( [ ] ) ;
75
+ const loadingKeys = shallowRef ( [ ] ) ;
76
+ const expandedKeys = shallowRef ( [ ] ) ;
68
77
69
78
const dragState = reactive ( {
70
79
dragging : false ,
@@ -87,7 +96,7 @@ export default defineComponent({
87
96
const treeData = computed ( ( ) => {
88
97
return props . treeData !== undefined ? props . treeData : convertTreeToData ( props . children ) ;
89
98
} ) ;
90
- const keyEntities = ref ( { } ) ;
99
+ const keyEntities = shallowRef ( { } ) ;
91
100
92
101
const focused = ref ( false ) ;
93
102
const activeKey = ref < Key > ( null ) ;
0 commit comments