第六章 【前端】页面布局 > 左侧区域(6.3.2)——左侧菜单
const SubMenu = defineAsyncComponent(() => import('@/layout/layoutAside/menu/'));
// 菜单数组:后边会根据后端返回数据,赋值给下面数组
let menus = reactive([
{
path: '/home',
component: 'Layout',
name: 'home',
meta: {
title: '首页',
icon: 'i-ep-home-filled',
},
},
{
path: '/system',
component: 'Layout',
name: 'system',
meta: {
title: '系统管理',
icon: 'i-ep-setting',
},
children: [
{
path: '/system/menu',
component: '/system/menu',
name: 'menuList',
meta: {
title: '菜单管理',
icon: 'i-ep-menu',
},
},
{
path: '/system/role',
component: '/system/role',
name: 'roleList',
meta: {
title: '角色管理',
icon: 'i-carbon-user-role',
},
},
{
path: '/system/user',
component: '/system/user',
name: 'user',
meta: {
title: '用户管理',
icon: 'i-ep-user',
},
},
],
},
{
path: '/goods',
component: 'Layout',
name: 'goods',
meta: {
title: '商品管理',
icon: 'i-ep-goods',
},
children: [
{
path: '/goods/goods',
component: '/goods/goods',
name: 'goods',
meta: {
title: '商品列表',
icon: 'i-ep-memo',
},
},
{
path: '/goods/category',
component: '/goods/category',
name: 'goodsCategory',
meta: {
title: '商品分类',
icon: 'i-ep-grid',
},
},
],
},
{
path: '/link',
component: '/link',
name: 'link',
meta: {
title: '百度一下',
icon: 'i-ep-link',
},
},
]);