Skip to content

🐛 [BUG]使用qiankun微前端时,已进入其中一个子系统时,点击父级菜单,切换父级路由到另一个子系统的页面会报错Uncaught Error: Iframe has not been created yet. #11441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Lss0332 opened this issue Mar 7, 2025 · 0 comments

Comments

@Lss0332
Copy link

Lss0332 commented Mar 7, 2025

🐛 bug 描述

版本:
"name": "ant-design-pro",
"version": "6.0.0",
"@umijs/max": "^4.1.1",

主系统配置
// config\config.ts
mfsu: false,
qiankun: {
master: {
apps: [
{
name: 'syMGSystem', // 微应用唯一标识
entry: '//localhost:8097', // 子应用入口地址(开发环境)
// activeRule: '/sub-app1', // 激活路由规则
// props: { routerBase: '/test1' }, // 传递路由基地址给子应用
activeRule: '/syMGSystem',
},
{
name: 'reportMGSystem', // 微应用唯一标识
entry: '//localhost:8096', // 子应用入口地址(开发环境)
}
],
sandbox: false,
prefetch: true,
}
}
//src\pages\SystemPage.tsx
import { useModel } from '@umijs/max';
import React from 'react';
import { MicroApp, MicroAppWithMemoHistory } from 'umi';

const syMGSystem: React.FC = () => {
return (
<>

</>
);
};

export default syMGSystem;

//src\pages\ReportMGPage.tsx
import { PageContainer } from '@ant-design/pro-components';
import { useModel } from '@umijs/max';
import React from 'react';
import { MicroApp, MicroAppWithMemoHistory } from 'umi';

const reportMGSystem: React.FC = () => {
return (
<>

</>
);
};

export default reportMGSystem;

reportMGSystem、syMGSystem子系统配置
// config\config.ts
qiankun: {
slave: {},
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant