vue-element-template实战(二)新增页面

1、修改router/index.js,新增路由

{
    path: '/test',
    component: Layout,
    redirect: '/test/test01',
    name: 'Test',
      alwaysShow: true,
    meta: { title: '系统管理', icon: 'example' },
    children: [
      {
        path: 'test01',
        name: 'Test01',
        component: () => import('@/views/test01/index'),
        meta: { title: '账号管理', icon: 'example' }
      }
    ]
  },

2、views下新建test/index.vue

完毕,最终效果图:

原文地址:https://www.cnblogs.com/windok/p/10890126.html