✨(tree): 新增 title 插槽, 允许自定义节点
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 321 B |
@@ -253,6 +253,28 @@ import { ref } from 'vue';
|
||||
|
||||
:::
|
||||
|
||||
::: title 定义标题
|
||||
:::
|
||||
|
||||
::: demo 使用 `title` 插槽自定义节点标题
|
||||
|
||||
<template>
|
||||
<lay-tree
|
||||
:data="data"
|
||||
collapse-transition
|
||||
>
|
||||
<template v-slot:title="{ data }">
|
||||
{{ data.id }}
|
||||
</template>
|
||||
</lay-tree>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title Tree 属性
|
||||
:::
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
rel="nofollow"
|
||||
class="site-star"
|
||||
>
|
||||
<i class="layui-icon"></i> Star <cite id="getStars">973</cite>
|
||||
<i class="layui-icon"></i> Star <cite id="getStars">1054</cite>
|
||||
</a>
|
||||
<a
|
||||
href="https://gitee.com/layui-vue"
|
||||
|
||||
Reference in New Issue
Block a user