import * as vueRouter from 'vue-router';

// 导入页面
import login from '../view/login/index.vue';
import home from '../view/home/index.vue';

export default vueRouter.createRouter({
  history: vueRouter.createWebHashHistory(),
  routes: [
    {
      path: '/',
      component: login,
    },
    {
      path: '/home',
      component: home,
      meta: {
        title: '首页',
      },
      children: [
        {
          path: 'personnelMatters',
          meta: {
            title: '人员管理',
          },
          children: [
            {
              path: '',
              component: () =>
                import('../view/system/index.vue'),
            },
            {
              path: 'user',
              component: () => import('../view/user/index.vue'),
            }
          ],
        },
      ],
    },
  ],
});
