解决bug:ai大模型-ai应用管理-配置菜单后404 #8111

This commit is contained in:
JEECG
2025-04-14 15:05:01 +08:00
parent 3e434ce6b4
commit 75aa1fe5a0
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,16 @@
import type { App } from 'vue';
/**
* 动态引入 super 下的组件
*/
export async function registerSuper(app: App) {
const modules = import.meta.glob('./**/register.ts');
for (let [url, module] of Object.entries(modules)) {
let { register } = await module();
if (typeof register === 'function') {
await register(app);
} else {
console.error(`${url} 没有导出 register 函数,无法完成注册!`);
}
}
}