1.导航被触发;
2.在失活的组件里调用beforeRouteLeave守卫;
3.调用全局beforeEach守卫;
4.在复用组件里调用beforeRouteUpdate守卫;
5.调用路由配置里的beforeEnter守卫;
6.解析异步路由组件;
7.在被激活的组件里调用beforeRouteEnter守卫;
8.调用全局beforeResolve守卫;
9.导航被确认;
10..调用全局的afterEach钩子;
11.DOM更新;
12.用创建好的实例调用beforeRouteEnter守卫中传给next的回调函数。
// 路由配置守卫即配置在路由对象中
// 组件实力的导航守卫:beforeRouteLeave、beforeRouteEnter、beforeRouteUpdate
// 全局守卫:beforeEach、beforeResolve、afterEach
// 路由配置守卫:beforeEnter
网友评论