1.添加点击按钮

<el-button type="" style="margin-top: 15px;" @click="goToAnotherPage">跳转页面</el-button>

2.添加跳转方法

goToAnotherPage() {
        // 使用Vue Router进行页面跳转
        this.$router.push('/partnerManagement/newfilter/SysUser');
      },

3.在index.js添加路由信息代码

(根据自己文件路径进行调整)

{
    path: '/partnerManagement',
    component: Layout,
    name: 'Directory',
    meta: {
      title: 'Directory',
      icon: 'el-icon-s-cooperation'
    },
    redirect: '/partnerManagement/partnerList',
    children: [
      {
        path: '',
        name: 'Directory',
        component: () => import('@/views/operateBackstage/partnerManagement/partnerList'),
        meta: { title: 'navRoute.directory', icon: 'el-icon-s-cooperation', roles: ['user'] }
      },
      {
        path: 'newfilter/SysUser',
        name: 'Newfilter',
        hidden: true,
        component: () => import('@/views/operateBackstage/partnerManagement/newfilter/SysUser'),
        meta: { title: 'navRoute.newfilter', roles: ['user'] }
      },
      { path: '*', redirect: 'partnerManagement/partnerList', hidden: true }
    ]
  },

vue点击按钮实现跳转到另一个vue页面_vue点击按钮跳转到另一个页面_ChangYan.的博客-CSDN博客

Logo

前往低代码交流专区

更多推荐