Skip to content
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

[vue] 如何获取路由传过来的参数? #379

Open
haizhilin2013 opened this issue Jun 20, 2019 · 3 comments
Open

[vue] 如何获取路由传过来的参数? #379

haizhilin2013 opened this issue Jun 20, 2019 · 3 comments
Labels
vue vue

Comments

@haizhilin2013
Copy link
Collaborator

[vue] 如何获取路由传过来的参数?

@haizhilin2013 haizhilin2013 added the vue vue label Jun 20, 2019
@AnsonZnl
Copy link
Contributor

AnsonZnl commented Jul 3, 2019

如果使用query方式传入的参数使用this.$route.query 接收
如果使用params方式传入的参数使用this.$router.params接收

@WenJieLi1998
Copy link

一个路径参数使用“:”,可以通过this.$route.params获取
路径中有查询参数,可以通过this.$route.query获取

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vue vue
Projects
None yet
Development

No branches or pull requests

4 participants