jsx-vue2
jsx-vue2 copied to clipboard
我用 map return 一组 tag div, 每个 div 中再用 ref 标记一个组件,最后得到的是一个 object, 我希望的到的是数组
{listx.map((info, index) => { return (
<CompX ref="xxxxRef"/>
})}
coonst refsX = this.$refs.xxxxRef ;
console.log(refsX )
i hope refsX is a list , but it was an object ,why ?
{listx.map((info, index) => { return (
https://v2.vuejs.org/v2/guide/render-function.html#The-Data-Object-In-Depth
子元素每个都加上 refInFor
粘代码的时候麻烦用包一下 看不懂format