From c5920936f2c8d017cab6b0af7287bd4f8a537dac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E6=B3=BD=E5=9D=A4?= <984757534@qq.com> Date: Mon, 15 Aug 2022 09:55:07 +0800 Subject: [PATCH] chore: remove `mergedTabPosition` --- src/Tabs.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Tabs.tsx b/src/Tabs.tsx index a8f5474e..bcf45e9e 100644 --- a/src/Tabs.tsx +++ b/src/Tabs.tsx @@ -138,11 +138,6 @@ function Tabs( value: id, }); - let mergedTabPosition = tabPosition; - if (mobile && !['left', 'right'].includes(tabPosition)) { - mergedTabPosition = 'top'; - } - // Async generate id to avoid ssr mapping failed useEffect(() => { if (!id) { @@ -166,7 +161,7 @@ function Tabs( id: mergedId, activeKey: mergedActiveKey, animated: mergedAnimated, - tabPosition: mergedTabPosition, + tabPosition, rtl, mobile, }; @@ -196,7 +191,7 @@ function Tabs( id={id} className={classNames( prefixCls, - `${prefixCls}-${mergedTabPosition}`, + `${prefixCls}-${tabPosition}`, { [`${prefixCls}-mobile`]: mobile, [`${prefixCls}-editable`]: editable,