mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-11-10 07:48:22 +08:00
fix: ts error (#652)
This commit is contained in:
parent
c650fb7ace
commit
3fbee5a9cb
|
@ -51,7 +51,7 @@ function asyncImportRoute(routes: RouteItem[] | undefined) {
|
||||||
} else if (name) {
|
} else if (name) {
|
||||||
item.component = PARENT_LAYOUT();
|
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
|
// eslint-disable-next-line no-unused-expressions
|
||||||
children && asyncImportRoute(children);
|
children && asyncImportRoute(children);
|
||||||
|
@ -102,7 +102,7 @@ export function transformObjectToRoute<T = RouteItem>(routeList: RouteItem[]): T
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line no-unused-expressions
|
// eslint-disable-next-line no-unused-expressions
|
||||||
route.children && asyncImportRoute(route.children);
|
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[];
|
return [PAGE_NOT_FOUND_ROUTE, ...routeList] as unknown as T[];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user