提交 4c839f1f 编写于 作者: H hdx

fix(swiper-list2): 适配 web 平台,在最后一个/第一个 item 时,再次滑动出现tab放大异常的问题

上级 4d0d0677
...@@ -81,7 +81,9 @@ ...@@ -81,7 +81,9 @@
const percentage = Math.abs(current_offset_x) / this.swiperWidth const percentage = Math.abs(current_offset_x) / this.swiperWidth
// 通知更新指示线 // 通知更新指示线
if (current_index != move_to_index) {
this.updateTabIndicator(current_index, move_to_index, percentage) this.updateTabIndicator(current_index, move_to_index, percentage)
}
}, },
onSwiperAnimationfinish(e : SwiperAnimationFinishEvent) { onSwiperAnimationfinish(e : SwiperAnimationFinishEvent) {
this.setSwiperIndex(e.detail.current, true) this.setSwiperIndex(e.detail.current, true)
...@@ -108,8 +110,8 @@ ...@@ -108,8 +110,8 @@
const max_ratio = 1.3 const max_ratio = 1.3
const tabs = this.$refs['swipertab'] as UniElement[] const tabs = this.$refs['swipertab'] as UniElement[]
const current_node = tabs[current_index]! const current_node = tabs[current_index]
const move_to_node = tabs[move_to_index]! const move_to_node = tabs[move_to_index]
// 当前 // 当前
const current_scale = lerpNumber(min_ratio, max_ratio, 1 - percentage) const current_scale = lerpNumber(min_ratio, max_ratio, 1 - percentage)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册