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

[Bug Report] vant tab content Hydration attribute mismatch on id #13064

Open
hansonfang opened this issue Aug 15, 2024 · 1 comment
Open

[Bug Report] vant tab content Hydration attribute mismatch on id #13064

hansonfang opened this issue Aug 15, 2024 · 1 comment

Comments

@hansonfang
Copy link

Reproduction Link

https://github.com/hansonfang/vant-Hydration-mismatch

Vant Version

4.9.4

Describe the Bug

Id attribute in tab-panel's content under ssr give error of [Vue warn]: Hydration attribute mismatch on <div id=​"van-tab-26" role=​"tabpanel" class=​"van-tab__panel" tabindex=​"0" aria-labelledby=​"van-tabs-25-0" style>​…​​

  • rendered on server: id="van-tab-26"
  • expected on client: id="van-tab-2"
    Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
    You should fix the source of the mismatch.

image

Reproduce Steps

pnpm i
pnpm dev
open http://localhost:3000/my-audit

Device / Browser

No response

@pany-ang
Copy link
Contributor

pany-ang commented Sep 9, 2024

Vue 3.5 的 useId()data-allow-mismatch 或许是解决办法:https://blog.vuejs.org/posts/vue-3-5#useid

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

2 participants