diff --git a/package.json b/package.json index b52dafb..a012321 100644 --- a/package.json +++ b/package.json @@ -92,4 +92,4 @@ "engines": { "node": ">=16.0.0" } -} +} \ No newline at end of file diff --git a/src/utils/route/index.ts b/src/utils/route/index.ts index 693c662..aba0279 100644 --- a/src/utils/route/index.ts +++ b/src/utils/route/index.ts @@ -51,7 +51,7 @@ function asyncImportRoute(routes: RouteItem[] | undefined) { } else if (name) { item.component = PARENT_LAYOUT(); } - if (item.meta.icon) item.meta.icon = await getMenuIcon(item.meta.icon); + if (item.meta.icon) item.meta.icon = (await getMenuIcon(item.meta.icon)).value; // eslint-disable-next-line no-unused-expressions children && asyncImportRoute(children); @@ -102,7 +102,7 @@ export function transformObjectToRoute(routeList: RouteItem[]): T } // eslint-disable-next-line no-unused-expressions route.children && asyncImportRoute(route.children); - if (route.meta.icon) route.meta.icon = await getMenuIcon(route.meta.icon); + if (route.meta.icon) route.meta.icon = (await getMenuIcon(route.meta.icon)).value; }); return [PAGE_NOT_FOUND_ROUTE, ...routeList] as unknown as T[];