(component): [tab]添加 activeBarTransition 属性

This commit is contained in:
sight 2022-06-24 16:44:26 +08:00
parent a0fd9345a2
commit 1438147ec3
2 changed files with 3 additions and 1 deletions

View File

@ -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` : "",
};
};

View File

@ -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`|
:::