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

@@ -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?: {