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

第一步

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

修改登录页

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',
}
相关推荐
c++之路39 分钟前
CMake 系列教程(二):基础命令详解
开发语言·c++
南境十里·墨染春水5 小时前
C++ 工厂模式:从入门到进阶,彻底掌握对象创建的艺术
开发语言·c++·算法
yuanyxh5 小时前
Mac 软件推荐
前端·javascript·程序员
万少5 小时前
AtomCode开发微信小程序《谁去呀》 全流程
前端·javascript·后端
某人辛木5 小时前
Web自动化测试
前端·python·pycharm·pytest
Kagol6 小时前
Superpowers GSD gstack AgentSkills深度测评
前端·人工智能
JosieBook6 小时前
【数据库】时序预测能力的分级进化:TimechoAI如何让每一类用户都能精准预见未来
java·开发语言·数据库
加号36 小时前
【C#】 文件与目录管理:创建、删除操作的技术解析
开发语言·c#
excel6 小时前
JavaScript 字符串与模板字面量:从表象到本质理解
前端
diving deep7 小时前
脚本速览-python
开发语言·python