-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[vue] vue-router如何响应路由参数的变化? #383
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
Labels
vue
vue
Comments
watch |
1.watch |
ickt-5: |
问题:为什么要响应参数变化?
解决方案:
watch: {
$route(to, from){
if(to != from) {
console.log("监听到路由变化,做出相应的处理");
}
}
}
|
1.watch |
干啥玩意?咋又给我发???
…------------------ 原始邮件 ------------------
发件人: "WenJieLi1998"<notifications@github.com>;
发送时间: 2020年4月19日(星期天) 上午10:56
收件人: "haizlin/fe-interview"<fe-interview@noreply.github.com>;
抄送: "Coisini"<809467603@qq.com>;"Comment"<comment@noreply.github.com>;
主题: Re: [haizlin/fe-interview] [vue] vue-router如何响应路由参数的变化? (#383)
1.watch
2.导航守卫
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[vue] vue-router如何响应路由参数的变化?
The text was updated successfully, but these errors were encountered: