diff --git a/packages/yike-design-ui/components/tree/src/node-switcher.vue b/packages/yike-design-ui/components/tree/src/node-switcher.vue index b7ab9391..3d05f946 100644 --- a/packages/yike-design-ui/components/tree/src/node-switcher.vue +++ b/packages/yike-design-ui/components/tree/src/node-switcher.vue @@ -6,6 +6,7 @@ import { TreeInjectionKey, TreeNodeInjectionKey } from './tree' const bem = createCssScope('tree-node-switcher') const nodeContext = inject(TreeNodeInjectionKey) + const context = inject(TreeInjectionKey) diff --git a/packages/yike-design-ui/components/tree/src/tree.vue b/packages/yike-design-ui/components/tree/src/tree.vue index 83a3debd..6cbbd619 100644 --- a/packages/yike-design-ui/components/tree/src/tree.vue +++ b/packages/yike-design-ui/components/tree/src/tree.vue @@ -38,7 +38,7 @@ const props = withDefaults(defineProps(), { blockNode: false, multiple: false, expandIcon() { - return h(IconRightFill) + return () => h(IconRightFill) }, defaultExpandedKeys() { return []