vant
vant copied to clipboard
[Bug Report] Title tabs在swipeable狀態下,如果標籤頁內容含有帶sticky的元素,則不會產生吸頂效果,把swipeable則恢復正常
Reproduction Link
Vant Version
4.7.3
Describe the Bug
上面是主要代碼
Reproduce Steps
把代碼放在編輯器裡運行成H5即可
Device / Browser
No response
Hello @liweiyi-931203. Please provide an online reproduction demo by codesandbox or a minimal GitHub repository. Issues marked with need reproduce
will be closed if there is no activity within 3 days. For background, please refer to Why reproductions are required.
你好 @liweiyi-931203, 我们需要你提供一个在线的重现示例,以便于我们帮你排查问题。你可以通过点击 codesandbox 创建,或者提供一个最小化的 GitHub 仓库。如果 3 天内未跟进,此 issue 将会被自动关闭。背景请参考 为什么需要最小重现。
Hello @liweiyi-931203. Please provide an online reproduction demo by codesandbox or a minimal GitHub repository. Issues marked with
need reproduce
will be closed if there is no activity within 3 days. For background, please refer to Why reproductions are required.你好 @liweiyi-931203, 我们需要你提供一个在线的重现示例,以便于我们帮你排查问题。你可以通过点击 codesandbox 创建,或者提供一个最小化的 GitHub 仓库。如果 3 天内未跟进,此 issue 将会被自动关闭。背景请参考 为什么需要最小重现。
这是在线重现示例,请查收 https://6dj7g2.csb.app/
As the issue was labeled with need reproduce
, but no response in 3 days. This issue will be closed. Feel free to comment and reopen it if you have any further questions. For background, please refer to Why reproductions are required.
由于该 issue 被标记为 "需要重现",但在 3 天内没有回应,因此该 issue 将被关闭。如果你有任何进一步的问题,请随时发表评论并重新打开该 issue。背景请参考 为什么需要最小重现。
@liweiyi-931203 复现链接是不是给错了,看起来没有tab的使用
这个问题是由于父元素有 transform
属性导致子元素 position: fixed
不达预期。
tabs
开启 swipeable
属性后,内容区将被带有 transform
属性的元素包裹,此时如果内容区的元素开启了 sticky
属性,那么该属性生效了,但显示位置不达预期。