其他分享
首页 > 其他分享> > this.$router.push();携带参数跳转页面

this.$router.push();携带参数跳转页面

作者:互联网

1.在 router 文件夹下的index.js 中加入 跳转配置信息 

   1.1   新增&修改共用一个页面

{
path: '/biz/capitalSupervision',
component: Layout,
hidden: true,
children: [
{
path: 'add/:contractId',
component: (resolve) => require(['@/views/biz/capitalSupervision/add'], resolve),
name: 'capitalSupervisionAdd',
meta: { title: '资金监管新增' }
},
{
path: 'update/:capitalSupervisionId',
component: (resolve) => require(['@/views/biz/capitalSupervision/add'], resolve),
name: 'capitalSupervisionUpdate',
meta: { title: '资金监管修改' }
}
]
},
1.2 单个页面
{
path: '/job',
component: Layout,
hidden: true,
children: [
{
path: 'log',
component: (resolve) => require(['@/views/monitor/job/log'], resolve),
name: 'JobLog',
meta: { title: '调度日志' }
}
]
},

2.在跳转方法中添加跳转信息
this.$router.push('/biz/capitalSupervision/update/' +  row.id)

3.跳转至页面获取携带参数
let contractId = this.$route.params.contractId

标签:resolve,capitalSupervision,跳转,component,biz,path,push,router
来源: https://www.cnblogs.com/wei6/p/16554992.html