vue+element tabs选项卡分页

文件目录:

vue+element tabs选项卡分页_第1张图片

功能展示:

vue+element tabs选项卡分页_第2张图片

vue+element tabs选项卡分页_第3张图片

路由配置:

{
    path: '/account',
    component: ()=> import('../components/home/home.vue'),   //布局页面
    redirect: '/account/all-account/list',  //定向到list路径
    name: '账号管理',
    children: [
      {
        path: '/account/all-account/list',
        redirect: '/account/all-account/staff',  //定向到staff路径
        name: '员工管理',
        component: () => import('../components/view/account/index.vue'),
        children: [
          {
            path: '/account/all-account/staff',
            component: () => import('../components/view/account/account.vue'),
            hidden: true
          },
          {
            path: '/account/all-account/agent',
            name: '代理人账号',
            component: () => import('../components/view/account/agent.vue'),
            hidden: true
          },
          {
            path: '/account/all-account/department',
            name: '部门设置',
            component: () => import('../components/view/account/department.vue'),
            hidden: true
          },
          {
            path: '/account/all-account/role',
            name: '角色权限设置',
            component: () => import('../components/view/account/role.vue'),
            hidden: true
          },
          {
            path: '/account/all-account/city',
            name: '城市管理',
            component: () => import('../components/view/account/city.vue'),
            hidden: true
          },
        ]
      },
}

组件代码:

index.vue


account.vue






其他tabs分页的组件:

staff.vue  其他类似





 

你可能感兴趣的:(Vue,案例)