How does vue get a component of a parent component

I can get the array of components through this.$parent.$children in sub-components.
clipboard.png
how to accurately get a component I want

Mar.04,2021

in the parent component template, add ref attribute ide/components.html-sharp%E5%AD%90%E7%BB%84%E4%BB%B6%E5%BC%95%E7%94%A8" rel=" nofollow noreferrer "> to the child component


how exactly? Does it count to use subscript?


Child components in the parent component use the ref attribute ref attribute to explain

so that you can this.$refs. in the parent component The ref attribute value of the subcomponent is used to get the subcomponent
accurately, and then you can also use this method to call the subcomponent to change the value in the subcomponent data, which can be said to be very cool

.
Menu