From cb661fca80d99bcd8d8a1f9557bf9c22dc80ba12 Mon Sep 17 00:00:00 2001 From: tyh2001 <1469442737@qq.com> Date: Fri, 24 Feb 2023 17:40:48 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E4=BC=98=E5=8C=96=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=20=F0=9F=91=91=F0=9F=91=91=F0=9F=91=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.en-US.md | 7 +++++++ .../src/collapse-animation.vue | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 21a1a48c53..ff3379f5e3 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -4,6 +4,13 @@ English | [Chinese](https://github.com/FightingDesign/fighting-design/blob/master/CHANGELOG.md) +## 0.26.0 (2023-02-24) + +- Optimize `f-back-top` component implementation +- `f-menu` component adds `on-menu item click` `on-submenu-click` configuration item +- Fix the `f-menu` component folding problem +- Refactoring the `f-collapse-animation` component + ## 0.25.1 (2023-02-21) - Fix the `f-submenu` component class name problem diff --git a/packages/fighting-design/collapse-animation/src/collapse-animation.vue b/packages/fighting-design/collapse-animation/src/collapse-animation.vue index 7392bf766d..001be6c4c5 100644 --- a/packages/fighting-design/collapse-animation/src/collapse-animation.vue +++ b/packages/fighting-design/collapse-animation/src/collapse-animation.vue @@ -10,6 +10,10 @@ * 以往版本实现可参考: * * @see collapse-animation https://github.com/FightingDesign/fighting-design/tree/474f6f19c2b034d5f2839c110e02b8987af24a9a/packages/fighting-design/collapse-animation + * + * 新版本使用 Transition 来实现 + * + * @see javascript-hooks https://cn.vuejs.org/guide/built-ins/transition.html#javascript-hooks */ /** 获取当前的展示状态 */ @@ -78,6 +82,13 @@ el.style.height = `${el.scrollHeight}px` } + /** + * 在离开过渡开始时调用 + * + * 用这个来开始离开动画 + * + * @param { Object } el 元素节点 + */ const onLeave = (el: HTMLElement): void => { if (el.scrollHeight !== 0) { el.style.transition = transitionStyle @@ -85,6 +96,13 @@ } } + /** + * 在离开过渡完成 + * + * 且元素已从 DOM 中移除时调用 + * + * @param { Object } el 元素节点 + */ const onAfterLeave = (el: HTMLElement): void => { el.style.transition = '' el.style.height = ''