滑动到顶部时,给pageScrollTo设置个duration
const duration = this.currentIndex == undefined && index == undefined ? 200 : 0
setTimeout(() => {
Taro.pageScrollTo({ scrollTop: this.yPosition, duration: this.yPosition == 0 ? 50 : 0 })
}, duration)
网友评论