From a5859496f2aad244ae0fcd1c6697806f97704eb0 Mon Sep 17 00:00:00 2001 From: Tyh2001 <1469442737@qq.com> Date: Sat, 20 May 2023 21:47:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=20collapse-animation?= =?UTF-8?q?=20=E7=BB=84=E4=BB=B6=E9=85=8D=E7=BD=AE=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/collapse-animation.vue | 106 ++++++++++++++---- .../collapse-animation/src/props.ts | 17 ++- 2 files changed, 102 insertions(+), 21 deletions(-) diff --git a/packages/fighting-design/collapse-animation/src/collapse-animation.vue b/packages/fighting-design/collapse-animation/src/collapse-animation.vue index b26a6498ff..a266d3f190 100644 --- a/packages/fighting-design/collapse-animation/src/collapse-animation.vue +++ b/packages/fighting-design/collapse-animation/src/collapse-animation.vue @@ -1,11 +1,15 @@ diff --git a/packages/fighting-design/collapse-animation/src/props.ts b/packages/fighting-design/collapse-animation/src/props.ts index da82a9ecf6..a8cc3b5d40 100644 --- a/packages/fighting-design/collapse-animation/src/props.ts +++ b/packages/fighting-design/collapse-animation/src/props.ts @@ -1,11 +1,24 @@ -import { setBooleanProp } from '../../_utils' +import { setBooleanProp, setFunctionProp, setNumberProp } from '../../_utils' import type { ExtractPropTypes } from 'vue' +import type { PopupCallback } from '../../popup' export const Props = { /** 是否展开 */ opened: setBooleanProp(), /** 是否禁用 */ - disabled: setBooleanProp() + disabled: setBooleanProp(), + /** 是否开启宽度过度动画 */ + widthAnimation: setBooleanProp(), + /** 过度动画时间 */ + animationTime: setNumberProp(), + /** 打开动画开始的回调 */ + onOpen: setFunctionProp(), + /** 关闭动画开始的回调 */ + onClose: setFunctionProp(), + /** 打开动画结束的回调 */ + onOpenEnd: setFunctionProp(), + /** 关闭动画结束的回调 */ + onCloseEnd: setFunctionProp() } as const /** collapse-animation 组件 props 类型 */