Commit ce7f382b9b9008bbda422ac8c5b59c6cde9ac81e
Committed by
GitHub
1 parent
1832d0c0
fix: 修复tree组件初次渲染时无法应用已勾选的节点数组及一处字段名错误 (#1854)
Showing
1 changed file
with
2 additions
and
1 deletions
src/components/Tree/src/Tree.vue
@@ -71,7 +71,7 @@ | @@ -71,7 +71,7 @@ | ||
71 | selectedKeys: state.selectedKeys, | 71 | selectedKeys: state.selectedKeys, |
72 | checkedKeys: state.checkedKeys, | 72 | checkedKeys: state.checkedKeys, |
73 | checkStrictly: state.checkStrictly, | 73 | checkStrictly: state.checkStrictly, |
74 | - filedNames: unref(getFieldNames), | 74 | + fieldNames: unref(getFieldNames), |
75 | 'onUpdate:expandedKeys': (v: KeyType[]) => { | 75 | 'onUpdate:expandedKeys': (v: KeyType[]) => { |
76 | state.expandedKeys = v; | 76 | state.expandedKeys = v; |
77 | emit('update:expandedKeys', v); | 77 | emit('update:expandedKeys', v); |
@@ -293,6 +293,7 @@ | @@ -293,6 +293,7 @@ | ||
293 | () => { | 293 | () => { |
294 | state.checkedKeys = toRaw(props.value || []); | 294 | state.checkedKeys = toRaw(props.value || []); |
295 | }, | 295 | }, |
296 | + { immediate: true }, | ||
296 | ); | 297 | ); |
297 | 298 | ||
298 | watch( | 299 | watch( |