chore: update deps

This commit is contained in:
vben
2024-06-02 23:46:18 +08:00
parent 6d4991d852
commit e650a0b863
52 changed files with 387 additions and 314 deletions

View File

@@ -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: '/',

View File

@@ -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;
}

View File

@@ -4,5 +4,6 @@
"compilerOptions": {
"types": ["@vben-core/typings/vue-router"]
},
"include": ["src"]
"include": ["src"],
"exclude": ["node_modules"]
}