1、事件方法
<span style="color: #06d" @click="customInfo(scope.row)">
<a>{{ scope.row.name }}</a>
</span>
2、方法动态指定标签名称及路由跳转
/**跳转到详情页 */
customInfo(row) {
// 添加路由
this.$store.dispatch("tagsView/addView", {
meta: {
title: row.name,
},
name: row.name,
path: `/customization/data-custom/${row.name}`,
});
// 跳转路由
this.$router.push(`/customization/data-custom/${row.name}?taxNum=${row.taxNum}`);
}
3、静态路由配置
{
path: '/customization',
component: Layout, // 一级这个component: Layout必填,除非是不需要在页面容器里打开的页面
hidden: true, // false:显示在侧边栏菜单
redirect: 'noRedirect', // noRedirect:面包屑不可点击,不写这个,父级标题样式就和首页一样,黑字可点击跳转
permissions: ['system:user:edit'],
meta: { title: '客户管理' }, // 一级标题,写了才能显示在面包屑上
children: [
{
path: 'data-custom/:name',
component: () => import('@/views/customization/customs/data/custom'),
name: 'Custom',
meta: { title: '', activeMenu: '/customization/customs/data' }
}
]
},