(tree): 新增 title 插槽, 允许自定义节点

This commit is contained in:
就眠儀式
2022-05-29 18:04:55 +08:00
parent 4385d0cffe
commit a8237710e2
6 changed files with 72 additions and 25 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 321 B

View File

@@ -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 属性
:::

View File

@@ -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"