Skip to content

Commit 5563285

Browse files
authoredJun 22, 2022
fix(Tabs): 修复tabs标签在没有移除情况下展开了收缩栏 #854 (#855)
1 parent d1c5310 commit 5563285

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎packages/react-tabs/src/index.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,10 @@ export default function Tabs(props: TabsProps) {
9595
if (flowNav.nav.length > 0) {
9696
flowNav.nav.forEach((item) => {
9797
const curWidth = item.curWidth - deviation;
98-
if (curWidth < flowNav.displayStart || curWidth > flowNav.displayEnd) {
99-
hiddenNav.push(item.index);
98+
if (flowNav.displayStart > 0 || flowNav.displayEnd > 0) {
99+
if (curWidth < flowNav.displayStart || curWidth > flowNav.displayEnd) {
100+
hiddenNav.push(item.index);
101+
}
100102
}
101103
});
102104
hiddenNavSet(hiddenNav);

0 commit comments

Comments
 (0)
Please sign in to comment.