2017-10-20
Ant Design Mobile 2.0 is here! ☀️ Please see https://mobile.ant.design/
-
Feature
- [Web]
DatePicker
Adduse12Hours
, support 12-hour am/pm format (#1578) - [Web]
Button
Supportdisabled
style for diffrenttype
. - [Web]
Grid
addsquare
api, support both square mode and auto height mode. - [Web]
Grid
addactiveClassName
,activeStyle
api, support custom touch feedback style. - [Web]
Modal.alert / Modal.prompt / Modal.opeartion
add optionalplatform
api, support switch between android and ios design. - [Web]
ListView
(beta.3) add pull-up feature. - Add
DatePickerView
(#1232) - Add
Calendar
(#1610) - [Web] locale support for
Picker
SearchBar
- [Web/RN]
NoticeBar
can useaction
prop to customize action text. (#1959)
- [Web]
-
Break Change
- [Web] "Web page HD display" / "SVG Icon" optimization features, Changed from "built-in" to "external".
- [Web] remove
across
mode ofButton
. - remove global
user-select: none
。#1793 - [Web/RN] all component's
ref
switch fromstring
tofunction
(#1354) - [Web/RN] Rewrite
Tabs
,Redesigned all api - [Web/RN] Remove
Popup
,Addpopup
api forModal
, ModalanimationType
support web, to custom popup animation style #1125 - [Web/RN]
InputItem
/TextareaItem
/SearchBar
- pass
style
to input(web) / TextInput(rn) - remove
focused
/autoFocus
(usefocus()
instance method)
- pass
- [Web/RN]
DatePicker
remove moment.jsvalue
/minDate
/maxDate
/format
/onChange
change to pureDate
Object
- [Web/RN]
pagination
apicurrent
change to start with1
. - [Web/RN]
Progress
wrapStyle
change tostyle
, originalstyle
change tobarStyle
unfilled
change toboolean
type
- [Web/RN] remove
List
apionLongPress
- [Web/RN]
Result
apibuttonClick
renamed toonButtonClick
- [Web/RN] remove
Table
- [Web] remove
createTooltip
,which can use react-component/slider/createSliderWithTooltip replace - [Web]
Switch
apistyle
change to applied with inner element - [Web]
Slider
remove default margin & padding style - [Web]
Carousel
'seasing
prop type changed from string to Function - [Web]
Flex
remove redundancyalign
valuetop / middle / bottom
- [Web]
ListView
(beta.3) RemovestickyHeader
prop and react-sticky dependency, but you can also use react-sticky anduseBodyScroll
in listview by your self. (see demo)Because this feature is not commonly used and does not contain UI, so it is not suitable for integration.
- [Web]
RefreshControl
(beta.3) Change inner dom className- from
${prefixCls}-ptr
to${prefixCls}-indicator
- from
${prefixCls}-ptr-icon
to${prefixCls}-indicator-icon-wrapper
- from
${prefixCls}-ptr-loading
to${prefixCls}-indicator-loading-wrapper
- from
- [Web]
ListView
(beta.6) addpullToRefresh
prop and removeuseZscroller
scrollerOptions
refreshControl
pullUpEnabled
pullUpRefreshing
pullUpOnRefresh
pullUpDistanceToRefresh
pullUpRenderer
props. - [Web]
RefreshControl
(beta.6) has been removed, please use the newPullToRefresh
component instead - [RN]
RefreshControl
(beta.6) has been removed, please use react-native RefreshControl directly - [RN]
ActionSheet.showShareActionSheetWithOptions
rewrite with react nativeShare
- [RN]
Button
apistyle
attributedisabledRaw
/disabledRawText
rename todefaultDisabledRaw
/defaultDisabledRawText
- [Web]
NavBar
(rc.1) modify the propiconName
toicon
, you need to useIcon
component or your custom icon - [Web]
ActionSheet
(rc.1) deleteiconName
prop, useicon
instead - [RN]
ListView
(rc.3) has been removed, please use react-native ListView directly - [Web/RN]
ImagePicker
(rc.3) addonFail
prop and removeToast.fail
infomation within component
-
Theme
- Delete
@fill-overlay-inverse
,@color-shadow
,@brand-hot
,@font-size-display-sm
,@font-size-display-md
,@font-size-display-xl
,@font-size-display-lg
,@font-family-code
,@font-family-base
; @searchbar-font-size
rename to@search-bar-font-size
。
- Delete
-
Enhancement
中文翻译
-
Feature
- [Web]
DatePicker
新增 APIuse12Hours
, 支持 12 小时制 (#1578) - [Web]
Button
组件分别对应各个 type 新增各自的 disabled 状态样式 - [Web]
Grid
新增square
api, 支持高度自适应模式 - [Web]
Grid
新增activeClassName
,activeStyle
api, 支持自定义触摸反馈样式 - [Web]
Modal.alert / Modal.prompt / Modal.opeartion
新增可选参数platform
- [Web]
ListView
(beta.3) 新增 pull-up 功能 - [Web/RN] 新增
DatePickerView
组件,支持更灵活的时间选择器用法 (#1232) - [Web/RN] 新增
Calendar
组件,支持跨日期的日期时间选择 (#1610) - [Web]
Picker
SearchBar
多语言支持 - [Web/RN]
NoticeBar
增加自定义操作文案 action 属性 (#1959)
- [Web]
-
Break Change
- [Web] "高清方案" / "SVG Icon" 从“内置”改为“外置”
- [Web]
Button
组件去除across
模式 - [Web]
Modal
、List.Item
、Switch
默认采用 iOS 样式,不再根据 UA 进行自动探测 (#1371) - [Web/RN] 各个组件的
ref
从string
修改为function
(#1354) - [Web/RN] 重构
Tabs
组件,底层重写,APIs 大量更改 - [Web/RN] 去除
Popup
组件,给Modal
组件新增popup
属性,相应地 Modal 组件中原animationType
属性开始支持 web 版本、用以标识 popup 弹出动画的类型 #1125 - [Web/RN]
InputItem
/TextareaItem
/SearchBar
组件- 将
style
属性传至 input(web) / TextInput(rn) - 去除
focused
/autoFocus
属性 (用focus()
实例方法实现同样效果)
- 将
- [Web/RN]
DatePicker
组件去除 moment.js 依赖- 相应地
value
/minDate
/maxDate
/format
/onChange
数据类型变为Date
对象
- 相应地
- [Web/RN]
pagination
组件current
属性改成从1
开始索引 - [Web/RN]
Progress
组件wrapStyle
改为style
, 原来的style
改为barStyle
unfilled
属性值更改为 boolean 值
- [Web/RN] 移除
List
组件的onLongPress
属性 - [Web/RN]
Result
组件的buttonClick
更改为onButtonClick
- [Web/RN] 删除
Table
组件 - [Web] 去除
createTooltip
组件,如果你需要 range/slider 带 tooltip 功能,你可以用 react-component/slider/createSliderWithTooltip 实现 - [Web]
Switch
组件的style
属性设置,从外围元素改为内层元素上 - [Web]
Slider
去除默认的 margin & padding 样式 - [Web]
Carousel
的easing
属性类型从 string 改为 Function - [Web]
Flex
清理冗余align
属性值top / middle / bottom
- [Web]
ListView
(beta.3) 移除stickyHeader
属性和 react-sticky 依赖,但是你仍然可以使用 react-sticky 和useBodyScroll
属性来自己实现相应效果 (查看 demo)因为 sticky 效果实际并不常用,而且不包含 UI,因此不适合集成在 ListView 里
- [Web]
RefreshControl
(beta.3) 修改内部的 dom className- 从
${prefixCls}-ptr
改为${prefixCls}-indicator
- 从
${prefixCls}-ptr-icon
改为${prefixCls}-indicator-icon-wrapper
- 从
${prefixCls}-ptr-loading
改为${prefixCls}-indicator-loading-wrapper
- 从
- [Web]
ListView
(beta.6) 新增pullToRefresh
属性,移除useZscroller
scrollerOptions
refreshControl
pullUpEnabled
pullUpRefreshing
pullUpOnRefresh
pullUpDistanceToRefresh
pullUpRenderer
属性 - [Web]
RefreshControl
(beta.6) 已经被移除,请使用新增的PullToRefresh
组件代替 - [RN]
RefreshControl
(beta.6) 已经被移除,请直接引用 react-native RefreshControl - [RN]
ActionSheet.showShareActionSheetWithOptions
利用 react nativeShare
进行重新实现 - [RN]
Button
组件 style 里disabledRaw
/disabledRawText
修改为defaultDisabledRaw
/defaultDisabledRawText
- [Web]
NavBar
(rc.1) 修改属性iconName
为icon
,你需要使用Icon
组件或自定义图标 - [Web]
ActionSheet
(rc.1) 删除iconName
属性,使用icon
代替 - [RN]
ListView
(rc.3) 已经被移除,请直接引用 react-native ListView - [Web/RN]
ImagePicker
(rc.3) 增加onFail
属性,移除内置的Toast.fail
提示
-
Theme
- 删除
@fill-overlay-inverse
,@color-shadow
,@brand-hot
,@font-size-display-sm
,@font-size-display-md
,@font-size-display-xl
,@font-size-display-lg
,@font-family-code
,@font-family-base
; @searchbar-font-size
重命名为@search-bar-font-size
。
- 删除
-
Enhancement