problem description
what vue+vue-router+vue-cli, wants to achieve is that the parent page has a global message push, hoping to automatically update the data of a child page as soon as a message is pushed.
the environmental background of the problems and what methods you have tried
has tried to put the child page import directly into the parent page, and then directly .methods. Method, but prompts that some variables in the method are not defined. Then change the way of thinking, thinking that as soon as a message is pushed by the parent component, it sends a status to the child page, which has been using watch to listen for the information sent by the parent component, and then updates the data directly in the child page. But the problem now is that I have seen a lot of examples of parent-> child communication using prop, which do not use route nesting, but directly put the child page components into the parent page, so this method is not good either. The method of $on,$emit seems to be able to communicate only between sibling components. Since a large part of the project has already been done, it is a little late to introduce vuex. I hope to see if the bosses have any other ways. Thank you.