Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Nov 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions packages/components/tree-v2/src/tree-node.vue
Expand Up @@ -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'
Expand All @@ -62,8 +63,6 @@ import {
} from './virtual-tree'
import type { CheckboxValueType } from '@element-plus/components/checkbox'

const DEFAULT_ICON = 'caret-right'

defineOptions({
name: 'ElTreeNode',
})
Expand All @@ -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) => {
Expand Down