多租户 前后端分离 怎么获取路由传值
alertLabel (row) {
// 组装路由名称, 并判断是否已添加, 如是: 则直接跳转
var routeName = `${this.$route.name}__${row.id}`
var route = window.SITE_CONFIG['dynamicRoutes'].filter(item => item.name === routeName)[0]
if (route) {
return this.$router.push({ name: routeName, params: { 'pid': row.id } })
}
// 否则: 添加并全局变量保存, 再跳转
route = {
path: routeName,
component: () => import(`@/views/modules/cube/cubeproductlabel`),
name: routeName,
meta: {
...window.SITE_CONFIG['contentTabDefault'],
menuId: this.$route.meta.menuId,
// title: `${this.$route.meta.title} - ${row.dictType}`
title: '商品标签'
}
}
this.$router.addRoutes([
{
...moduleRoutes,
name: `main-dynamic__${route.name}`,
children: [route]
}
])
window.SITE_CONFIG['dynamicRoutes'].push(route)
this.$router.push({ name: route.name, params: { 'a': row.id } })
}
问题:此处值怎么在跳转页面获取到,并且跳转的页面直接获取这个值进行查询动作
this.$router.push({ name: route.name, params: { 'a': row.id } })