-
Notifications
You must be signed in to change notification settings - Fork 3
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
hx-antd #15
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
None yet
0 participants
hx-antd
项目中在按需加载 ant-design(MIT License)组件时发现:引入组件的同时会连带引入 Ant Design 核心样式模块中的一些全局样式(源码-核心样式入口)。因此会对我们项目本身设定的一些浏览器重置样式及全局公有样式存在覆盖,导致一些样式、交互表现异常。
为解决底层样式冲突问题,我们 fork 了 Ant Design v2.13.4,对源码做了部分更改(删除了部分 CSS Reset),并在 NPM 上发布了 hx-antd。后续遇到类似自定制问题可以 clone 该项目修改代码后重新发布到 NPM。
hx-antd 用例
加入项目依赖:
引入 hx-antd 组件:
本地开发 hx-antd 流程
npm i --registry https://r.cnpmjs.org/
安装依赖 node 包/components
下package.json
版本号npm run pub
进行发布 NPM 前的 Less、JS 预编译,会生成/es
,/lib
,/dist
目录用于后续正式发布npm login
登录 NPMnpm publish
正式发布 NPM 包特别注意
Ant Design 组件核心基础样式使用怪异盒模型
box-sizing: border-box;
。因此使用 Ant Design 的项目normaleze.css
需要添加以下 CSS:并且项目 CSS 盒模型应以
border-box
为基准进行样式开发。关注更新信息
详见 GitHub hx-ant-design 及 NPM hx-antd 关注更新信息
关于 NPM 发布
The text was updated successfully, but these errors were encountered: