mirror of
https://github.com/jeecgboot/jeecg-boot.git
synced 2025-09-28 02:47:50 +00:00
解决bug:ai大模型-ai应用管理-配置菜单后404 #8111
This commit is contained in:
@@ -16,6 +16,7 @@ import { setupGlobDirectives } from '/@/directives';
|
||||
import { setupI18n } from '/@/locales/setupI18n';
|
||||
import { registerGlobComp } from '/@/components/registerGlobComp';
|
||||
import { registerThirdComp } from '/@/settings/registerThirdComp';
|
||||
import { registerSuper } from '/@/views/super/registerSuper';
|
||||
import { useSso } from '/@/hooks/web/useSso';
|
||||
import { checkIsQiankunMicro } from "/@/qiankun/micro";
|
||||
import { autoUseQiankunMicro } from "/@/qiankun/micro/qiankunMicro";
|
||||
@@ -70,6 +71,9 @@ async function bootstrap(props?: MainAppProps) {
|
||||
//CAS单点登录
|
||||
await useSso().ssoLogin();
|
||||
|
||||
// 注册super应用路由
|
||||
await registerSuper(app);
|
||||
|
||||
// 配置路由
|
||||
setupRouter(app);
|
||||
|
||||
|
16
jeecgboot-vue3/src/views/super/registerSuper.ts
Normal file
16
jeecgboot-vue3/src/views/super/registerSuper.ts
Normal 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 函数,无法完成注册!`);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user