「已注销」 2021-09-26 11:53 采纳率: 87.5%
浏览 17
已结题

怎么让登录进去默认显示indexKG页面?


const ter =  new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/index',
      component:()=>import('@/components/index/index.vue'),
      children:[
        {
          path: '/indexKG',
          name: 'IndexKG',
          component:()=>import('@/components/indexKG/indexKG.vue')
        },
          ]
        },
        {
          path: '/consumption',
          name: 'Consumption',
          component: consumption,
        },
        {
          path: '/comprehensive',
          name: 'Comprehensive',
          component: comprehensive
        },
        {
          path: '/fault',
          name: 'Fault',
          component: fault
        },
        {
          path: '/workorder',
          name: 'Workorder',
          component: workorder
        },
        {
          path: '/system',
          name: 'System',
          component: system
        },
      ]
    },
  ]
})

img

  • 写回答

1条回答 默认 最新

  • 永远不会太晚 2021-09-26 13:11
    关注

    img


    这里 加个redirect: '/indexKG‘

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 10月4日
  • 已采纳回答 9月26日
  • 创建了问题 9月26日

悬赏问题

  • ¥15 jetson nano
  • ¥15 :app:debugCompileClasspath'.
  • ¥15 windows c++内嵌qt出现数据转换问题。
  • ¥20 公众号如何实现点击超链接后自动发送文字
  • ¥15 用php隐藏类名和增加类名
  • ¥15 算法设计与分析课程的提问
  • ¥15 用MATLAB汇总拟合图
  • ¥15 智能除草机器人方案设计
  • ¥15 对接wps协作接口实现消息发送
  • ¥15 SQLite 出现“Database is locked” 如何解决?