Vue页面跳转
(根据自己文件路径进行调整)
·
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 }
]
},
更多推荐
已为社区贡献2条内容
所有评论(0)