Skip to content

Commit

Permalink
fix:滑动和pan冲突
Browse files Browse the repository at this point in the history
  • Loading branch information
WingGao committed Mar 31, 2020
1 parent 6ccb098 commit a6c09e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,14 @@ export class Tabs extends Component<PropsType, StateType> {
...this.getTabBarBaseProps(),
};

const onPan = !isTabVertical && useOnPan ? this.onPan : {};

const onPan = !isTabVertical && useOnPan ? this.onPan : null;
const onSwipe = onPan ? null : this.onSwipe
const content = [
<div key="tabBar" className={`${prefixCls}-tab-bar-wrap`}>
{this.renderTabBar(tabBarProps, DefaultTabBar)}
</div>,
!noRenderContent && <Gesture key="$content"
onSwipe={this.onSwipe}
onSwipe={onSwipe}
{...onPan}
>
{this.renderContent()}
Expand Down

0 comments on commit a6c09e1

Please sign in to comment.