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

第一步

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

修改登录页

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',
}
相关推荐
玉宇夕落1 分钟前
Vue3 + 流式输出学习
前端
努力成为AK大王3 分钟前
CSS 入门完整笔记
前端·css
库克克4 分钟前
【C++】类和对象--this指针详解
java·开发语言·c++
微笑挖矿10 分钟前
大模型流式渲染:为什么"逐字显示"远比你想的复杂
前端
大流星10 分钟前
LangChainJS之Chain链(四)
javascript·langchain
weedsfly11 分钟前
前端开发中的装饰器模式——给函数和组件“加壳”的艺术
前端·javascript·面试
zhedream11 分钟前
那个从没改过的页面,为什么突然坏了?
前端·vue.js
工业HMI实战笔记19 分钟前
HMI性能优化技巧:告别卡顿,打造流畅体验
前端·ui·性能优化·自动化·交互
JackieZhengChina20 分钟前
image-viewer-js 开源图片查看插件完整教程
开发语言·javascript·开源
QN1幻化引擎27 分钟前
Gravity-Anchored Cognitive Field Architecture: The DalinX V8/V10 Implementation
java·前端·算法