We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
基于 umi 以及 qiankun 插件搭建微前端主应用,想在主应用中维护一台整体的系统配置(例如主题色)。在 app.ts 中使用 useQiankunStateForSlave 初始化全局配置 globalConfig,然后在子应用中使用 useModel('@@qiankunStateFromMaster') 获取 globalConfig 值,然后进行相关 <ConfigProvider /> 配置。 初始化获取配置目前是满足的,但如果我想在运行时动态改变globalConfig,并且子应用能够进行相关的 update,并获取更新后的值,目前没有找到比较合适的方法,想确定下官方目前有没有比较好的解决思路,thanks。
umi
qiankun
app.ts
useQiankunStateForSlave
globalConfig
useModel('@@qiankunStateFromMaster')
<ConfigProvider />
not yet!
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
考虑在主应用给全局挂上:① 获取当前最新变量表的函数;② 注册 callback 的地方,用来回调下发。
然后在子应用初始化的时候注册一下 callback ,修改之后,触发所有 callback 下发最新的主题,可以把 antd 的 provider 什么的抽出来第三方包用,这些逻辑都 cover 住。
Sorry, something went wrong.
全局指的是在主应用 window上维护一套修改更新以及 callback 的逻辑么🤔️
No branches or pull requests
Background
基于
umi
以及qiankun
插件搭建微前端主应用,想在主应用中维护一台整体的系统配置(例如主题色)。在app.ts
中使用useQiankunStateForSlave
初始化全局配置globalConfig
,然后在子应用中使用useModel('@@qiankunStateFromMaster')
获取globalConfig
值,然后进行相关<ConfigProvider />
配置。初始化获取配置目前是满足的,但如果我想在运行时动态改变
globalConfig
,并且子应用能够进行相关的 update,并获取更新后的值,目前没有找到比较合适的方法,想确定下官方目前有没有比较好的解决思路,thanks。Proposal
not yet!
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: