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

第一步

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

修改登录页

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',
}
相关推荐
m0_6996595614 分钟前
QT知识点复习
开发语言·qt
南玖yy17 分钟前
C语言:数组的介绍与使用
c语言·开发语言·算法
米码收割机31 分钟前
【python】tkinter实现音乐播放器(源码+音频文件)【独一无二】
开发语言·python·pygame
yashunan39 分钟前
Web_php_unserialize
android·前端·php
笛柳戏初雪1 小时前
Python中的函数(下)
开发语言·python
m0_zj1 小时前
17.[前端开发]Day17-形变-动画-vertical-align
前端·css·chrome·html·html5
美味小鱼1 小时前
初识Cargo:Rust的强大构建工具与包管理器
开发语言·rust·cargo
c-c-developer1 小时前
C++ Primer 标准库类型string
开发语言·c++
山茶花开时。1 小时前
[SAP ABAP] Debug Skill
开发语言·sap·abap
Edward-tan1 小时前
【玩转全栈】--创建一个自己的vue项目
前端·javascript·vue.js