【去除若依首页】有些小项目不需要首页,去除方法

第一步

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

修改登录页

Login.vue 中 大概144行 ,注释掉原有跳转。替换为自己的跳转路径

//

//

//

//

//

//

//

//

//

//

//

//

复制代码
  // this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
  this.$router.push({ path: "/xxx/xxx" || "/" }).catch(()=>{});

第二步

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

修改router/index.js 路由跳转

注释掉原有 / 跳转,路由重定向到想要的路径

修改router/index.js 路由跳转

注释掉原有 / 跳转,路由重定向到想要的路径

复制代码
//   {
//   path: '', component: Layout, redirect: 'index', children: [{
//     path: 'index',
//     component: () => import('@/views/index.vue'),
//     name: 'Index',
//     meta: {title: '首页大屏', icon: 'dashboard', affix: true}
//   }]
// }

// 增加下方两个路由路径

{
  path: '', component: Layout, redirect: '/xxx/xxx',
}, {
  path: '/index', component: Layout, redirect: '/xxx/xxx',
}
相关推荐
泽02023 分钟前
C++之STL--list
开发语言·c++·list
用户5806139393004 分钟前
前端文件下载实现深度解析:Blob与ObjectURL的完美协作
前端
YGGP6 分钟前
吃透 Golang 基础:数据结构之 Map
开发语言·数据结构·golang
Lin86667 分钟前
Vue 3 + TypeScript 组件类型推断失败问题完整解决方案
前端
coding随想7 分钟前
从零开始:前端开发者的SEO优化入门与实战
前端
~plus~8 分钟前
Harmony核心:动态方法修补与.NET游戏Mod开发
开发语言·jvm·经验分享·后端·程序人生·c#
前端工作日常10 分钟前
我理解的JSBridge
前端
Au_ust10 分钟前
前端模块化
前端
顺丰同城前端技术团队10 分钟前
还不会用 Charles?最后一遍了啊!
前端
BUG收容所所长12 分钟前
二分查找的「左右为难」:如何优雅地找到数组中元素的首尾位置
前端·javascript·算法