Prompt undefined to get the value from the parent component in the child component

parent component
clipboard.png

clipboard.png
useridvuedevtools

clipboard.png
I think it"s a matter of execution order. When called in mounted, prop hasn"t got the data yet.
what should I do in this situation, listening in watch?

Mar.16,2021

need to use watch to listen
watch: {

userid(curInfo, oldInfo) {
  if (curInfo) {
    this.userid= curInfo;
    this.getPerMsg();
  }
}

},


it's OK to watch,. It's just that I don't think I can send personmsg, directly so that the order is not involved.


Thank you for your answers.
I have consulted the relevant materials
1. Life cycle order of parent and child components
https://www.cnblogs.com/statu.
2. The parent component asynchronously requests data to be passed to the child component
http://www.jb51.net/article/1.
finally makes a non-null judgment in the parent component. If it is empty, the child component is not initialized. If the parent component gets the data, then initialize the child component, there will be no problem of the child component getting empty.

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