Browse Source

Merge branch 'master' into antd-3.0

pull/7831/head
afc163 7 years ago
parent
commit
7a8a1a8ee3
  1. 42
      CHANGELOG.en-US.md
  2. 42
      CHANGELOG.zh-CN.md
  3. 2
      components/auto-complete/__tests__/__snapshots__/demo.test.js.snap
  4. 2
      components/auto-complete/demo/antd.md
  5. 5
      components/auto-complete/index.tsx
  6. 2
      components/form/index.en-US.md
  7. 5
      components/input/Search.tsx
  8. 2
      components/select/index.en-US.md
  9. 12
      components/table/__tests__/__snapshots__/demo.test.js.snap
  10. 2
      components/table/__tests__/__snapshots__/empty.test.js.snap
  11. 12
      components/upload/Upload.tsx
  12. 2
      docs/spec/copywriting.md

42
CHANGELOG.en-US.md

@ -17,24 +17,44 @@ If you want to read change logs before `2.0.0`, please visit [GitHub](https://gi
---
## 2.13.4
`2017-09-29`
- 🐞 Fix missing Pagination `size="small"` style.
- 🐞 Fix Anchor missing padding. [#7712](https://github.com/ant-design/ant-design/issues/7712)
- 🐞 Fix TreeSelect extra select below search input. [#7703](https://github.com/ant-design/ant-design/issues/7703)
- 🐞 Fix the jumping problem of Form validate text. [#7730](https://github.com/ant-design/ant-design/issues/7730)
- 🐞 Fix Button Group loading style. [#7709](https://github.com/ant-design/ant-design/issues/7709)
- 🐞 Fix blur placeholder text color. [#7365](https://github.com/ant-design/ant-design/issues/7365)
- 🐞 Fix Mention `suggestion.toLowerCase is not a function` error. [#7696](https://github.com/ant-design/ant-design/issues/7696) [@kappa-gooner](https://github.com/kappa-gooner)
- 🐞 Fix a children height problem of Layout.Sider. [#7716](https://github.com/ant-design/ant-design/pull/7716) [@zheeeng](https://github.com/zheeeng)
- 🐞 Fix Dropdown menu group style.
- 🐞 Fix Table filter icon and dropdown style.
- 🐞 Fix a AutoComplete circular reference bug in Inferno. [#7742](https://github.com/ant-design/ant-design/pull/7742) [@menberg](https://github.com/menberg)
- 🐞 Fix Upload cannot upload file when using `beforeUpload`. [#7762](https://github.com/ant-design/ant-design/issues/7762) [#6983](https://github.com/ant-design/ant-design/issues/6983)
- TypeScript
- 🐞 Fix Input `maxLength` definite. [#7744](https://github.com/ant-design/ant-design/pull/7744) [@delesseps](https://github.com/delesseps)
- 🐞 Fix `disabledTime` definite of DatePicker. [#7740](https://github.com/ant-design/ant-design/pull/7740) [@778758944](https://github.com/778758944)
## 2.13.3
`2017-09-22`
- Fix Affix scrolling bug when document's height minus viewport's height is smaller than the height of children of Affix. [#2349](https://github.com/ant-design/ant-design/issues/2349)
- Fix broken style of header of Card when `Card[title]` is void and `Card[extra]` is set. [f46112d#commitcomment-24480417](https://github.com/ant-design/ant-design/commit/f46112d38561c89780eb44ecbba82347d2b912da#commitcomment-24480417)
- Fix TypeScript definition of `Checkbox[children]`. [#7650](https://github.com/ant-design/ant-design/issues/7650) [@liaokaien](https://github.com/liaokaien)
- Fix error when set nested name in `getFieldDecorator` and then click the label of `Form.Item`. [#7693](https://github.com/ant-design/ant-design/issues/7693)
- 🐞 Fix Affix scrolling bug when document's height minus viewport's height is smaller than the height of children of Affix. [#2349](https://github.com/ant-design/ant-design/issues/2349)
- 🐞 Fix broken style of header of Card when `Card[title]` is void and `Card[extra]` is set. [f46112d#commitcomment-24480417](https://github.com/ant-design/ant-design/commit/f46112d38561c89780eb44ecbba82347d2b912da#commitcomment-24480417)
- 🐞 Fix TypeScript definition of `Checkbox[children]`. [#7650](https://github.com/ant-design/ant-design/issues/7650) [@liaokaien](https://github.com/liaokaien)
- 🐞 Fix error when set nested name in `getFieldDecorator` and then click the label of `Form.Item`. [#7693](https://github.com/ant-design/ant-design/issues/7693)
- Input
- Fix broken style of `Input.Group[compat]` when it has `Select` as its children. [#7662](https://github.com/ant-design/ant-design/issues/7662)
- Fix TypeScript definition of `Input[autoComplete]`. [#7699](https://github.com/ant-design/ant-design/pull/7699) [@delesseps](https://github.com/delesseps)
- 🐞 Fix broken style of `Input.Group[compat]` when it has `Select` as its children. [#7662](https://github.com/ant-design/ant-design/issues/7662)
- 🐞 Fix TypeScript definition of `Input[autoComplete]`. [#7699](https://github.com/ant-design/ant-design/pull/7699) [@delesseps](https://github.com/delesseps)
- LocaleProvider
- Support Portuguese. [#7449](https://github.com/ant-design/ant-design/pull/7449) [@taviroquai](https://github.com/taviroquai)
- Fix missing translations in Dutch locale. [#7694](https://github.com/ant-design/ant-design/pull/7694) [@kstiopin](https://github.com/kstiopin)
- 🇵🇹 Support Portuguese. [#7449](https://github.com/ant-design/ant-design/pull/7449) [@taviroquai](https://github.com/taviroquai)
- 🐞 Fix missing translations in Dutch locale. [#7694](https://github.com/ant-design/ant-design/pull/7694) [@kstiopin](https://github.com/kstiopin)
- Table
- Fix height of table header when `rowSelection` is set. [#7663](https://github.com/ant-design/ant-design/issues/7663)
- Fix bug that click on first two options will not trigger event when `rowSelection.hideDefaultselections` is set. [#7626](https://github.com/ant-design/ant-design/issues/7626) [@infeng](https://github.com/infeng)
- Fix TypeScript definition of `Table[scroll]`. [#7640](https://github.com/ant-design/ant-design/pull/7640) [@BlackGanglion](https://github.com/BlackGanglion)
- 🐞 Fix height of table header when `rowSelection` is set. [#7663](https://github.com/ant-design/ant-design/issues/7663)
- 🐞 Fix bug that click on first two options will not trigger event when `rowSelection.hideDefaultselections` is set. [#7626](https://github.com/ant-design/ant-design/issues/7626) [@infeng](https://github.com/infeng)
- 🐞 Fix TypeScript definition of `Table[scroll]`. [#7640](https://github.com/ant-design/ant-design/pull/7640) [@BlackGanglion](https://github.com/BlackGanglion)
## 2.13.2

42
CHANGELOG.zh-CN.md

@ -17,24 +17,44 @@ timeline: true
---
## 2.13.4
`2017-09-29`
- 🐞 修复 Pagination 小号样式失效的问题。
- 🐞 修复 Anchor 的样式错位。[#7712](https://github.com/ant-design/ant-design/issues/7712)
- 🐞 修复 TreeSelect 搜索框下多余文字的问题。[#7703](https://github.com/ant-design/ant-design/issues/7703)
- 🐞 修复 Form 校验文字跳动的问题。[#7730](https://github.com/ant-design/ant-design/issues/7730)
- 🐞 修复各类型 Button Group 的 loading 样式。 [#7709](https://github.com/ant-design/ant-design/issues/7709)
- 🐞 修复 placeholder 文本在某些情况下无法看清的问题。[#7365](https://github.com/ant-design/ant-design/issues/7365)
- 🐞 修复一个 Mention 的 `suggestion.toLowerCase is not a function` 报错问题。 [#7696](https://github.com/ant-design/ant-design/issues/7696) [@kappa-gooner](https://github.com/kappa-gooner)
- 🐞 修复一个 Layout.Sider 子元素的高度问题。[#7716](https://github.com/ant-design/ant-design/pull/7716) [@zheeeng](https://github.com/zheeeng)
- 🐞 修复 Dropdown 菜单分组的样式。
- 🐞 修复 Table 筛选图标和菜单样式错位。
- 🐞 修复一个 AutoComplete 在 Inferno 下循环引用的问题。[#7742](https://github.com/ant-design/ant-design/pull/7742) [@menberg](https://github.com/menberg)
- 🐞 修复 Upload 使用 `beforeUpload` 验证文件类型失败后无法再次上传的问题。[#7762](https://github.com/ant-design/ant-design/issues/7762) [#6983](https://github.com/ant-design/ant-design/issues/6983)
- TypeScript
- 🐞 修复 Input 的 `maxLength` 定义。[#7744](https://github.com/ant-design/ant-design/pull/7744) [@delesseps](https://github.com/delesseps)
- 🐞 修复 DatePicker 等组件的 `disabledTime` 的返回值定义。[#7740](https://github.com/ant-design/ant-design/pull/7740) [@778758944](https://github.com/778758944)
## 2.13.3
`2017-09-22`
- 修复 Affix 在内容与视口高度差小于 children 高度时触发的滚动抖动问题。[#2349](https://github.com/ant-design/ant-design/issues/2349)
- 修复 `Card[title]` 为空且设置 `Card[extra]` 时样式错乱的问题。[f46112d#commitcomment-24480417](https://github.com/ant-design/ant-design/commit/f46112d38561c89780eb44ecbba82347d2b912da#commitcomment-24480417)
- 修复 `Checkbox[children]` TypeScript definition。[#7650](https://github.com/ant-design/ant-design/issues/7650) [@liaokaien](https://github.com/liaokaien)
- 修复 `getFieldDecorator` 内使用嵌套 id 后点击 `Form.Item` label 报错的问题。[#7693](https://github.com/ant-design/ant-design/issues/7693)
- 🐞 修复 Affix 在内容与视口高度差小于 children 高度时触发的滚动抖动问题。[#2349](https://github.com/ant-design/ant-design/issues/2349)
- 🐞 修复 `Card[title]` 为空且设置 `Card[extra]` 时样式错乱的问题。[f46112d#commitcomment-24480417](https://github.com/ant-design/ant-design/commit/f46112d38561c89780eb44ecbba82347d2b912da#commitcomment-24480417)
- 🐞 修复 `Checkbox[children]` TypeScript definition。[#7650](https://github.com/ant-design/ant-design/issues/7650) [@liaokaien](https://github.com/liaokaien)
- 🐞 修复 `getFieldDecorator` 内使用嵌套 id 后点击 `Form.Item` label 报错的问题。[#7693](https://github.com/ant-design/ant-design/issues/7693)
- Input
- 修复 `Input.Group[compat]` 内嵌 `Select` 等控件时的样式问题。[#7662](https://github.com/ant-design/ant-design/issues/7662)
- 优化 `Input[autoComplete]` TypeScript 定义。[#7699](https://github.com/ant-design/ant-design/pull/7699) [@delesseps](https://github.com/delesseps)
- 🐞 修复 `Input.Group[compat]` 内嵌 `Select` 等控件时的样式问题。[#7662](https://github.com/ant-design/ant-design/issues/7662)
- 🐞 优化 `Input[autoComplete]` TypeScript 定义。[#7699](https://github.com/ant-design/ant-design/pull/7699) [@delesseps](https://github.com/delesseps)
- LocaleProvider
- 新增葡萄牙语。[#7449](https://github.com/ant-design/ant-design/pull/7449) [@taviroquai](https://github.com/taviroquai)
- 修复荷兰语 locale 缺少文案的问题。[#7694](https://github.com/ant-design/ant-design/pull/7694) [@kstiopin](https://github.com/kstiopin)
- 🇵🇹 新增葡萄牙语。[#7449](https://github.com/ant-design/ant-design/pull/7449) [@taviroquai](https://github.com/taviroquai)
- 🐞 修复荷兰语 locale 缺少文案的问题。[#7694](https://github.com/ant-design/ant-design/pull/7694) [@kstiopin](https://github.com/kstiopin)
- Table
- 修复 `rowSelection` 导致的表头高度问题。[#7663](https://github.com/ant-design/ant-design/issues/7663)
- 修复使用 `rowSelection.hideDefaultselections` 时导致自定义选项点击没反应的问题。[#7626](https://github.com/ant-design/ant-design/issues/7626) [@infeng](https://github.com/infeng)
- 优化 `Table[scroll]` TypeScript definition。[#7640](https://github.com/ant-design/ant-design/pull/7640) [@BlackGanglion](https://github.com/BlackGanglion)
- 🐞 修复 `rowSelection` 导致的表头高度问题。[#7663](https://github.com/ant-design/ant-design/issues/7663)
- 🐞 修复使用 `rowSelection.hideDefaultselections` 时导致自定义选项点击没反应的问题。[#7626](https://github.com/ant-design/ant-design/issues/7626) [@infeng](https://github.com/infeng)
- 🐞 优化 `Table[scroll]` TypeScript definition。[#7640](https://github.com/ant-design/ant-design/pull/7640) [@BlackGanglion](https://github.com/BlackGanglion)
## 2.13.2

2
components/auto-complete/__tests__/__snapshots__/demo.test.js.snap

@ -31,7 +31,7 @@ exports[`renders ./components/auto-complete/demo/antd.md correctly 1`] = `
class="ant-select-search__field__wrap"
>
<textarea
class="ant-input ant-select-search__field"
class="ant-input custom ant-select-search__field"
style="height:50px;"
/>
<span

2
components/auto-complete/demo/antd.md

@ -50,7 +50,7 @@ class Complete extends React.Component {
onSearch={this.handleSearch}
placeholder="input here"
>
<TextArea onKeyPress={this.handleKeyPress} style={{ height: 50 }} />
<TextArea className="custom" onKeyPress={this.handleKeyPress} style={{ height: 50 }} />
</AutoComplete>
);
}

5
components/auto-complete/index.tsx

@ -51,8 +51,11 @@ export default class AutoComplete extends React.Component<AutoCompleteProps, any
const { children } = this.props;
const element = children && React.isValidElement(children) && children.type !== Option ?
React.Children.only(this.props.children) : <Input />;
const elementProps = { ...element.props };
// https://github.com/ant-design/ant-design/pull/7742
delete elementProps.children;
return (
<InputElement>{element}</InputElement>
<InputElement {...elementProps}>{element}</InputElement>
);
}

2
components/form/index.en-US.md

@ -85,7 +85,7 @@ If the form has been decorated by `Form.create` then it has `this.props.form` pr
### this.props.form.validateFields/validateFieldsAndScroll([fieldNames: string[]], [options: object], callback: Function(errors, values))
| 参数 | 说明 | 类型 | 默认值 |
| Method | Description | Type | Default |
|-----|-----|------|-------|
| options.first | If `true`, every field will stop validation at first failed rule | boolean | false |
| options.firstFields | Those fields will stop validation at first failed rule | String[] | [] |

5
components/input/Search.tsx

@ -5,12 +5,14 @@ import Icon from '../icon';
import Button from '../button';
export interface SearchProps extends InputProps {
inputPrefixCls?: string;
onSearch?: (value: string) => any;
enterButton?: boolean | React.ReactNode;
}
export default class Search extends React.Component<SearchProps, any> {
static defaultProps = {
inputPrefixCls: 'ant-input',
prefixCls: 'ant-input-search',
enterButton: false,
};
@ -30,7 +32,7 @@ export default class Search extends React.Component<SearchProps, any> {
}
render() {
const { className, prefixCls, size, enterButton, ...others } = this.props;
const { className, prefixCls, inputPrefixCls, size, enterButton, ...others } = this.props;
delete (others as any).onSearch;
const searchSuffix = enterButton
? (
@ -53,6 +55,7 @@ export default class Search extends React.Component<SearchProps, any> {
{...others}
size={size}
className={inputClassName}
prefixCls={inputPrefixCls}
suffix={searchSuffix}
ref={this.saveInput}
/>

2
components/select/index.en-US.md

@ -42,7 +42,7 @@ Select component to select value from options.
| dropdownMatchSelectWidth | Whether dropdown's with is same with select. | boolean | true |
| optionFilterProp | Which prop value of option will be used for filter if filterOption is true | string | value |
| optionLabelProp | Which prop value of option will render as content of select. | string | `children` |
| size | Size of Select input. `large` `small` | string | default |
| size | Size of Select input. `default` `large` `small` | string | default |
| showSearch | Whether show search input in single mode.| boolean | false |
| disabled | Whether disabled select | boolean | false |
| defaultActiveFirstOption | Whether active first option by default | boolean | true |

12
components/table/__tests__/__snapshots__/demo.test.js.snap

@ -3569,7 +3569,7 @@ exports[`renders ./components/table/demo/fixed-columns.md correctly 1`] = `
>
<div
class="ant-table-body"
style="overflow-x:auto;"
style="overflow-x:auto;-webkit-transform:translate3d (0, 0, 0);"
>
<table
class="ant-table-fixed"
@ -3823,6 +3823,7 @@ exports[`renders ./components/table/demo/fixed-columns.md correctly 1`] = `
>
<div
class="ant-table-body-outer"
style="-webkit-transform:translate3d (0, 0, 0);"
>
<div
class="ant-table-body-inner"
@ -3907,6 +3908,7 @@ exports[`renders ./components/table/demo/fixed-columns.md correctly 1`] = `
>
<div
class="ant-table-body-outer"
style="-webkit-transform:translate3d (0, 0, 0);"
>
<div
class="ant-table-body-inner"
@ -4153,7 +4155,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] =
</div>
<div
class="ant-table-body"
style="overflow-x:auto;max-height:300px;overflow-y:scroll;"
style="overflow-x:auto;-webkit-transform:translate3d (0, 0, 0);max-height:300px;overflow-y:scroll;"
>
<table
class="ant-table-fixed"
@ -4910,6 +4912,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] =
</div>
<div
class="ant-table-body-outer"
style="-webkit-transform:translate3d (0, 0, 0);"
>
<div
class="ant-table-body-inner"
@ -5145,6 +5148,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] =
</div>
<div
class="ant-table-body-outer"
style="-webkit-transform:translate3d (0, 0, 0);"
>
<div
class="ant-table-body-inner"
@ -6859,7 +6863,7 @@ exports[`renders ./components/table/demo/grouping-columns.md correctly 1`] = `
</div>
<div
class="ant-table-body"
style="overflow-x:auto;max-height:240px;overflow-y:scroll;"
style="overflow-x:auto;-webkit-transform:translate3d (0, 0, 0);max-height:240px;overflow-y:scroll;"
>
<table
class="ant-table-fixed"
@ -7410,6 +7414,7 @@ exports[`renders ./components/table/demo/grouping-columns.md correctly 1`] = `
</div>
<div
class="ant-table-body-outer"
style="-webkit-transform:translate3d (0, 0, 0);"
>
<div
class="ant-table-body-inner"
@ -7593,6 +7598,7 @@ exports[`renders ./components/table/demo/grouping-columns.md correctly 1`] = `
</div>
<div
class="ant-table-body-outer"
style="-webkit-transform:translate3d (0, 0, 0);"
>
<div
class="ant-table-body-inner"

2
components/table/__tests__/__snapshots__/empty.test.js.snap

@ -365,6 +365,7 @@ exports[`Table renders empty table with fixed columns 1`] = `
>
<div
class="ant-table-body-outer"
style="-webkit-transform:translate3d (0, 0, 0);"
>
<div
class="ant-table-body-inner"
@ -412,6 +413,7 @@ exports[`Table renders empty table with fixed columns 1`] = `
>
<div
class="ant-table-body-outer"
style="-webkit-transform:translate3d (0, 0, 0);"
>
<div
class="ant-table-body-inner"

12
components/upload/Upload.tsx

@ -212,6 +212,17 @@ export default class Upload extends React.Component<UploadProps, any> {
});
}
beforeUpload = (file, fileList) => {
if (this.props.beforeUpload && !this.props.beforeUpload(file, fileList)) {
this.onChange({
file,
fileList,
});
return false;
}
return true;
}
clearProgressTimer() {
clearInterval(this.progressTimer);
}
@ -232,6 +243,7 @@ export default class Upload extends React.Component<UploadProps, any> {
onProgress: this.onProgress,
onSuccess: this.onSuccess,
...this.props,
beforeUpload: this.beforeUpload,
};
delete rcUploadProps.className;

2
docs/spec/copywriting.md

@ -125,7 +125,7 @@ title:
</tr>
<tr>
<th>登录</th>
<td></td>
   <td></td>
<td>登记记录用户输入的注册账号和密码。</td>
</tr>
<tr>

Loading…
Cancel
Save