第一步:permission.js中添加白名单
... const whiteList = ['/login', '/register'] // no redirect whitelist ...
第二步:router/index.js中添加路由组件
... { path: '/register', component: () => import('@/views/register/index'), hidden: true }, ...
.
第三步:编写组件页面
添加views/register/index.vue