chore(tree): rename tree props accordion to collapse-transition

This commit is contained in:
落小梅 2022-03-24 18:25:51 +08:00
parent 86d8ed4ec9
commit 9b332cdfb4
4 changed files with 16 additions and 16 deletions

View File

@ -18,7 +18,7 @@
:onlyIconControl="iconCtrl"
:showLine="showLine"
:showCheckbox="showCheckbox"
accordion
collapseTransition
v-model:checkedKeys="checkedKeys"
@node-click="handleClick"
:disabled="disabled"
@ -247,13 +247,13 @@ function handleClick(node) {
::: table
| Name | Description | Accepted Values |
| -------- |-------------| --------------- |
|---------------------|-------------| --------------- |
| id | 唯一值 | - |
| title | 节点名称 | - |
| children | 子节点 | [] |
| disabled | 该节点是否禁用 | false |
| spread | 该节点是否展开 | false |
| accordion | 是否开启展示收起动画 | false |
| collapse-transition | 是否开启展示收起动画 | false |
:::

View File

@ -33,7 +33,7 @@ interface TreeNodeProps {
nodeList: TreeData[];
showCheckbox: boolean;
showLine: boolean;
accordion: boolean;
collapseTransition: boolean;
onlyIconControl: boolean;
}
@ -136,7 +136,7 @@ function handleTitleClick(node: TreeData) {
</span>
</div>
</div>
<LayTransition :enable="accordion">
<LayTransition :enable="collapseTransition">
<div
v-if="node.isLeaf.value"
class="layui-tree-pack layui-tree-showLine"
@ -146,7 +146,7 @@ function handleTitleClick(node: TreeData) {
:node-list="node.children"
:show-checkbox="showCheckbox"
:show-line="showLine"
:accordion="accordion"
:collapse-transition="collapseTransition"
:tree="tree"
:only-icon-control="onlyIconControl"
@node-click="recursiveNodeClick"

View File

@ -28,7 +28,7 @@ interface TreeProps {
data: OriginalTreeData;
showCheckbox?: boolean;
edit?: EditType;
accordion?: boolean;
collapseTransition?: boolean;
onlyIconControl?: boolean;
showLine?: boolean;
disabled?: boolean;
@ -48,7 +48,7 @@ interface TreeEmits {
const props = withDefaults(defineProps<TreeProps>(), {
showCheckbox: false,
edit: false,
accordion: false,
collapseTransition: false,
onlyIconControl: false,
disabled: false,
showLine: true,
@ -85,7 +85,7 @@ function handleClick(node: TreeData) {
:node-list="nodeList"
:show-checkbox="showCheckbox"
:show-line="showLine"
:accordion="accordion"
:collapse-transition="collapseTransition"
:only-icon-control="onlyIconControl"
@node-click="handleClick"
/>

View File

@ -17,7 +17,7 @@ export interface TreeProps {
data: OriginalTreeData;
showCheckbox?: boolean;
edit?: EditType;
accordion?: boolean;
collapseTransition?: boolean;
onlyIconControl?: boolean;
showLine?: boolean;
replaceFields?: {