Is it possible to locate a component using its key?
P粉1667793632024-03-27 10:29:18
0
1
386
Vue test-utils Does it support finding a component in a list using its key? If not, is there any other way to find components generated as a list in vue?
You cannot query a component using a key in the findComponent() method.
But you can get all the components in the list and filter them like a regular array.
Just provide the correct criteria to find the item you want (using its props, properties, or other content)
You cannot query a component using a key in the
findComponent()
method.But you can get all the components in the list and filter them like a regular array. Just provide the correct criteria to find the item you want (using its props, properties, or other content)