Skip to content

Commit dc457b6

Browse files
committed
fix(tabs): disabled animated when tabPosition is left/right
1 parent ae96748 commit dc457b6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

components/tabs/src/Tabs.tsx

+3-4
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,12 @@ const InternalTabs = defineComponent({
156156
const rtl = computed(() => direction.value === 'rtl');
157157
const mergedAnimated = computed<AnimatedConfig>(() => {
158158
const { animated, tabPosition } = props;
159-
const isDoAnimate = ['top', 'bottom'].includes(tabPosition);
160-
if (animated === false) {
159+
if (animated === false || ['left', 'right'].includes(tabPosition)) {
161160
return {
162161
inkBar: false,
163162
tabPane: false,
164163
};
165-
} else if (animated === true && isDoAnimate) {
164+
} else if (animated === true) {
166165
return {
167166
inkBar: true,
168167
tabPane: true,
@@ -171,7 +170,7 @@ const InternalTabs = defineComponent({
171170
return {
172171
inkBar: true,
173172
tabPane: false,
174-
...(typeof animated === 'object' && isDoAnimate ? animated : {}),
173+
...(typeof animated === 'object' ? animated : {}),
175174
};
176175
}
177176
});

0 commit comments

Comments
 (0)