feat: 增加多级菜单示例

This commit is contained in:
zclzone 2022-11-24 18:16:37 +08:00
parent 67b11f04fc
commit 4c1c77821f
7 changed files with 108 additions and 0 deletions

View File

@ -0,0 +1,3 @@
<template>
<div>a-1-1</div>
</template>

View File

@ -0,0 +1,3 @@
<template>
<div>a-1-2</div>
</template>

View File

@ -0,0 +1,8 @@
<template>
<CommonPage>
<div>a-1</div>
<div pl-20>
<RouterView />
</div>
</CommonPage>
</template>

View File

@ -0,0 +1,3 @@
<template>
<div>a-2-1</div>
</template>

View File

@ -0,0 +1,8 @@
<template>
<CommonPage>
<div>a-2</div>
<div pl-20>
<RouterView />
</div>
</CommonPage>
</template>

View File

@ -0,0 +1,8 @@
<template>
<CommonPage>
<div>a</div>
<div pl-20>
<RouterView />
</div>
</CommonPage>
</template>

View File

@ -0,0 +1,75 @@
const Layout = () => import('@/layout/index.vue')
export default {
name: 'MultipleMenu',
path: '/multi-menu',
component: Layout,
meta: {
title: '多级菜单',
icon: 'ic:baseline-menu',
role: ['admin'],
requireAuth: true,
order: 4,
},
children: [
{
name: 'a-1',
path: 'multiple-menu',
component: () => import('./a-1/index.vue'),
meta: {
title: 'a-1',
icon: 'ic:baseline-menu',
role: ['admin'],
requireAuth: true,
},
children: [
{
name: 'a-1-1',
path: 'a-1-1',
component: () => import('./a-1/a-1-1/index.vue'),
meta: {
title: 'a-1-1',
icon: 'ic:baseline-menu',
role: ['admin'],
requireAuth: true,
},
},
{
name: 'a-1-2',
path: 'a-1-2',
component: () => import('./a-1/a-1-2/index.vue'),
meta: {
title: 'a-1-2',
icon: 'ic:baseline-menu',
role: ['admin'],
requireAuth: true,
},
},
],
},
{
name: 'a-2',
path: 'a-2',
component: () => import('./a-2/index.vue'),
meta: {
title: 'a-2',
icon: 'ic:baseline-menu',
role: ['admin'],
requireAuth: true,
},
children: [
{
name: 'a-2-1',
path: 'a-2-1',
component: () => import('./a-2/a-2-1/index.vue'),
meta: {
title: 'a-2-1单个子菜单',
icon: 'ic:baseline-menu',
role: ['admin'],
requireAuth: true,
},
},
],
},
],
}