diff --git a/jeecgboot-vue3/package.json b/jeecgboot-vue3/package.json index 2e0ccbc9a..6bf53916a 100644 --- a/jeecgboot-vue3/package.json +++ b/jeecgboot-vue3/package.json @@ -23,7 +23,7 @@ "husky:install": "husky install" }, "dependencies": { - "@jeecg/online": "3.9.1-beta", + "@jeecg/online": "3.9.1-RC", "@jeecg/aiflow":"3.9.1-beta", "@logicflow/core": "^2.0.10", "@logicflow/extension": "^2.0.14", diff --git a/jeecgboot-vue3/src/utils/monorepo/registerPackages.ts b/jeecgboot-vue3/src/utils/monorepo/registerPackages.ts index 8c38e1abc..68ec73235 100644 --- a/jeecgboot-vue3/src/utils/monorepo/registerPackages.ts +++ b/jeecgboot-vue3/src/utils/monorepo/registerPackages.ts @@ -20,34 +20,15 @@ export function registerPackages(app: App) { // 仅保存 app 实例,不立即加载模块 appInstance = app; app.component( - 'superQuery', - createAsyncComponent(() => { - return import('@jeecg/online').then(mod => { - const str = mod.default.install.toString(); - const importPaths = extractDynamicImportPaths(str); - return import(importPaths.find(path => path.includes('SuperQuery')) ?? importPaths[1]) - }); - }) + 'SuperQuery', + createAsyncComponent(() => import('@jeecg/online').then(mod => mod.SuperQuery)) ); app.component( 'JOnlineSearchSelect', - createAsyncComponent(() => { - return import('@jeecg/online').then(mod => { - const str = mod.default.install.toString(); - const importPaths = extractDynamicImportPaths(str); - debugger - return import(importPaths.find(path => path.includes('JOnlineSearchSelect')) ?? importPaths[0]) - }); - }) + createAsyncComponent(() => import('@jeecg/online').then(mod => mod.JOnlineSearchSelect)) ); } -function extractDynamicImportPaths(code: string): string[] { - // 匹配 import("...") / import('...'),保留括号内路径(包含 query 参数) - const matches = code.matchAll(/import\(\s*(['"])(.*?)\1\s*\)/g); - return Array.from(matches, (m) => m[2]).filter(Boolean); -} - /** 已加载的包缓存 */ const loadedPackages = new Map(); /** 正在加载的包 Promise 缓存(防止重复加载) */