chore: 回退 tree 代码

This commit is contained in:
就眠儀式 2022-03-24 17:04:40 +08:00
parent 2605386fe5
commit 89deffc121
3 changed files with 5 additions and 3 deletions

View File

@ -17,7 +17,7 @@ export interface LayCollapseProps {
const props = withDefaults(defineProps<LayCollapseProps>(), { const props = withDefaults(defineProps<LayCollapseProps>(), {
modelValue: () => [], modelValue: () => [],
accordion: false, accordion: false,
isAmin: true isAmin: true,
}); });
// //

View File

@ -1,6 +1,8 @@
<template> <template>
<template v-if="enable"> <template v-if="enable">
<LayCollapseTransition v-if="type === 'collapse'"><slot></slot></LayCollapseTransition> <LayCollapseTransition v-if="type === 'collapse'"
><slot></slot
></LayCollapseTransition>
<LayFadeTransition v-if="type === 'fade'"><slot></slot></LayFadeTransition> <LayFadeTransition v-if="type === 'fade'"><slot></slot></LayFadeTransition>
</template> </template>
<template v-else> <template v-else>

View File

@ -136,7 +136,7 @@ function handleTitleClick(node: TreeData) {
</span> </span>
</div> </div>
</div> </div>
<LayTransition> <LayTransition :enable="accordion">
<div <div
v-if="node.isLeaf.value" v-if="node.isLeaf.value"
class="layui-tree-pack layui-tree-showLine" class="layui-tree-pack layui-tree-showLine"