javascript - vue-router address change data remains unchanged
欧阳克
欧阳克 2017-06-28 09:24:10
0
1
917

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

欧阳克
欧阳克

温故而知新,可以为师矣。 博客:www.ouyangke.com

reply all(1)
迷茫

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template