fix(components): [tree-v2] add missing icon (#10340)

Co-authored-by: init-qy <953218204@qq.com>
This commit is contained in:
init-qy 2022-11-01 10:37:13 +08:00 committed by GitHub
parent 4ff8f28ebc
commit 1753e1dedc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,6 +51,7 @@
<script lang="ts" setup>
import { computed, inject } from 'vue'
import ElIcon from '@element-plus/components/icon'
import { CaretRight } from '@element-plus/icons-vue'
import ElCheckbox from '@element-plus/components/checkbox'
import { useNamespace } from '@element-plus/hooks'
import ElNodeContent from './tree-node-content'
@ -62,8 +63,6 @@ import {
} from './virtual-tree'
import type { CheckboxValueType } from '@element-plus/components/checkbox'
const DEFAULT_ICON = 'caret-right'
defineOptions({
name: 'ElTreeNode',
})
@ -79,7 +78,7 @@ const indent = computed(() => {
})
const icon = computed(() => {
return tree?.props.icon ?? DEFAULT_ICON
return tree?.props.icon ?? CaretRight
})
const handleClick = (e: MouseEvent) => {