This commit is contained in:
asd
2019-12-09 10:48:31 +08:00
parent cb0c8d7d42
commit d2b446b006

View File

@@ -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