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

Wrong value when using useTemplateRef and defineModel #12749

Open
zhaoyuqiqi opened this issue Jan 20, 2025 · 0 comments · May be fixed by #12756
Open

Wrong value when using useTemplateRef and defineModel #12749

zhaoyuqiqi opened this issue Jan 20, 2025 · 0 comments · May be fixed by #12756

Comments

@zhaoyuqiqi
Copy link

zhaoyuqiqi commented Jan 20, 2025

Vue version

3.5.13

Link to minimal reproduction

https://codesandbox.io/p/devbox/4twzxl

Steps to reproduce

  • Use the use template to reference a Dom
  • Define a constant with the same name using defineModel
  • This constant becomes a reference to the DOM or component

Image

What is expected?

A constant is a model declared by defineModel

What is actually happening?

This constant is becomes a reference to the DOM or component

System Info

System:
    OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (2) x64 AMD EPYC
    Memory: 2.08 GB / 4.01 GB
    Container: Yes
    Shell: Unknown
  Binaries:
    Node: 20.12.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.5.0 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/share/npm-global/bin/pnpm
  npmPackages:
    vue: ^3.5.13 => 3.5.13

Any additional comments?

No response

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

Successfully merging a pull request may close this issue.

2 participants