/* keepAlive动态页面缓存: 路由文件的父级列表页,meta对象添加:(布尔类型)keepAlive: true 路由文件的子级详情页,meta对象添加:(数组)parentNode: [列表的name](父级列表页的name必须与对应.vue文件的name一致,且唯一) */ // 显示在菜单中 export const menuRouter =[ { id: 0, name: 'goods', path: '/goods', meta: { title: '商品管理', icon: 'icon-shangpinguanli', keepAlive:true}, component: () => import('@/pages/goods/index.vue'), }, { id: 1, name: 'qualification', path: '/qualification', meta: { title: '类目管理', icon: 'icon-zizhiguanli', keepAlive:true}, component: () => import('@/pages/qualification/index.vue'), }, { id: 2, name: 'brand', path: '/brand', meta: { title: '品牌管理', icon: 'icon-pinpai', keepAlive:true}, component: () => import('@/pages/brand/index.vue'), }, ] // 不显示在菜单中的路由 export const otherRouter = [ { name: 'login', path: '/', meta: { title: '登录' }, component: () => import('@/pages/login/index.vue'), }, { name: 'addGoods', path: '/goods/addGoods', meta: { title: '商品信息' , keepAlive:true}, component: () => import('@/pages/goods/addGoods/index.vue'), }, { name: 'goodsDetail', path: '/goods/goodsDetail', meta: { title: '商品详情' ,keepAlive:true}, component: () => import('@/pages/goods/goodsDetail/index.vue'), }, { name: 'addCategory', path: '/qualification/addCategory', meta: { title: '类目申请' ,keepAlive:true}, component: () => import('@/pages/qualification/addCategory/index.vue'), }, { name: 'categoryDetail', path: '/qualification/categoryDetail', meta: { title: '类目详情' ,keepAlive:true}, component: () => import('@/pages/qualification/categoryDetail/index.vue'), }, { name: 'addBrand', path: '/brand/addBrand', meta: { title: '品牌申请' ,keepAlive:true}, component: () => import('@/pages/brand/addBrand/index.vue'), }, { name: 'brandDetail', path: '/brand/brandDetail', meta: { title: '品牌详情' ,keepAlive:true}, component: () => import('@/pages/brand/brandDetail/index.vue'), }, ]