feat: 增加多级菜单示例
This commit is contained in:
parent
67b11f04fc
commit
4c1c77821f
3
src/views/multi-menu/a-1/a-1-1/index.vue
Normal file
3
src/views/multi-menu/a-1/a-1-1/index.vue
Normal file
@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<div>a-1-1</div>
|
||||
</template>
|
3
src/views/multi-menu/a-1/a-1-2/index.vue
Normal file
3
src/views/multi-menu/a-1/a-1-2/index.vue
Normal file
@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<div>a-1-2</div>
|
||||
</template>
|
8
src/views/multi-menu/a-1/index.vue
Normal file
8
src/views/multi-menu/a-1/index.vue
Normal file
@ -0,0 +1,8 @@
|
||||
<template>
|
||||
<CommonPage>
|
||||
<div>a-1</div>
|
||||
<div pl-20>
|
||||
<RouterView />
|
||||
</div>
|
||||
</CommonPage>
|
||||
</template>
|
3
src/views/multi-menu/a-2/a-2-1/index.vue
Normal file
3
src/views/multi-menu/a-2/a-2-1/index.vue
Normal file
@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<div>a-2-1</div>
|
||||
</template>
|
8
src/views/multi-menu/a-2/index.vue
Normal file
8
src/views/multi-menu/a-2/index.vue
Normal file
@ -0,0 +1,8 @@
|
||||
<template>
|
||||
<CommonPage>
|
||||
<div>a-2</div>
|
||||
<div pl-20>
|
||||
<RouterView />
|
||||
</div>
|
||||
</CommonPage>
|
||||
</template>
|
8
src/views/multi-menu/index.vue
Normal file
8
src/views/multi-menu/index.vue
Normal file
@ -0,0 +1,8 @@
|
||||
<template>
|
||||
<CommonPage>
|
||||
<div>a</div>
|
||||
<div pl-20>
|
||||
<RouterView />
|
||||
</div>
|
||||
</CommonPage>
|
||||
</template>
|
75
src/views/multi-menu/route.js
Normal file
75
src/views/multi-menu/route.js
Normal 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,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
Loading…
Reference in New Issue
Block a user