search

Home  >  Q&A  >  body text

javascript - vue-router address change data remains unchanged

I don’t know what is missing. Now the address has changed but the data has not changed. Please give me guidance, I am new to vue-router

欧阳克欧阳克2710 days ago856

reply all(1)I'll reply

  • 迷茫

    迷茫2017-06-28 09:26:10

    There are the following points:

    1. Not all Router have name, so maybe key() is a fake branch. Since $route is an object, $route + +new Date() is possible is an invalid value

    2. $route.matched may not contain a name value, so the filter method may return an empty array, making subsequent data processing impossible.

    3. If it is hot loading, it is recommended to force refresh the browser cache.

    reply
    0
  • Cancelreply