Methods to access subcomponents in vue, and whether there are any methods to quickly access subcomponents at a deeper level

let b = this.$ refs [this.userRef]. $children [0]. $children [2]. $children [1]. $children [0]. $children [0]
console.info ("resetting" in b);
b.resetting ();
I am here, but I think it"s unreasonable. Is there any api that can access subcomponents at a deeper level?

Jun.10,2021

doesn't feel like a good way to directly access
can't you directly add a reference to a subcomponent?


Let's all throw events on the message bus.


you can try publish / subscribe mode


you can write this:

created () {
  window.myComponent = this;
}
window.myComponent&&window.myComponent.resetting&&window.myComponent.resetting()
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eacb35-47ebb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eacb35-47ebb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?