Subscribe on changes!

refs can't get the correct component array but get one of the components

avatar
Feb 18th 2022

Version

3.2.31

Reproduction link

sfc.vuejs.org/

Steps to reproduce

Put the component with the same ref attribute into the slot position of the component provided by the third party through the loop

What is expected?

testCompRef.value is ChildCompArray

What is actually happening?

testCompRef.value is only a compennt


In this example, the loop occurs in another component, ThridComp. TiridComp exposes the component interface through slot. When App.vue uses ThridComp, refs cannot get the component array.

avatar
Feb 18th 2022

use a function ref please.