We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 40099b0 commit 61f5e96Copy full SHA for 61f5e96
src/packages/tabs/tabs.taro.tsx
@@ -208,10 +208,7 @@ export const Tabs: FunctionComponent<Partial<TabsProps>> & {
208
const left = titleRects
209
.slice(0, index)
210
.reduce((prev: number, curr: RectItem) => prev + curr.width, 0)
211
- to = left - (navRectRef.current.width - titleRect.width) / 2
212
- // to < 0 说明不需要进行滚动,页面元素已全部显示出来
213
- if (to < 0) return
214
- to = rtl ? -to : to
+ to = rtl ? -left : left
215
}
216
nextTick(() => {
217
scrollWithAnimation.current = true
0 commit comments