<son v-for="(item, index) in data" :key="index" :ref="item.ref" /> // 子组件加上key值, 调用加上对应的下标,如果还不行加上setTimeout. this.$refs.refSon[index].init() //refSon ref名 index对应的下标
<son v-for="(item, index) in data" :key="index" :ref="item.ref" /> // 子组件加上key值, 调用加上对应的下标,如果还不行加上setTimeout. this.$refs.refSon[index].init() //refSon ref名 index对应的下标