update
This commit is contained in:
@@ -191,5 +191,18 @@ export default {
|
||||
(1) 在 main.js中的 导出模块里 通过watch 监听 $route 对象
|
||||
|
||||
```
|
||||
new Vue({
|
||||
el: '#app',
|
||||
router,
|
||||
watch:{
|
||||
'$route'(){
|
||||
window.console.log("aaa")
|
||||
}
|
||||
},
|
||||
render: h => h(App)
|
||||
})
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
(2) 定义route.beforeEach
|
||||
Reference in New Issue
Block a user