0.1.13 • Published 2 years ago
zc-sui v0.1.13
sui
若业务系统框架由 umi 搭建,参考以下
.babelrc
打包后,业务系统使用 antd 样式时,需要添加.babelrc
{
"plugins": [
[
"import",
{
"libraryName": "antd",
"libraryDirectory": "es",
"style": true
}
]
]
}
业务系统中需要在最外层的 less 中最顶部引用样式文件
@import '~antd/dist/antd.less';
业务系统中需要配置主题色
theme: { 'brand-primary': '#0DAEAF', 'primary-color': '#0DAEAF', 'link-color': '#0DAEAF', 'success-color': '#0DAEAF', 'font-size-base': '14px', 'border-radius-base': '2px', 'error-color': '#f9676f', },
若业务系统由 create-react-app 搭建,参考以下
可直接参考 antd 官网上的示例 如何引用 antd 样式
在引入 sui 后可能存在类型无效警告
在 typing.d.ts 里或新建 typing.d.ts 加入 declare module 'sui';