fix(tree): document

This commit is contained in:
就眠仪式 2021-11-07 21:34:34 +08:00
parent c66657ba37
commit 9e4f2918d5
3 changed files with 10 additions and 6 deletions

View File

@ -234,12 +234,12 @@ function handleClick(node) {
::: table ::: table
| Name | Description | Accepted Values | | Name | Description | Accepted Values |
| -------- | -------------- | --------------- | --- | | -------- | -------------- | --------------- |
| id | 唯一值 | - | | id | 唯一值 | - |
| title | 节点名称 | - | | title | 节点名称 | - |
| children | 子节点 | [] | | children | 子节点 | [] |
| disabled | 该节点是否禁用 | false | | disabled | 该节点是否禁用 | false |
| spread | 该节点是否展开 | false | - | | spread | 该节点是否展开 | false |
::: :::

View File

@ -65,7 +65,11 @@
@click="closeHandle" @click="closeHandle"
></a ></a
></span> ></span>
<div v-if="btn && btn.length > 0" class="layui-layer-btn" :class="['layui-layer-btn-' + btnAlign]"> <div
v-if="btn && btn.length > 0"
class="layui-layer-btn"
:class="['layui-layer-btn-' + btnAlign]"
>
<template v-for="(b, index) in btn" :key="index"> <template v-for="(b, index) in btn" :key="index">
<a :class="['layui-layer-btn' + index]" @click="b.callback">{{ <a :class="['layui-layer-btn' + index]" @click="b.callback">{{
b.text b.text
@ -130,7 +134,7 @@ const props = withDefaults(
shade: false, shade: false,
shadeClose: true, shadeClose: true,
closeBtn: true, closeBtn: true,
btnAlign: 'l' btnAlign: 'l',
} }
) )