![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
router
学后端的小萝卜头
全网最全java笔记,全网最全mysql笔记,0基础和大家一起学后端,记录学后端的过程和笔记,跟着我学后端。。。
展开
-
this.$route.query和this.$route.params的正确使用
1.this.$route.query的使用(1)、传参数:this.$router.push({ path: '/checkout', query:{ productId:id, }})(2)、获取参数:this.$route.query.productId(3)、在url中形式(url中带参数)http://xxx/#/goodsDetails?productId=150642571432849(原创 2021-02-01 15:32:42 · 25117 阅读 · 1 评论 -
this.$router.push路由跳转页面传参
vue-cli项目中this.$router.push传参的各种方式和接受参数1、必须在router/index.js中配置// An highlighted blockVue.use(Router)export default new Router({routes: [ { path: '/', component: Index, name: 'index', redirect: '/home', children: [原创 2021-01-22 14:36:00 · 1636 阅读 · 0 评论