1、定义跳转按钮
<a-button class="button" @click="toMine()" type="normal" shape="circle" icon="user" size="large" />
2、跳转的方法
toMine: function () {
this.$router.push({ name: 'mine' })
}
3、路由:src/config/router.config.js文件中在基础路由中添加子路由
{
path: 'mine',
name: 'mine',
component: () => import('@/views/base/Mine')
},
5、 在允许跳转路由文件中添加此路由:src/permission.js
const allowList = ['login', 'register', 'registerResult','addMood','mine'] // no redirect allowList