fix: 修复启动时异常跳转问题,更新sql文件

This commit is contained in:
AN
2025-05-16 11:34:13 +08:00
parent 3b709f1e0a
commit 9245cc15ce
2 changed files with 7 additions and 7 deletions

View File

@ -5,7 +5,7 @@ import { useBoolean } from '@sa/hooks';
import type { CustomRoute, ElegantConstRoute, LastLevelRouteKey, RouteKey, RouteMap } from '@elegant-router/types';
import { router } from '@/router';
import { fetchGetRoutes } from '@/service/api';
import { humpToLine } from '@/utils/common';
import { humpToLine, isNotNull } from '@/utils/common';
import { SetupStoreId } from '@/enum';
import { createDynamicRoutes, createStaticRoutes, getAuthVueRoutes } from '@/router/routes';
import { ROOT_ROUTE } from '@/router/routes/builtin';
@ -121,10 +121,11 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
route.meta.keepAlive = !route.meta.noCache;
if (isFramePage) {
if (route.meta.link) {
if (isNotNull(route.meta.link)) {
route.meta.href = String(route.meta.link);
route.path = '';
route.name = Math.random().toString(36).slice(2, 12);
const random = Math.random().toString(36).slice(2, 12);
route.path = `/${random}`;
route.name = random;
} else {
route.props = {
// @ts-expect-error no query field