Commit a405de8d202710264e802edb270bbd5cd4a1ab80

Authored by Vben
1 parent 7a6c87f8

fix(tree): ebsure the expansion is functioning properly close #362

src/components/Tree/src/index.vue
@@ -205,8 +205,17 @@ @@ -205,8 +205,17 @@
205 205
206 watchEffect(() => { 206 watchEffect(() => {
207 treeDataRef.value = props.treeData as TreeItem[]; 207 treeDataRef.value = props.treeData as TreeItem[];
  208 + });
  209 +
  210 + watchEffect(() => {
208 state.expandedKeys = props.expandedKeys; 211 state.expandedKeys = props.expandedKeys;
  212 + });
  213 +
  214 + watchEffect(() => {
209 state.selectedKeys = props.selectedKeys; 215 state.selectedKeys = props.selectedKeys;
  216 + });
  217 +
  218 + watchEffect(() => {
210 state.checkedKeys = props.checkedKeys; 219 state.checkedKeys = props.checkedKeys;
211 }); 220 });
212 221