From 2605386fe50da88bada7010a525cbb9e6207d00c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E5=84=80=E5=BC=8F?= <854085467@qq.com>
Date: Thu, 24 Mar 2022 17:03:45 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20collapse=20=E5=8A=A8=E7=94=BB=E8=AD=A6?=
=?UTF-8?q?=E5=91=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
example/docs/zh-CN/guide/changelog.md | 1 +
src/component/collapse/index.vue | 3 +++
src/component/transition/collapseTransition.vue | 2 --
src/component/transition/index.vue | 2 +-
src/component/tree/TreeNode.vue | 2 +-
5 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/example/docs/zh-CN/guide/changelog.md b/example/docs/zh-CN/guide/changelog.md
index e9a28fe1..54f08c4f 100644
--- a/example/docs/zh-CN/guide/changelog.md
+++ b/example/docs/zh-CN/guide/changelog.md
@@ -19,6 +19,7 @@
[新增] switch 组件 onswitch-icon 插槽。
[新增] switch 组件 unswitch-icon 插槽。
[新增] transition 组件 type 属性, 默认为 collapse 过渡。
+ [新增] transition 组件 enable 属性, 默认为 true 启用动画。
[新增] transition 组件 type 属性 fade 值, 提供淡出淡入效果。
[新增] input 组件 allow-clear 属性, 提供输入清空。
[新增] input 组件 prefix 插槽, 提供前缀设置。
diff --git a/src/component/collapse/index.vue b/src/component/collapse/index.vue
index 2c96462c..8dcf977b 100644
--- a/src/component/collapse/index.vue
+++ b/src/component/collapse/index.vue
@@ -11,11 +11,13 @@ import { withDefaults, provide, ref, watch } from "vue";
export interface LayCollapseProps {
modelValue?: number | string | [];
accordion?: boolean;
+ isAmin?: boolean;
}
const props = withDefaults(defineProps(), {
modelValue: () => [],
accordion: false,
+ isAmin: true
});
// 监听传入的值
@@ -31,6 +33,7 @@ const activeValues = ref>(([] as any[]).concat(props.modelValue));
provide("layCollapse", {
accordion: props.accordion,
+ isAmin: props.isAmin,
activeValues,
emit,
});
diff --git a/src/component/transition/collapseTransition.vue b/src/component/transition/collapseTransition.vue
index 2adb8d69..8b27596a 100644
--- a/src/component/transition/collapseTransition.vue
+++ b/src/component/transition/collapseTransition.vue
@@ -3,11 +3,9 @@
v-on:before-enter="beforeEnter"
v-on:enter="enter"
v-on:after-enter="afterEnter"
- v-on:enter-cancelled="enterCancelled"
v-on:before-leave="beforeLeave"
v-on:leave="leave"
v-on:after-leave="afterLeave"
- v-on:leave-cancelled="leaveCancelled"
>
diff --git a/src/component/transition/index.vue b/src/component/transition/index.vue
index 15c6b285..92df3f56 100644
--- a/src/component/transition/index.vue
+++ b/src/component/transition/index.vue
@@ -25,6 +25,6 @@ export interface LayTransitionProps {
const props = withDefaults(defineProps(), {
type: "collapse",
- enable: true
+ enable: true,
});
diff --git a/src/component/tree/TreeNode.vue b/src/component/tree/TreeNode.vue
index 195bfb27..89b33d45 100644
--- a/src/component/tree/TreeNode.vue
+++ b/src/component/tree/TreeNode.vue
@@ -136,7 +136,7 @@ function handleTitleClick(node: TreeData) {
-
+