需要独立使集成Antd Pro 组件

官方默认业务组件会发布到 npm 的 ant-design-pro 上

所以只需要:

npm install ant-design-pro@latest --save
import 'ant-design-pro/dist/ant-design-pro.css'; // 统一引入样式

然后你就可以像使用 Ant Design 组件一样调用 pro 组件了。

import Result from 'ant-design-pro/lib/Result';

ReactDOM.render(<Result type="success" />, mountNode);

注意,pro 组件默认依赖于 [email protected],需要保证 antd 版本的一致性。

猜你喜欢

转载自www.cnblogs.com/nhz-M/p/10625047.html