利用antd-pro使用umi的qiankun插件做微前端,子应用如何使用主应用的组件, 看下面的代码:使用的原生的button传到子应用可以使用,但是使用antd的Button传递过去使用就会报错,凡是用的antd的组件都不行 #8750
sunlianglife
started this conversation in
General
Replies: 1 comment
-
由于缺乏足够的信息,请提供 最小重现 的 demo 帮助排查问题。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
// app.tsx
export const useQiankunStateForSlave = () => ({
MainButton: (props: any) => <MainButton {...props} />,
mainData: {
aa: 11,
},
});
// MainButton 组件
export default (props: any) => {
return (
<Button {...props} style={{ minWidth: 80, ...props?.style }}>
{props?.children}
);
};
Beta Was this translation helpful? Give feedback.
All reactions