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