feat(TreeSelect): add nav-text slot (#11602)

* feat(TreeSelect): render HTML toggling allowHtml

* feat(TreeSelect): Custom name of the parent node

* docs(TreeSelect): Add nav-text slot
This commit is contained in:
Leon Fong
2023-03-04 15:29:02 +08:00
committed by GitHub
parent 2d72821de0
commit 572e2482d9
3 changed files with 9 additions and 6 deletions
+4 -3
View File
@@ -210,9 +210,10 @@ export default {
### Slots
| Name | Description |
| ------- | -------------------- |
| content | Custom right content |
| Name | Description |
| -------- | ------------------------------ |
| nav-text | Custom name of the parent node |
| content | Custom right content |
### Data Structure of TreeSelectItem
@@ -218,9 +218,10 @@ export default {
### Slots
| 名称 | 说明 |
| ------- | ------------------ |
| content | 自定义右侧区域内容 |
| 名称 | 说明 |
| -------- | ------------------ |
| nav-text | 自定义导航名称 |
| content | 自定义右侧区域内容 |
### TreeSelectItem 数据结构
@@ -119,6 +119,7 @@ export default defineComponent({
class={[bem('nav-item'), item.className]}
disabled={item.disabled}
onClick={onClickSidebarItem}
v-slots={{ title: slots['nav-text']?.() }}
/>
));