chore: update deps
This commit is contained in:
@@ -49,7 +49,7 @@ describe('generatorMenus', () => {
|
||||
badgeVariants: undefined,
|
||||
icon: 'home-icon',
|
||||
name: '首页',
|
||||
orderNo: undefined,
|
||||
order: undefined,
|
||||
parent: undefined,
|
||||
parents: undefined,
|
||||
path: '/home',
|
||||
@@ -61,7 +61,7 @@ describe('generatorMenus', () => {
|
||||
badgeVariants: undefined,
|
||||
icon: 'about-icon',
|
||||
name: '关于',
|
||||
orderNo: undefined,
|
||||
order: undefined,
|
||||
parent: undefined,
|
||||
parents: undefined,
|
||||
path: '/about',
|
||||
@@ -76,7 +76,7 @@ describe('generatorMenus', () => {
|
||||
it('includes additional meta properties in menu items', async () => {
|
||||
const mockRoutesWithMeta = [
|
||||
{
|
||||
meta: { icon: 'user-icon', orderNo: 1, title: 'Profile' },
|
||||
meta: { icon: 'user-icon', order: 1, title: 'Profile' },
|
||||
name: 'profile',
|
||||
path: '/profile',
|
||||
},
|
||||
@@ -90,7 +90,7 @@ describe('generatorMenus', () => {
|
||||
badgeVariants: undefined,
|
||||
icon: 'user-icon',
|
||||
name: 'Profile',
|
||||
orderNo: 1,
|
||||
order: 1,
|
||||
parent: undefined,
|
||||
parents: undefined,
|
||||
path: '/profile',
|
||||
@@ -116,7 +116,7 @@ describe('generatorMenus', () => {
|
||||
badgeVariants: undefined,
|
||||
icon: 'details-icon',
|
||||
name: 'User Details',
|
||||
orderNo: undefined,
|
||||
order: undefined,
|
||||
parent: undefined,
|
||||
parents: undefined,
|
||||
path: '/users/:userId',
|
||||
@@ -151,7 +151,7 @@ describe('generatorMenus', () => {
|
||||
badgeVariants: undefined,
|
||||
icon: undefined,
|
||||
name: 'redirectedRoute',
|
||||
orderNo: undefined,
|
||||
order: undefined,
|
||||
parent: undefined,
|
||||
parents: undefined,
|
||||
path: '/old-path',
|
||||
@@ -163,7 +163,7 @@ describe('generatorMenus', () => {
|
||||
badgeVariants: undefined,
|
||||
icon: 'path-icon',
|
||||
name: 'New Path',
|
||||
orderNo: undefined,
|
||||
order: undefined,
|
||||
parent: undefined,
|
||||
parents: undefined,
|
||||
path: '/new-path',
|
||||
@@ -174,12 +174,12 @@ describe('generatorMenus', () => {
|
||||
|
||||
const routes: any = [
|
||||
{
|
||||
meta: { orderNo: 2, title: 'Home' },
|
||||
meta: { order: 2, title: 'Home' },
|
||||
name: 'home',
|
||||
path: '/',
|
||||
},
|
||||
{
|
||||
meta: { orderNo: 1, title: 'About' },
|
||||
meta: { order: 1, title: 'About' },
|
||||
name: 'about',
|
||||
path: '/about',
|
||||
},
|
||||
@@ -199,7 +199,7 @@ describe('generatorMenus', () => {
|
||||
badgeVariants: undefined,
|
||||
icon: undefined,
|
||||
name: 'About',
|
||||
orderNo: 1,
|
||||
order: 1,
|
||||
parent: undefined,
|
||||
parents: undefined,
|
||||
path: '/about',
|
||||
@@ -211,7 +211,7 @@ describe('generatorMenus', () => {
|
||||
badgeVariants: undefined,
|
||||
icon: undefined,
|
||||
name: 'Home',
|
||||
orderNo: 2,
|
||||
order: 2,
|
||||
parent: undefined,
|
||||
parents: undefined,
|
||||
path: '/',
|
||||
|
@@ -30,7 +30,7 @@ async function generatorMenus(
|
||||
badgeVariants,
|
||||
hideChildrenInMenu = false,
|
||||
icon,
|
||||
orderNo,
|
||||
order,
|
||||
target,
|
||||
title = '',
|
||||
} = meta || {};
|
||||
@@ -57,7 +57,7 @@ async function generatorMenus(
|
||||
badgeVariants,
|
||||
icon,
|
||||
name,
|
||||
orderNo,
|
||||
order,
|
||||
parent: route.parent,
|
||||
parents: route.parents,
|
||||
path: resultPath as string,
|
||||
@@ -66,7 +66,7 @@ async function generatorMenus(
|
||||
});
|
||||
|
||||
// 对菜单进行排序
|
||||
menus = menus.sort((a, b) => (a.orderNo || 999) - (b.orderNo || 999));
|
||||
menus = menus.sort((a, b) => (a.order || 999) - (b.order || 999));
|
||||
return menus;
|
||||
}
|
||||
|
||||
|
@@ -4,5 +4,6 @@
|
||||
"compilerOptions": {
|
||||
"types": ["@vben-core/typings/vue-router"]
|
||||
},
|
||||
"include": ["src"]
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
Reference in New Issue
Block a user