Vue页面跳转

1.添加点击按钮

跳转页面

2.添加跳转方法

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

vue点击按钮实现跳转到另一个vue页面_vue点击按钮跳转到另一个页面_ChangYan.的博客-CSDN博客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/SysUserDuhang',
        name: 'Newfilter',
        hidden: true,
        component: () => import('@/views/operateBackstage/partnerManagement/newfilter/SysUserDuhang'),
        meta: { title: 'navRoute.newfilter', roles: ['user'] }
      },
      { path: '*', redirect: 'partnerManagement/partnerList', hidden: true }
    ]
  },

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

你可能感兴趣的:(vue.js,前端,javascript)