1.添加点击按钮
javascript
<el-button type="" style="margin-top: 15px;" @click="goToAnotherPage">跳转页面</el-button>
2.添加跳转方法
javascript
goToAnotherPage() {
// 使用Vue Router进行页面跳转
this.$router.push('/partnerManagement/newfilter/SysUserDuhang');
},
vue点击按钮实现跳转到另一个vue页面_vue点击按钮跳转到另一个页面_ChangYan.的博客-CSDN博客3.在index.js添加路由信息代码(根据自己文件路径进行调整)
javascript
{
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 }
]
},