Vuejs reported an error

the error is as follows:
clipboard.png

clipboard.png

would you like to know why this is because the DOM node cannot be found?

Sep.23,2021

check that this ref, is not accessible at this time before the component is mounted. For example, if you call this function in created,beforeMount, you will get an error. If you call it in mouted, you should pay attention to whether it is directed to the child component, and if so, there is no guarantee that the child component is mounted. If you have to use it in these stages, it is recommended to add nextTick.

clipboard.png


ref is used to register reference information with elements or subcomponents. The reference information will be registered on the $refs object of the parent component. If used on ordinary DOM elements, the reference points to the DOM element; if used on subcomponents, the reference points to the component instance

<!-- `vm.$refs.p` will be the DOM node -->
<p ref="p">hello

<!-- `vm.$refs.child` will be the child component instance --> <child-component ref="child"></child-component>

-excerpt from the vue official website
so did you register ref attribute

on the subcomponent?
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-1e4862d-44ca1.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-1e4862d-44ca1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?