Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue3使用van-tabs组件使用scrollspy属性滚动后会再次向上滚动一下 #12653

Open
shangcj1992 opened this issue Mar 5, 2024 · 6 comments

Comments

@shangcj1992
Copy link

shangcj1992 commented Mar 5, 2024

重现链接

WeChat_20240305161441.mp4

Vant 版本

4.7.3

描述一下你遇到的问题。

在使用vant-tabs组件时。安卓正常。在ios 12和13机器中。切换tab。会导致定位不准确。会向上切换一级activeName。比如。我切换到下标2应该是第三个tab高亮。bug会直接高亮下标为1的也就是第二个tab高亮了。这是错误的。视频截屏已经能够看得到这个bug的复现形式了。目前我测试出的机型是iphone13 版本号17.3。

重现步骤

切换导航。就能复现

设备/浏览器

Ios 13手机的微信浏览器

@shangcj1992
Copy link
Author

shangcj1992 commented Mar 5, 2024

官方文档的案例。在ios13手机中就会复现
`<script lang='ts' setup>
let active = ref(0);
</script>

内容 {{ index }} <style lang='scss' scoped> .van-tab__panel { padding: 24px 20px; } </style>`

@Pentium286
Copy link

我也遇到了。。。有解决办法吗

@erlangera
Copy link

Vant的V2版本也有这个现象,好像是动画造成的,关掉动画duration=0 试试。深层原因可能是动画使用的定时器requestAnimationFrame的平台差异造成的。 @Pentium286 @shangcj1992

@Pentium286
Copy link

Vant的V2版本也有这个现象,好像是动画造成的,关掉动画duration=0 试试。深层原因可能是动画使用的定时器requestAnimationFrame的平台差异造成的。 @Pentium286 @shangcj1992

谢谢,关闭动画就好了。。。

@caoyingming
Copy link

caoyingming commented Apr 9, 2024

我的是滚动导航最后一页内容少于一屏幕时候 导致选中的样式不切换到最后一个
WechatIMG304
已经滚动到最下面了

@erlangera
Copy link

#10152 看下这个,好像说这个现象是正常的 @caoyingming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants