mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-11-10 07:28:24 +08:00
chore: add 3rd layer menu demo (#165)
* chore: add 3rd layer menu demo * chore: fix typescript version
This commit is contained in:
parent
bc373cc7dc
commit
2f8dd15c85
|
@ -59,7 +59,7 @@
|
|||
"stylelint-config-prettier": "^9.0.3",
|
||||
"stylelint-less": "^1.0.1",
|
||||
"stylelint-order": "^4.1.0",
|
||||
"typescript": "^4.4.3",
|
||||
"typescript": "~4.4.3",
|
||||
"vite": "^2.7.1",
|
||||
"vite-plugin-mock": "^2.9.6",
|
||||
"vite-svg-loader": "^3.1.0",
|
||||
|
|
10
src/pages/nest-menu/Index.vue
Normal file
10
src/pages/nest-menu/Index.vue
Normal file
|
@ -0,0 +1,10 @@
|
|||
<template>
|
||||
<div>
|
||||
<div>三级菜单页面</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'NestMenu',
|
||||
};
|
||||
</script>
|
|
@ -30,7 +30,7 @@ const defaultRouterList: Array<RouteRecordRaw> = [
|
|||
|
||||
export const allRoutes = [...defaultRouterList, ...asyncRouterList];
|
||||
|
||||
export const getActive = (maxLevel = 2): string => {
|
||||
export const getActive = (maxLevel = 3): string => {
|
||||
const route = useRoute();
|
||||
if (!route.path) {
|
||||
return '';
|
||||
|
|
|
@ -31,4 +31,26 @@ export default [
|
|||
},
|
||||
],
|
||||
},
|
||||
// 三级菜单配置
|
||||
// {
|
||||
// path: '/menu',
|
||||
// name: 'menu',
|
||||
// component: Layout,
|
||||
// meta: { title: '一级菜单', icon: 'menu-fold' },
|
||||
// children: [
|
||||
// {
|
||||
// path: 'second',
|
||||
// meta: { title: '二级菜单' },
|
||||
// component: () => import('@/layouts/blank.vue'),
|
||||
// children: [
|
||||
// {
|
||||
// path: 'third',
|
||||
// name: 'NestMenu',
|
||||
// component: () => import('@/pages/nest-menu/index.vue'),
|
||||
// meta: { title: '三级菜单' },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue
Block a user