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

我用 map return 一组 tag div, 每个 div 中再用 ref 标记一个组件,最后得到的是一个 object, 我希望的到的是数组 #299

Open
wuyonggang100 opened this issue Nov 20, 2022 · 3 comments

Comments

@wuyonggang100
Copy link

{listx.map((info, index) => {
return (




})}
coonst refsX = this.$refs.xxxxRef ;
console.log(refsX )
i hope refsX is a list , but it was an object ,why ?

@wuyonggang100
Copy link
Author

{listx.map((info, index) => {
return (

})} coonst refsX = this.$refs.xxxxRef ; console.log(refsX ) i hope refsX is a list , but it was an object ,why ?

@ding-js
Copy link

ding-js commented Jan 29, 2023

https://v2.vuejs.org/v2/guide/render-function.html#The-Data-Object-In-Depth

子元素每个都加上 refInFor

@Kane-Kuroneko
Copy link

粘代码的时候麻烦用包一下 看不懂format

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

No branches or pull requests

3 participants