vue动态指定标签名

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' }
      }
    ]
  },

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值