From 1438147ec36e52968a009cc53cf55b2cd95c8639 Mon Sep 17 00:00:00 2001 From: sight <1453017105@qq.com> Date: Fri, 24 Jun 2022 16:44:26 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(component):=20[tab]=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=20activeBarTransition=20=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/component/src/component/tab/index.vue | 3 ++- package/document/src/document/zh-CN/components/tab.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package/component/src/component/tab/index.vue b/package/component/src/component/tab/index.vue index f7f4c589..104a020c 100644 --- a/package/component/src/component/tab/index.vue +++ b/package/component/src/component/tab/index.vue @@ -33,6 +33,7 @@ export interface LayTabProps { tabPosition?: tabPositionType; beforeClose?: Function; beforeLeave?: Function; + activeBarTransition?: boolean; } const slot = useSlots(); @@ -109,7 +110,7 @@ const getBarStyle = () => { return { [sizeName]: `${tabSize}px`, transform: `translate${axis}(${offset}px)`, - // transition: `transform .3s`, // activeBar 动画 + transition: props.activeBarTransition ? `transform .3s` : "", }; }; diff --git a/package/document/src/document/zh-CN/components/tab.md b/package/document/src/document/zh-CN/components/tab.md index 0d72e070..af7f8234 100644 --- a/package/document/src/document/zh-CN/components/tab.md +++ b/package/document/src/document/zh-CN/components/tab.md @@ -330,6 +330,7 @@ export default { | allow-close | 允许关闭 | `true` `false` | | before-close | `Function`关闭之前的回调钩子函数 | 参数(`id`), `return false` 表示不进行关闭 | | before-leave | `Function`切换标签之前的回调钩子函数 | 参数(`id`), `return false` 表示不进行切换 | +| activeBarTransition| 是否开启 activeBar 动画,仅 brief 有效,默认 `false`| `true` `false`| :::