菜单栏增加单页面刷新功能
1.移除带参路由来回切换data 2.只刷新当前router,不影响其他已缓存的router
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
export default {
|
||||
beforeRouteEnter (to, from, next) {
|
||||
next(instance => instance.$router.replace(from.fullPath))
|
||||
from.meta[from.path] = Date.now()
|
||||
next(instance => instance.$router.replace({ path: from.fullPath, meta: from.meta }))
|
||||
},
|
||||
render: h => h()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user