第一种query方式传参数
this.$router.push({
path: '/message/QRcode',
query:{id:'123',name:'章三'}
})
第二种通过地址栏方式传参
this.$router.push(`/message/QRcode?id=${row.id}&name=${row.name}`)
第三种也是通过地址栏传参
const params = row.id ? row.id : null
path: "/messageQuery/informationRecord?params=" + params,
打开新页面并带上参数
// 第一种
window.open(`${window.location.origin}/caleader`, '_blank')
// 第二种
const routeData = this.$router.resolve({
path: '/caleader',
query: {
id: '11'
}
})
window.open(routeData.href, '_blank')