diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index bf7b9bbc2f..325316a44b 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -17,6 +17,29 @@ If you want to read change logs before `2.0.0`, please visit [GitHub](https://gi --- +## 2.12.7 + +`2017-08-21` + +- antd of Angular@4.0, [ng-zorro-antd](https://ng.ant.design) is open sourcing. +- Affix supports more scenes. [01d4acb](https://github.com/ant-design/ant-design/commit/01d4acb7a9b030be3552b4ca19b4e899dc2bb7c7) +- Fix that AutoComplete children ref doesn't work. [#6814](https://github.com/ant-design/ant-design/issues/6814) +- Button + - Improve the logic to insert space in Chinese characters. [59b11f3](https://github.com/ant-design/ant-design/commit/59b11f3b480d43cb32fb24e351cb4c4dd569243c) + - Fix that `event.target` of click is not `button`. [#7034](https://github.com/ant-design/ant-design/issues/7034) +- Fix that Carousel's `innerSlider` doesn't exist. [#7191](https://github.com/ant-design/ant-design/issues/7191) +- Fix the style of button in DatePicker. [ad6dbcb](https://github.com/ant-design/ant-design/commit/ad6dbcb9c6dac407a38f2391d3e5fa1d8ae1cfab) +- Fix TypeScript definition of Form.[#7245](https://github.com/ant-design/ant-design/pull/7245) +- Fix TypeScript definition of InputNumber. [#7257](https://github.com/ant-design/ant-design/issues/7257) +- Fix missing collapse animation of `Layout.Sider` in IE11. [#6349](https://github.com/ant-design/ant-design/issues/6349) +- Fix typo of Spanish locale of LocaleProvider. [#7234](https://github.com/ant-design/ant-design/pull/7234) [@ramsesmoreno](https://github.com/ramsesmoreno) +- Fix that notification's default placement should not be overrided. [#5895](https://github.com/ant-design/ant-design/issues/5895) +- Fix disabled style of button in Pagination. [cf3c0aa](https://github.com/ant-design/ant-design/commit/cf3c0aac43e2825bfd85ca3b8abbf4742e504260) +- Fix that wrong exports of Select which cause webpack build error. [#7222](https://github.com/ant-design/ant-design/issues/7222) +- Fix that Tabs should show arrow buttons while resize its container. [#7231](https://github.com/ant-design/ant-design/issues/7231) [#7210](https://github.com/ant-design/ant-design/issues/7210) +- Fix style of Timeline which has only one `Timeline.Item`. [#7214](https://github.com/ant-design/ant-design/issues/7214) +- Fix wrong behavior of Upload when uid is 0. [#7269](https://github.com/ant-design/ant-design/issues/7269) + ## 2.12.6 `2017-08-11` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index c972904cb3..ca6d525278 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -17,6 +17,29 @@ timeline: true --- +## 2.12.7 + +`2017-08-21` + +- Angular@4.0 版 antd [ng-zorro-antd](https://ng.ant.design) 开源。 +- 优化 Affix 支持的场景。[01d4acb](https://github.com/ant-design/ant-design/commit/01d4acb7a9b030be3552b4ca19b4e899dc2bb7c7) +- 修复 AutoComplete children ref 失效的问题。[#6814](https://github.com/ant-design/ant-design/issues/6814) +- Button + - 优化自动在中文字符中间插入空格的逻辑。[59b11f3](https://github.com/ant-design/ant-design/commit/59b11f3b480d43cb32fb24e351cb4c4dd569243c) + - 修复点击事件的 `event.target` 不是 button 的问题。[#7034](https://github.com/ant-design/ant-design/issues/7034) +- 修复 Carousel 的 `innerSlider` 引用问题。[#7191](https://github.com/ant-design/ant-design/issues/7191) +- 修复 DatePicker 中的按钮样式。[ad6dbcb](https://github.com/ant-design/ant-design/commit/ad6dbcb9c6dac407a38f2391d3e5fa1d8ae1cfab) +- 修复 Form TypeScript definition。[#7245](https://github.com/ant-design/ant-design/pull/7245) +- 修复 InputNumber 的 TypeScript definition。[#7257](https://github.com/ant-design/ant-design/issues/7257) +- 修复 `Layout.Sider` 在 IE11 下没有折叠动画的问题。[#6349](https://github.com/ant-design/ant-design/issues/6349) +- 修复 LocaleProvider 西班牙语的拼写问题。[#7234](https://github.com/ant-design/ant-design/pull/7234) [@ramsesmoreno](https://github.com/ramsesmoreno) +- 修复 notification 默认 placement 会被覆盖的问题。[#5895](https://github.com/ant-design/ant-design/issues/5895) +- 修复 Pagination 按钮的 disabled 样式。[cf3c0aa](https://github.com/ant-design/ant-design/commit/cf3c0aac43e2825bfd85ca3b8abbf4742e504260) +- 修复 Select exports 导致的 webpack 构建错误的问题。[#7222](https://github.com/ant-design/ant-design/issues/7222) +- 修复 Tabs 在父容器宽度动态变化时切换按钮没有出现的问题。[#7231](https://github.com/ant-design/ant-design/issues/7231) [#7210](https://github.com/ant-design/ant-design/issues/7210) +- 修复 Timeline 在只有一个 `Timeline.Item` 时的样式问题。[#7214](https://github.com/ant-design/ant-design/issues/7214) +- 修复 Upload 在 uid 为 0 时的错误行为。[#7269](https://github.com/ant-design/ant-design/issues/7269) + ## 2.12.6 `2017-08-11` diff --git a/components/dropdown/index.en-US.md b/components/dropdown/index.en-US.md index 24e9d79748..6eed9b363e 100644 --- a/components/dropdown/index.en-US.md +++ b/components/dropdown/index.en-US.md @@ -27,7 +27,7 @@ You can get the menu list by `antd.Menu`, and set a callback function `onSelect` > Warning: You must set a unique `key` for `Menu.Item`. -> Remove the highlighted style after click menu item via ``. +> Remove the highlighted style after click menu item via ``. ### Dropdown.Button diff --git a/components/dropdown/index.zh-CN.md b/components/dropdown/index.zh-CN.md index f2a1b49667..c6760cad8c 100644 --- a/components/dropdown/index.zh-CN.md +++ b/components/dropdown/index.zh-CN.md @@ -28,7 +28,7 @@ title: Dropdown > 注意: Menu.Item 必须设置唯一的 key 属性。 -> 如果希望去掉菜单选中的背景效果,可以指定 ``. +> 如果希望去掉菜单选中的背景效果,可以指定 ``. ### Dropdown.Button diff --git a/components/form/index.en-US.md b/components/form/index.en-US.md index 92a1a5a482..a6cb488753 100644 --- a/components/form/index.en-US.md +++ b/components/form/index.en-US.md @@ -59,7 +59,7 @@ The following `options` are available: | Property | Description | Type | |-----------|------------------------------------------|------------| | onFieldsChange | Specify a function that will be called when the value a `Form.Item` gets changed. Usage example: saving the field's value to Redux store. | Function(props, fields) | -| mapPropsToFields | Convert props to corresponding field value. Usage example: reading the values from Redux store. | Function(props): Object{ fieldName: Object{ value } } | +| mapPropsToFields | Convert props to field value. Usage example: reading the values from Redux store. | Function(props): Object{ fieldName: Object{ value } } | | onValuesChange | A handler while value of any field is changed | (props, values) => void | If the form has been decorated by `Form.create` then it has `this.props.form` property. `this.props.form` provides some APIs as follows: @@ -87,9 +87,9 @@ If the form has been decorated by `Form.create` then it has `this.props.form` pr After wrapped by `getFieldDecorator`, `value`(or other property defined by `valuePropName`) `onChange`(or other property defined by `trigger`) props will be added to form controls,the flow of form data will be handled by Form which will cause: -1. You don't need to use `onChange` to collect data, but you still can listen to `onChange`(and so on) events. +1. You shouldn't to use `onChange` to collect data, but you still can listen to `onChange`(and so on) events. 2. You can not set value of form control via `value` `defaultValue` prop, and you should set default value with `initialValue` in `getFieldDecorator` instead. -3. You don't need to call `setState` manually, please use `this.props.form.setFieldsValue` to change value programmatically. +3. You shouldn't to call `setState` manually, please use `this.props.form.setFieldsValue` to change value programmatically. #### Special attention diff --git a/components/form/index.zh-CN.md b/components/form/index.zh-CN.md index 52b91c3686..2a4ef53018 100644 --- a/components/form/index.zh-CN.md +++ b/components/form/index.zh-CN.md @@ -61,7 +61,7 @@ CustomizedForm = Form.create({})(CustomizedForm); | 参数 | 说明 | 类型 | |-----------|------------------------------------------|------------| | onFieldsChange | 当 `Form.Item` 子节点的值发生改变时触发,可以把对应的值转存到 Redux store | Function(props, fields) | -| mapPropsToFields | 把 props 转为对应的值,可用于把 Redux store 中的值读出 | Function(props): Object{ fieldName: Object{ value } } | +| mapPropsToFields | 把父组件的属性映射到表单项上(可用于把 Redux store 中的值读出) | Function(props): Object{ fieldName: Object{ value } } | | onValuesChange | 任一表单域的值发生改变时的回调 | (props, values) => void | 经过 `Form.create` 包装的组件将会自带 `this.props.form` 属性,`this.props.form` 提供的 API 如下: @@ -88,9 +88,9 @@ CustomizedForm = Form.create({})(CustomizedForm); 经过 `getFieldDecorator` 包装的控件,表单控件会自动添加 `value`(或 `valuePropName` 指定的其他属性) `onChange`(或 `trigger` 指定的其他属性),数据同步将被 Form 接管,这会导致以下结果: -1. 你不再需要用 `onChange` 来做同步,但还是可以继续监听 `onChange` 等事件。 +1. 你**不再需要也不应该**用 `onChange` 来做同步,但还是可以继续监听 `onChange` 等事件。 2. 你不能用控件的 `value` `defaultValue` 等属性来设置表单域的值,默认值可以用 `getFieldDecorator` 里的 `initialValue`。 -3. 你不需要用 `setState`,可以使用 `this.props.form.setFieldsValue` 来动态改变表单值。 +3. 你不应该用 `setState`,可以使用 `this.props.form.setFieldsValue` 来动态改变表单值。 #### 特别注意 diff --git a/components/table/index.zh-CN.md b/components/table/index.zh-CN.md index 4bf1c39e13..ef8a3bc5b5 100644 --- a/components/table/index.zh-CN.md +++ b/components/table/index.zh-CN.md @@ -116,7 +116,7 @@ const columns = [{ 选择功能的配置。 | 参数 | 说明 | 类型 | 默认值 | -|------------------|--------------------------|-----------------|---------------------|---------| +|------------------|--------------------------|-----------------|---------------------| | type | 多选/单选,`checkbox` or `radio` | string | `checkbox` | | selectedRowKeys | 指定选中项的 key 数组,需要和 onChange 进行配合 | string[] | [] | | onChange | 选中项发生变化的时的回调 | Function(selectedRowKeys, selectedRows) | - | @@ -124,12 +124,12 @@ const columns = [{ | onSelect | 用户手动选择/取消选择某列的回调 | Function(record, selected, selectedRows) | - | | onSelectAll | 用户手动选择/取消选择所有列的回调 | Function(selected, selectedRows, changeRows) | - | | onSelectInvert | 用户手动选择反选的回调 | Function(selectedRows) | - | -| selections | 自定义选择项 [配置项](#selection), 设为 `true` 时显示默认选择项 | object[] | true | - | +| selections | 自定义选择项 [配置项](#selection), 设为 `true` 时显示默认选择项 | object[] | true | ### selection | 参数 | 说明 | 类型 | 默认值 | -|------------------|--------------------------|-----------------|---------------------|---------| +|------------------|--------------------------|-----------------|---------------------| | key | React 需要的 key,建议设置 | string | - | | text | 选择项显示的文字 | string\|React.ReactNode | - | | onSelect | 选择项点击回调 | Function(changeableRowKeys) | - | diff --git a/components/tabs/__tests__/__snapshots__/demo.test.js.snap b/components/tabs/__tests__/__snapshots__/demo.test.js.snap index 91c619bab5..67e04cf718 100644 --- a/components/tabs/__tests__/__snapshots__/demo.test.js.snap +++ b/components/tabs/__tests__/__snapshots__/demo.test.js.snap @@ -97,7 +97,6 @@ exports[`renders ./components/tabs/demo/basic.md correctly 1`] = ` exports[`renders ./components/tabs/demo/card.md correctly 1`] = `