01:在路由文件设置路由信息(index.js文件)
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
export default new Router({
// mode:history,
routes: [
{
path: '/',
name: 'HelloWorld',
hidden: true,
component: () => import('@/components/HelloWorld')//路由懒加载
},
{
path: '/Login',
name: 'Login',
hidden: true,
component: () => import('@/components/Login')
},
{
path: '*',
name: '404',
hidden: true,
component: () => import('@/components/404')
},
{
path: '/home',
name: '学生管理',
menuType:'1',
iconClass: 'fa fa-address-book-o',
// redirect: '/home/student',
component: () => import('@/components/home'),
children: [
{
path: '/home/student',
name: '学生列表',
menuType:'2',
component: () => import('@/components/student/StudentInfo')
},