子路由 嵌套 子路由

export default new Router({
  routes: [{
      path: '/',
      name: 'index',
      redirect: '/login'
    },
    {
      path: '/operator',
      name: 'operator',
      component: Index,
      meta: {
        title: '首页'
      },
      children: [{
          path: 'default',
          component: (resolve) => {
            require(['../view/operator/index'], resolve)
          },
          alias: '/operator',
          meta: {
            title: '首页'
          }
        },
        {
          path: "newlist",
          component: candidatelist,
          name: 'newlist',
          meta: {
            title: '列表'
          },
          children:[
            {
              path: "/operator/newlist/candidatedetail/:id",
              component: candidatedetail,
              name: 'candidatedetail',
              meta: {
                title: 详情'
              }
            },
          ]
        } 
      ]
    }
})

子路由嵌套子路由。
列表 下面的详情 ,想和列表在同一页面显示该怎么办?
在 列表页面使用 <router-view></router-view>的话就在同一页面显示了

阅读 1.8k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题