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

为什么使用3.2.37取到的$refs是数组(3.2.22取到的是对象),两者不兼容 #6405

Closed
chenyurou opened this issue Aug 4, 2022 · 4 comments

Comments

@chenyurou
Copy link

Vue version

3.2.37

Link to minimal reproduction

https://github.com/chenyurou/vue-ref-question.git

Steps to reproduce

  1. 使用3.2.22版本,$refs取到的值是对象
    image
    image

  2. 使用3.2.37版本,$refs取到的值是数组
    image
    image

What is expected?

希望3.2.37版本符合与官方文档描述,希望打印结果是个对象
企业微信截图_16595790222832

What is actually happening?

实际3.2.37版本不符合官方文档描述,打印出来是个数组

System Info

No response

Any additional comments?

No response

@a145789
Copy link

a145789 commented Aug 4, 2022

可以参考 这个, 3.2.25 v-for 中的 ref 和 vue2 的表现一样了
新文档里也有提到

需要 v3.2.25 及以上版本

@chenyurou
Copy link
Author

可以参考 这个, 3.2.25 v-for 中的 ref 和 vue2 的表现一样了 新文档里也有提到

需要 v3.2.25 及以上版本

感谢回复!

@Justineo
Copy link
Member

Justineo commented Aug 4, 2022

See @a145789's comment.

@Justineo Justineo closed this as completed Aug 4, 2022
@chenyurou
Copy link
Author

See @a145789's comment.

请问,是出于什么原因,又改回数组

@github-actions github-actions bot locked and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants