Skip to content

Commit

Permalink
fix(Tabs): 修复tabs标签在没有移除情况下展开了收缩栏 #854 (#855)
Browse files Browse the repository at this point in the history
  • Loading branch information
nullptr-z committed Jun 22, 2022
1 parent d1c5310 commit 5563285
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/react-tabs/src/index.tsx
Expand Up @@ -95,8 +95,10 @@ export default function Tabs(props: TabsProps) {
if (flowNav.nav.length > 0) {
flowNav.nav.forEach((item) => {
const curWidth = item.curWidth - deviation;
if (curWidth < flowNav.displayStart || curWidth > flowNav.displayEnd) {
hiddenNav.push(item.index);
if (flowNav.displayStart > 0 || flowNav.displayEnd > 0) {
if (curWidth < flowNav.displayStart || curWidth > flowNav.displayEnd) {
hiddenNav.push(item.index);
}
}
});
hiddenNavSet(hiddenNav);
Expand Down

0 comments on commit 5563285

Please sign in to comment.