✨(component): [tab]添加 activeBarTransition 属性
This commit is contained in:
parent
a0fd9345a2
commit
1438147ec3
@ -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` : "",
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -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`|
|
||||
|
||||
:::
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user