vue动态路由

import Vue from 'vue'
import Router from 'vue-router'
import layout from '../components/layout'
Vue.use(Router)
// 动态路由
export const asyncRouterMap = [
  {
    path: '/home',
    component: layout,
    name: 'home',
    meta: {
      title: '首页',
      icon: 'el-icon-tickets',
      roles: ['admin','user','people']
    },
  },
  {
    path: '/order',
    component: layout,
    name: 'order',
    meta: {
      title: '订单管理',
      icon:'el-icon-news',
      roles: ['admin','user']
    },
    children:[
      {
        path: 'edit',
        component: () => import('@/views/order/views/edit'),
        nam

你可能感兴趣的:(前端,vue.js,前端,javascript)