[vue] 如何获取路由传过来的参数?
Activity
AnsonZnl commentedon Jul 3, 2019
如果使用
query
方式传入的参数使用this.$route.query
接收如果使用
params
方式传入的参数使用this.$router.params
接收liuxiaoyang1 commentedon Nov 19, 2019
https://mp.weixin.qq.com/s?__biz=MzU3MzE2NzIyMA==&mid=2247484157&idx=1&sn=8a7b4512586b1d70d719e9d04d701621&chksm=fcc481e6cbb308f0b58891fe0e738ea3ff0904b940f08f12e649fe8932eb3cc639f911112f18&token=515887516&lang=zh_CN#rd
WenJieLi1998 commentedon Apr 19, 2020
一个路径参数使用“:”,可以通过this.$route.params获取
路径中有查询参数,可以通过this.$route.query获取