-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[vue] 说说vue-router完整的导航解析流程是什么? #372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
1.导航被触发;2.在失活的组件里调用beforeRouteLeave守卫;3.调用全局beforeEach守卫;4.在复用组件里调用beforeRouteUpdate守卫;5.调用路由配置里的beforeEnter守卫;6.解析异步路由组件;7.在被激活的组件里调用beforeRouteEnter守卫;8.调用全局beforeResolve守卫;9.导航被确认;10..调用全局的afterEach钩子;11.DOM更新;12.用创建好的实例调用beforeRouteEnter守卫中传给next的回调函数。 |
1、router-link 【实现跳转最简单的方法】 |
1.导航被触发 |
干啥玩意呢?
…------------------ 原始邮件 ------------------
发件人: "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.
|
我裂开了 |
太复杂了8 |
[vue] 说说vue-router完整的导航解析流程是什么?
The text was updated successfully, but these errors were encountered: