1.2.0
2018-12-16
Synchronize with antd 3.10.x
- 🔥🔥🔥 replaced font icons with svg icons which bring benefits below::
- Complete offline usage of icon, no dependency of alipay cdn font icon file and no more empty square during downloading than no need to deploy icon font files locally either.
- Much more display accuracy in lower-level screens.
- Support multiple colors for icon.
- No need to change built-in icons with overriding styles by providing more props in component.
- 😓 But at the same time bring the problem that the bundle file is too big, related solutions and discussions can check the React version of ant-design issue.
- 🌟 Add the
theme
attribute to set the theme style of the icon. - 🌟 Added
component
attribute, you can externally pass a component to customize the control rendering result. - 🌟 The
twoToneColor
property is added to control the theme color of the two-color icon. - 🌟 Added static methods
Icon.getTowToneColor()
andIcon.setTwoToneColor(...)
to globally get and set the theme color of all two-color icons. - 🌟 The new static method
Icon.createFromIconfontCN({...})
is added to make it easier to use icons hosted oniconfont.cn
.
- 🔥 Added a new component
Skeleton
. - 🔥 Menu will automatically close up to fit width in
horizontal
mode. - 🔥 The
placement
of the drawer supportstop
andbottom
to accommodate more scenes. - 🌟 The following components add a
suffixIcon
prop, which is used to set the icon behind the input box. For details, please refer to the documentation.- Cascader
- DatePicker
- Select
- TreeSelect
- TimePicker
- 🌟 Added Modal.open for optional icon dialog.
- 🌟 Modal.info adds the configuration of
getContainer
. - 🌟 Improve RangePicker footer UI by merging them.
- 🌟 The Anchor component adds
onClick
property. - 🌟 The Tab component adds the
renderTabBar
property. - 🌟 The Input component adds the
select
method. - 🌟 Steps adds the
initial
attribute. - 🌟 Upload adds
openFileDialogOnClick
prop to allow setting whether to open the upload dialog when the component is clicked. - 🌟 InputNumber adds
decimalSeparator
prop to allow setting a custom decimal. - 🐞 Fix a lot of hidden bugs that have not yet been issued, and then not list them one by one.
与antd 3.10.x同步
- 🔥🔥🔥 使用了 svg 图标替换了原先的 font 图标,从而带来了以下优势:
- 可以离线化使用,不需要从支付宝 cdn 下载字体文件,图标不会因为网络问题呈现方块,也无需字体文件本地部署。
- 在低端设备上 svg 有更好的清晰度。
- 支持多色图标。
- 对于内建图标的更换可以提供更多 API,而不需要进行样式覆盖。
- 😓 但同时带来打包文件过大问题,相关解决方案和讨论可以查看 React 版 ant-design issue。
- 🌟 新增
theme
属性,可以设置图标的主题风格。 - 🌟 新增
component
属性,可以外部传入一个组件来自定义控制渲染结果。 - 🌟 新增
twoToneColor
属性,可以控制双色图标的主题色。 - 🌟 新增静态方法
Icon.getTowToneColor()
和Icon.setTwoToneColor(...)
,可以全局性的获取和设置所有双色图标的主题色。 - 🌟 新增静态方法
Icon.createFromIconfontCN({...})
,可以更加方便地使用iconfont.cn
上托管的图标。
- 🔥 增加了一个新组件
Skeleton
- 🔥 Menu 在
horizontal
模式下会自动收起来适应宽度。 - 🔥 Drawer 的
placement
支持top
和bottom
,可以适应更多场景。 - 🌟 以下组件均新增了
suffixIcon
属性,用于设置输入框后面的图标,具体用法可以参考文档。- Cascader
- DatePicker
- Select
- TreeSelect
- TimePicker
- 🌟 新增 Modal.open 方法,用于可自定义图标的快捷对话框。
- 🌟 Modal.info 增加
getContainer
的配置。 - 🌟 合并优化了 RangePicker 的日历页脚 UI。
- 🌟 Anchor 组件增加
click
事件。 - 🌟 Tab 组件增加
renderTabBar
属性。 - 🌟 Input 组件增加
select
方法。 - 🌟 Steps 增加
initial
属性。 - 🌟 Upload 组件新增
openFileDialogOnClick
属性,用于设置点击组件时是否打开上传对话框。 - 🌟 InputNumber 组件新增
decimalSeparator
属性,用于设置自定义的小数点。 - 🐞 修复众多隐蔽暂未提issue的bug,再此不在一一列出