Subcomponents do not execute created () when using vue

1. The code looks like this

<a-component>
    <b-component></b-component>
     <router-link :to="/a/1/5" replace></router-link>
</a-component>

render the contents of the above component through routing-sharp/a/1/2 when the created () in component an executes the created () in component b and the created () in component a does not execute the created () in component b when the previous one is clicked. Why does it need to be solved?

Mar.02,2021

this question requires you to learn more about the life cycle of vue , mainly the loading time and destruction time of components. One or two sentences are not clear. You can check more documents on the official website: ide/instance.html-sharp%E5%AE%9E%E4%BE%8B%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F" rel=" nofollow noreferrer "> https://cn.vuejs.org/v2/guide.


  1. definitely not execute if you jump to another component,
  2. The
  3. a, b component has already been rendered, and created () will not be executed unless the page is refreshed and the two components are reloaded.
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-1e8bc66-1082.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-1e8bc66-1082.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?