mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-02 11:17:46 +08:00
feat(components): [tree] support customize content when data is empty (#12459)
This commit is contained in:
parent
c0b8f4751b
commit
5cd6d61400
@ -198,5 +198,6 @@ tree/draggable
|
||||
## Slots
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ---------------------------------------------------------------------- |
|
||||
| ----- | ---------------------------------------------------------------------- |
|
||||
| — | Custom content for tree nodes. The scope parameter is `{ node, data }` |
|
||||
| empty | empty you can customize content when data is empty. |
|
||||
|
@ -22,9 +22,11 @@
|
||||
@node-expand="handleNodeExpand"
|
||||
/>
|
||||
<div v-if="isEmpty" :class="ns.e('empty-block')">
|
||||
<span :class="ns.e('empty-text')">{{
|
||||
emptyText ?? t('el.tree.emptyText')
|
||||
}}</span>
|
||||
<slot name="empty">
|
||||
<span :class="ns.e('empty-text')">
|
||||
{{ emptyText ?? t('el.tree.emptyText') }}
|
||||
</span>
|
||||
</slot>
|
||||
</div>
|
||||
<div
|
||||
v-show="dragState.showDropIndicator"
|
||||
|
Loading…
Reference in New Issue
Block a user