You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
------------------ 原始邮件 ------------------
发件人: "WenJieLi1998"<notifications@github.com>;
发送时间: 2020年4月19日(星期天) 中午1:39
收件人: "haizlin/fe-interview"<fe-interview@noreply.github.com>;
抄送: "Coisini"<809467603@qq.com>;"Comment"<comment@noreply.github.com>;
主题: Re: [haizlin/fe-interview] [vue] 说说vue-router完整的导航解析流程是什么? (#372)
1.导航被触发
2.在即将离开的组件里调用beforeRouteLeave守卫
3.调用全局前置守卫beforeEach守卫
4.在重用的组件里调用beforeRouteUpdate守卫 / 调用路由配置的beforeEnter守卫
5.解析异步路由组件
6.在被激活的组件里调用beforeRouteEnter
7.调用全局的beforeResolve守卫
8.导航被确认
9.调用全局的 afterEach 钩子
10.触发DOM更新
11.用创建好的实例调用 beforeRouteEnter 守卫中传给 next 的回调函数。
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
Activity
Sihan-Tan commentedon Jul 24, 2019
1.导航被触发;2.在失活的组件里调用beforeRouteLeave守卫;3.调用全局beforeEach守卫;4.在复用组件里调用beforeRouteUpdate守卫;5.调用路由配置里的beforeEnter守卫;6.解析异步路由组件;7.在被激活的组件里调用beforeRouteEnter守卫;8.调用全局beforeResolve守卫;9.导航被确认;10..调用全局的afterEach钩子;11.DOM更新;12.用创建好的实例调用beforeRouteEnter守卫中传给next的回调函数。
zhaoling906 commentedon Oct 20, 2019
1、router-link 【实现跳转最简单的方法】
<router-link to='需要跳转到的页面的路径>
2、this.$router.push({ path:’/user’}) 常用于路由传参
3、this.$router.replace{path:‘/’ }
WenJieLi1998 commentedon Apr 19, 2020
1.导航被触发
2.在即将离开的组件里调用beforeRouteLeave守卫
3.调用全局前置守卫beforeEach守卫
4.在重用的组件里调用beforeRouteUpdate守卫 / 调用路由配置的beforeEnter守卫
5.解析异步路由组件
6.在被激活的组件里调用beforeRouteEnter
7.调用全局的beforeResolve守卫
8.导航被确认
9.调用全局的 afterEach 钩子
10.触发DOM更新
11.用创建好的实例调用 beforeRouteEnter 守卫中传给 next 的回调函数。
zhaoling906 commentedon Apr 19, 2020
time202051 commentedon Apr 23, 2021
我裂开了
J2233969810 commentedon Apr 27, 2021
太复杂了8