From cde2a6b6f011a5b3a367b3f58731def547bc98d8 Mon Sep 17 00:00:00 2001 From: Yury Kozyrev Date: Thu, 28 Jun 2018 12:03:48 +0200 Subject: [PATCH 01/26] Add missing showArrow option in types --- components/select/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/components/select/index.tsx b/components/select/index.tsx index f20b0aab73..41a6c89371 100755 --- a/components/select/index.tsx +++ b/components/select/index.tsx @@ -15,6 +15,7 @@ export interface AbstractSelectProps { showSearch?: boolean; allowClear?: boolean; disabled?: boolean; + showArrow?: boolean; style?: React.CSSProperties; tabIndex?: number; placeholder?: string | React.ReactNode; From 31014e94bacf38a519fd3f1ad4d382db760ba5b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Fri, 29 Jun 2018 10:23:42 +0800 Subject: [PATCH 02/26] Update react-virtualized requirement to ~9.20.0 (#11031) Updates the requirements on [react-virtualized](https://github.com/bvaughn/react-virtualized) to permit the latest version. - [Release notes](https://github.com/bvaughn/react-virtualized/releases) - [Changelog](https://github.com/bvaughn/react-virtualized/blob/master/CHANGELOG.md) - [Commits](https://github.com/bvaughn/react-virtualized/commits/9.20.0) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index de7a17eed3..98f258d9fa 100644 --- a/package.json +++ b/package.json @@ -157,7 +157,7 @@ "react-intl": "^2.0.1", "react-router-dom": "^4.2.2", "react-sublime-video": "^0.2.0", - "react-virtualized": "~9.19.0", + "react-virtualized": "~9.20.0", "remark-frontmatter": "^1.1.0", "remark-parse": "^5.0.0", "remark-stringify": "^5.0.0", From d88a8f6920656479fec605d723e05cffbbb220f6 Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 29 Jun 2018 11:57:26 +0800 Subject: [PATCH 03/26] docs: Add instruction about validateFields arguments, close #11084 --- components/form/index.en-US.md | 34 +++++++++++++++++++++++++++++++++ components/form/index.zh-CN.md | 35 ++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/components/form/index.en-US.md b/components/form/index.en-US.md index ef94f43652..02a04744fe 100644 --- a/components/form/index.en-US.md +++ b/components/form/index.en-US.md @@ -99,6 +99,40 @@ If the form has been decorated by `Form.create` then it has `this.props.form` pr | options.force | Should validate validated field again when `validateTrigger` is been triggered again | boolean | false | | options.scroll | Config scroll behavior of `validateFieldsAndScroll`, more: [dom-scroll-into-view's config](https://github.com/yiminghe/dom-scroll-into-view#function-parameter) | Object | {} | +#### Callback arguments example of validateFields + +- `errors`: + + ```js + { + "userName": { + "errors": [ + { + "message": "Please input your username!", + "field": "userName" + } + ] + }, + "password": { + "errors": [ + { + "message": "Please input your Password!", + "field": "password" + } + ] + } + } + ``` + +- `values`: + + ```js + { + "userName": "username", + "password": "password", + } + ``` + ### Form.createFormField To mark the returned fields data in `mapPropsToFields`, [demo](#components-form-demo-global-state). diff --git a/components/form/index.zh-CN.md b/components/form/index.zh-CN.md index a477daec8d..356cb7b0a9 100644 --- a/components/form/index.zh-CN.md +++ b/components/form/index.zh-CN.md @@ -100,6 +100,41 @@ this.form // => The instance of CustomizedForm | options.force | 对已经校验过的表单域,在 validateTrigger 再次被触发时是否再次校验 | boolean | false | | options.scroll | 定义 validateFieldsAndScroll 的滚动行为,详细配置见 [dom-scroll-into-view config](https://github.com/yiminghe/dom-scroll-into-view#function-parameter) | Object | {} | +#### validateFields 的 callback 参数示例 + +- `errors`: + + ```js + { + "userName": { + "errors": [ + { + "message": "Please input your username!", + "field": "userName" + } + ] + }, + "password": { + "errors": [ + { + "message": "Please input your Password!", + "field": "password" + } + ] + } + } + ``` + +- `values`: + + ```js + { + "userName": "username", + "password": "password", + } + ``` + + ### Form.createFormField 用于标记 `mapPropsToFields` 返回的表单域数据,[例子](#components-form-demo-global-state)。 From fd06baa9d7c586f165f63df22ac2a2428106473b Mon Sep 17 00:00:00 2001 From: Wei Zhu Date: Fri, 29 Jun 2018 12:21:51 +0800 Subject: [PATCH 04/26] use fork version of offline-plugin --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 98f258d9fa..78923f5a83 100644 --- a/package.json +++ b/package.json @@ -136,7 +136,7 @@ "majo": "^0.6.2", "mockdate": "^2.0.1", "moment-timezone": "^0.5.5", - "offline-plugin": "^5.0.5", + "offline-plugin": "yesmeck/offline-plugin#fix-cache-key", "pre-commit": "^1.2.2", "preact": "^8.2.5", "preact-compat": "^3.17.0", From 27c309348722841a57475ae55c54a04eeb02974e Mon Sep 17 00:00:00 2001 From: zelongc Date: Fri, 29 Jun 2018 14:43:17 +1000 Subject: [PATCH 05/26] Typo fix in the upload component demo. Change 'reponse' to 'response'. --- components/upload/demo/defaultFileList.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/upload/demo/defaultFileList.md b/components/upload/demo/defaultFileList.md index 8d849a343d..56623a7793 100644 --- a/components/upload/demo/defaultFileList.md +++ b/components/upload/demo/defaultFileList.md @@ -27,7 +27,7 @@ const props = { uid: 1, name: 'xxx.png', status: 'done', - reponse: 'Server Error 500', // custom error message to show + response: 'Server Error 500', // custom error message to show url: 'http://www.baidu.com/xxx.png', }, { uid: 2, @@ -38,7 +38,7 @@ const props = { uid: 3, name: 'zzz.png', status: 'error', - reponse: 'Server Error 500', // custom error message to show + response: 'Server Error 500', // custom error message to show url: 'http://www.baidu.com/zzz.png', }], }; From 4d5d3c142ef24d210dfea25a42b614cf9f42474b Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 29 Jun 2018 13:57:38 +0800 Subject: [PATCH 06/26] fix fileList in onChange when uid is 0, close #11089 --- components/upload/Upload.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/upload/Upload.tsx b/components/upload/Upload.tsx index b352727b05..455bbbfb9a 100644 --- a/components/upload/Upload.tsx +++ b/components/upload/Upload.tsx @@ -196,7 +196,10 @@ export default class Upload extends React.Component { if (result === false) { this.onChange({ file, - fileList: uniqBy(this.state.fileList.concat(fileList.map(fileToObject)), (item: UploadFile) => item.uid), + fileList: uniqBy( + this.state.fileList.concat(fileList.map(fileToObject)), + (item: UploadFile) => item.uid !== undefined + ), }); return false; } else if (result && (result as PromiseLike).then) { From ddfe8ad48a8c284ca65c5d0b0c54cbdb08569134 Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 29 Jun 2018 15:33:57 +0800 Subject: [PATCH 07/26] Adapt Table sorter icon style to @font-size-base https://gw.alipayobjects.com/zos/rmsportal/jKlytqFbAeMQGXaCYWdR.png => https://gw.alipayobjects.com/zos/rmsportal/InvEbivRsIcAQBuoEsJI.png --- components/table/style/index.less | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/table/style/index.less b/components/table/style/index.less index 3815a231b3..aa9eb40a71 100644 --- a/components/table/style/index.less +++ b/components/table/style/index.less @@ -229,7 +229,7 @@ margin-left: 8px; display: inline-block; width: 14px; - height: 14px; + height: @font-size-base; vertical-align: middle; text-align: center; font-weight: normal; @@ -237,10 +237,10 @@ &-up, &-down { - line-height: 6px; display: block; width: 14px; - height: 6px; + height: @font-size-base / 2 - 1px; + line-height: @font-size-base / 2 - 1px; cursor: pointer; position: relative; &:hover .@{iconfont-css-prefix} { From 47621acb6c1409df4671aa3ca81b338268e1ece4 Mon Sep 17 00:00:00 2001 From: Harshit Mehrotra Date: Sat, 30 Jun 2018 12:29:55 +0530 Subject: [PATCH 08/26] Fixed a typo from was misspelled as form --- components/tree-select/demo/treeData.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/tree-select/demo/treeData.md b/components/tree-select/demo/treeData.md index 555b2deafc..d56f5f9bb3 100644 --- a/components/tree-select/demo/treeData.md +++ b/components/tree-select/demo/treeData.md @@ -2,7 +2,7 @@ order: 2 title: zh-CN: 从数据直接生成 - en-US: Generate form tree data + en-US: Generate from tree data --- ## zh-CN From 763d32ac6820808fc3d04e1adbee92206b69d5c2 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 30 Jun 2018 18:49:24 +0800 Subject: [PATCH 09/26] Fix tslint --- components/upload/Upload.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/upload/Upload.tsx b/components/upload/Upload.tsx index 455bbbfb9a..32a61d041d 100644 --- a/components/upload/Upload.tsx +++ b/components/upload/Upload.tsx @@ -198,7 +198,7 @@ export default class Upload extends React.Component { file, fileList: uniqBy( this.state.fileList.concat(fileList.map(fileToObject)), - (item: UploadFile) => item.uid !== undefined + (item: UploadFile) => item.uid !== undefined, ), }); return false; From fcc055b39050e3858b23ea5ce2eb92c789dbc385 Mon Sep 17 00:00:00 2001 From: Aditya Padhi Date: Tue, 26 Jun 2018 18:54:48 +0530 Subject: [PATCH 10/26] Update index.en-US.md Updated to document by adding a property "destroyInactivePanel" which lets the user know about it behavior. --- components/collapse/index.en-US.md | 1 + 1 file changed, 1 insertion(+) diff --git a/components/collapse/index.en-US.md b/components/collapse/index.en-US.md index 849bef4c99..b9efb8ce4e 100644 --- a/components/collapse/index.en-US.md +++ b/components/collapse/index.en-US.md @@ -23,6 +23,7 @@ A content area which can be collapsed and expanded. | bordered | Toggles rendering of the border around the collapse block | boolean | `true` | | defaultActiveKey | Key of the initial active panel | string | - | | onChange | Callback function executed when active panel is changed | Function | - | +| destroyInactivePanel | Destroy Inactive Panel | boolean | `false` | ### Collapse.Panel From e90611773123ce1bb19517894d60c75ee79fb91e Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 30 Jun 2018 18:52:20 +0800 Subject: [PATCH 11/26] use eslint-tinker back in devDeps --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 78923f5a83..2d45f5a17e 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "eslint-plugin-jsx-a11y": "^6.0.2", "eslint-plugin-markdown": "~1.0.0-beta.4", "eslint-plugin-react": "^7.10.0", - "eslint-tinker-antd": "^0.5.0", + "eslint-tinker": "^0.5.0", "fetch-jsonp": "^1.0.3", "glob": "^7.1.1", "immutability-helper": "^2.5.0", From 7d038d1aee5d675b8c6e231d8abf7d55c7af02d2 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 30 Jun 2018 19:05:09 +0800 Subject: [PATCH 12/26] revert 4d5d3c142ef24d210dfea25a42b614cf9f42474b --- components/upload/Upload.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/upload/Upload.tsx b/components/upload/Upload.tsx index 32a61d041d..6115d922b7 100644 --- a/components/upload/Upload.tsx +++ b/components/upload/Upload.tsx @@ -198,7 +198,7 @@ export default class Upload extends React.Component { file, fileList: uniqBy( this.state.fileList.concat(fileList.map(fileToObject)), - (item: UploadFile) => item.uid !== undefined, + (item: UploadFile) => item.uid, ), }); return false; From 553901dfb81370083fd9d355af051a22150fba04 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 30 Jun 2018 21:13:22 +0800 Subject: [PATCH 13/26] Fix card background overflow when zoom in chrome, close #9085 --- components/style/themes/default.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/style/themes/default.less b/components/style/themes/default.less index 7ae7c98ad9..dc8e5ec653 100644 --- a/components/style/themes/default.less +++ b/components/style/themes/default.less @@ -378,7 +378,7 @@ // Card // --- @card-head-color: @heading-color; -@card-head-background: @component-background; +@card-head-background: transparent; @card-head-padding: 16px; @card-inner-head-padding: 12px; @card-padding-base: 24px; From a3e245731ba75313165358222fd3b024d3ed90f5 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 30 Jun 2018 21:56:41 +0800 Subject: [PATCH 14/26] code style --- components/transfer/search.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/transfer/search.tsx b/components/transfer/search.tsx index 281de2681d..cb5d807db9 100644 --- a/components/transfer/search.tsx +++ b/components/transfer/search.tsx @@ -16,7 +16,7 @@ export default class Search extends React.Component { }; handleChange = (e: React.ChangeEvent) => { - const onChange = this.props.onChange; + const { onChange } = this.props; if (onChange) { onChange(e); } @@ -24,8 +24,7 @@ export default class Search extends React.Component { handleClear = (e: React.MouseEvent) => { e.preventDefault(); - - const handleClear = this.props.handleClear; + const { handleClear } = this.props; if (handleClear) { handleClear(e); } From a516358298f56c4dca7e7c08cf3e20b3cc3556c6 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 30 Jun 2018 22:22:09 +0800 Subject: [PATCH 15/26] Fix wired Transfer repaint problem in IE or Edge close #9697 https://stackoverflow.com/q/27947912/3040605 --- components/transfer/list.tsx | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/components/transfer/list.tsx b/components/transfer/list.tsx index 483b277875..f0bb17731e 100644 --- a/components/transfer/list.tsx +++ b/components/transfer/list.tsx @@ -9,6 +9,10 @@ import Search from './search'; import Item from './item'; import triggerEvent from '../_util/triggerEvent'; +function isIEorEDGE() { + return (document as any).documentMode || /Edge/.test(navigator.userAgent); +} + function noop() { } @@ -52,6 +56,8 @@ export default class TransferList extends React.Component { this.props.handleClear(); + this.fixIERepaint(); } matchFilter = (text: string, item: TransferItem) => { @@ -131,6 +140,24 @@ export default class TransferList extends React.Component { + this.notFoundNode = node; + } + + // Fix IE/Edge repaint + // https://github.com/ant-design/ant-design/issues/9697 + // https://stackoverflow.com/q/27947912/3040605 + fixIERepaint() { + if (!isIEorEDGE()) { + return; + } + this.fixIERepaintTimer = window.setTimeout(() => { + if (this.notFoundNode) { + this.notFoundNode.className = this.notFoundNode.className; + } + }, 0); + } + render() { const { prefixCls, dataSource, titleText, checkedKeys, lazy, @@ -203,7 +230,7 @@ export default class TransferList extends React.Component {showItems} -
+
{notFoundContent}
From 5fe25d9c235a0ad0048fd2698fe4d6039c975ee2 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 1 Jul 2018 12:13:46 +0800 Subject: [PATCH 16/26] site: fix collapse all button and import it, close #11113 --- site/theme/en-US.js | 2 ++ site/theme/static/demo.less | 8 ++----- site/theme/template/Content/ComponentDoc.jsx | 23 +++++++++++--------- site/theme/zh-CN.js | 2 ++ 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/site/theme/en-US.js b/site/theme/en-US.js index 3ac7ff1897..d641a0bd13 100644 --- a/site/theme/en-US.js +++ b/site/theme/en-US.js @@ -17,6 +17,8 @@ module.exports = { 'app.content.edit-page': 'Edit this page on GitHub!', 'app.content.edit-demo': 'Edit this demo on GitHub!', 'app.component.examples': 'Examples', + 'app.component.examples.expand': 'Expand all code', + 'app.component.examples.collpse': 'Collpse all code', 'app.demo.copy': 'Copy code', 'app.demo.copied': 'Copied!', 'app.demo.codepen': 'Open in CodePen', diff --git a/site/theme/static/demo.less b/site/theme/static/demo.less index 7efea73890..1a4df1ae90 100644 --- a/site/theme/static/demo.less +++ b/site/theme/static/demo.less @@ -23,16 +23,12 @@ &-expand-trigger { cursor: pointer; font-size: 14px; - color: #9199ac; - margin-left: 5px; + color: #3b4357; + margin-left: 8px; opacity: .8; transition: all .3s; top: -2px; position: relative; - - &-active { - color: #3b4357; - } } &-title { diff --git a/site/theme/template/Content/ComponentDoc.jsx b/site/theme/template/Content/ComponentDoc.jsx index ecd90d5241..9c0cd53f51 100644 --- a/site/theme/template/Content/ComponentDoc.jsx +++ b/site/theme/template/Content/ComponentDoc.jsx @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import DocumentTitle from 'react-document-title'; import { FormattedMessage } from 'react-intl'; import classNames from 'classnames'; -import { Row, Col, Icon, Affix } from 'antd'; +import { Row, Col, Icon, Affix, Tooltip } from 'antd'; import { getChildren } from 'jsonml.js/lib/utils'; import Demo from './Demo'; import EditButton from './EditButton'; @@ -34,7 +34,7 @@ export default class ComponentDoc extends React.Component { const { content, meta } = doc; const { intl: { locale } } = this.context; const demos = Object.keys(props.demos).map(key => props.demos[key]); - const { expandAll: { expand } } = this.state; + const { expandAll } = this.state; const isSingleCol = meta.cols === 1; const leftChildren = []; @@ -48,7 +48,7 @@ export default class ComponentDoc extends React.Component { {...demoData} key={demoData.meta.filename} utils={props.utils} - expand={expand} + expand={expandAll} location={location} /> ); @@ -60,7 +60,7 @@ export default class ComponentDoc extends React.Component { }); const expandTriggerClass = classNames({ 'code-box-expand-trigger': true, - 'code-box-expand-trigger-active': expand, + 'code-box-expand-trigger-active': expandAll, }); const jumper = showedDemo.map((demo) => { @@ -100,12 +100,15 @@ export default class ComponentDoc extends React.Component { }

- + } + > + +

diff --git a/site/theme/zh-CN.js b/site/theme/zh-CN.js index 1738fcf318..bc716a4fc7 100644 --- a/site/theme/zh-CN.js +++ b/site/theme/zh-CN.js @@ -17,6 +17,8 @@ module.exports = { 'app.content.edit-page': '在 Github 上编辑此页!', 'app.content.edit-demo': '在 Github 上编辑此示例!', 'app.component.examples': '代码演示', + 'app.component.examples.expand': '展开全部代码', + 'app.component.examples.collpse': '收起全部代码', 'app.demo.copy': '复制代码', 'app.demo.copied': '复制成功', 'app.demo.codepen': '在 CodePen 中打开', From 7123a6da593c0a6fd396abd3ed419de1c53af2e8 Mon Sep 17 00:00:00 2001 From: valleykid Date: Mon, 2 Jul 2018 12:16:15 +0800 Subject: [PATCH 17/26] bump 3.6.5 --- CHANGELOG.en-US.md | 16 ++++++++++++++++ CHANGELOG.zh-CN.md | 16 ++++++++++++++++ package.json | 2 +- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index c856fa2ae0..9aefd61a85 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -15,6 +15,22 @@ timeline: true --- +## 3.6.5 + +`2018-07-02` + +- 🐞 Fixed collapse all button and import it. [#11113](https://github.com/ant-design/ant-design/issues/11113) +- 🐞 Fixed wired `Transfer` repaint problem in IE or Edge. [#9697](https://github.com/ant-design/ant-design/issues/9697) +- 🐞 Fixed `Card` background overflow when zoom in chrome. [#9085](https://github.com/ant-design/ant-design/issues/9085) +- 🐞 Fixed `Upload` fileList in onChange when uid is 0. [#11089](https://github.com/ant-design/ant-design/issues/11089) +- TypeScript + - 🐞 Fixed `Table` incompatible type `size`. [bf5b6ae1](https://github.com/ant-design/ant-design/commit/bf5b6ae1f3b5da4629a7d10a2d1764eaa3fbbb04) + - 🌟 Add `Select` missing showArrow option in types. [cde2a6b6](https://github.com/ant-design/ant-design/commit/cde2a6b6f011a5b3a367b3f58731def547bc98d8) +- 🌟 Add custom local support in `Pagination`. [babbbdd4](https://github.com/ant-design/ant-design/commit/babbbdd4e5c33ca050f8ee08969185c8d3269b4c) +- 🌟 Move max-width to ant-tooltip, so that it can be override by overlayStyle.maxWidth. [e2b359e9](https://github.com/ant-design/ant-design/commit/e2b359e9c3dae067eeba37a886f7896474c87e31) +- 🐞 Adjust `Select` mirror style to avoid to long string. [#11035](https://github.com/ant-design/ant-design/issues/11035) +- 🌟 Add `AutoComplete` onBlur & onFocus functions to properties. [#10920](https://github.com/ant-design/ant-design/pull/10920) + ## 3.6.4 `2018-06-23` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 2a05c8ec14..3299523c62 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -15,6 +15,22 @@ timeline: true --- +## 3.6.5 + +`2018-07-02` + +- 🐞 修复官网上的"展开全部"按钮不工作的问题。[#11113](https://github.com/ant-design/ant-design/issues/11113) +- 🐞 修复 `Transfer` 组件的文本 "Not Found" 在 IE 或 Edge 浏览器上显示异常。[#9697](https://github.com/ant-design/ant-design/issues/9697) +- 🐞 修复 Chrome 在缩放模式下,`Card` 组件的边框被标题的背景色覆盖。[#9085](https://github.com/ant-design/ant-design/issues/9085) +- 🐞 修复 `Upload` 组件中 uid 为0被误删除问题。[#11089](https://github.com/ant-design/ant-design/issues/11089) +- TypeScript + - 🐞 修复 `Table` 不兼容的类型 `size`。[bf5b6ae1](https://github.com/ant-design/ant-design/commit/bf5b6ae1f3b5da4629a7d10a2d1764eaa3fbbb04) + - 🌟 给 `Select` 组件添加 `showArrow` 的属性。[cde2a6b6](https://github.com/ant-design/ant-design/commit/cde2a6b6f011a5b3a367b3f58731def547bc98d8) +- 🌟 支持 `Pagination` 组件自定义语言。[babbbdd4](https://github.com/ant-design/ant-design/commit/babbbdd4e5c33ca050f8ee08969185c8d3269b4c) +- 🌟 调整 `Tooltip` 组件的 `max-width` 样式,使 `overlayStyle.maxWidth` 可覆盖。[e2b359e9](https://github.com/ant-design/ant-design/commit/e2b359e9c3dae067eeba37a886f7896474c87e31) +- 🐞 修复 `Select` 组件的样式,避免过长文本的溢出。[#11035](https://github.com/ant-design/ant-design/issues/11035) +- 🌟 给 `AutoComplete` 组件添加了 `onBlur` 和 `onFocus` 两个属性。[#10920](https://github.com/ant-design/ant-design/pull/10920) + ## 3.6.4 `2018-06-23` diff --git a/package.json b/package.json index 2d45f5a17e..d7a7c23b49 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "antd", - "version": "3.6.4", + "version": "3.6.5", "title": "Ant Design", "description": "An enterprise-class UI design language and React-based implementation", "homepage": "http://ant.design/", From 915a64feae3548be5c9fa931a4c374f05cb51b3c Mon Sep 17 00:00:00 2001 From: valleykid Date: Mon, 2 Jul 2018 13:55:25 +0800 Subject: [PATCH 18/26] docs: some words are improper --- CHANGELOG.en-US.md | 9 +++------ CHANGELOG.zh-CN.md | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 9aefd61a85..a9db79795a 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -19,17 +19,14 @@ timeline: true `2018-07-02` -- 🐞 Fixed collapse all button and import it. [#11113](https://github.com/ant-design/ant-design/issues/11113) - 🐞 Fixed wired `Transfer` repaint problem in IE or Edge. [#9697](https://github.com/ant-design/ant-design/issues/9697) - 🐞 Fixed `Card` background overflow when zoom in chrome. [#9085](https://github.com/ant-design/ant-design/issues/9085) -- 🐞 Fixed `Upload` fileList in onChange when uid is 0. [#11089](https://github.com/ant-design/ant-design/issues/11089) - TypeScript - 🐞 Fixed `Table` incompatible type `size`. [bf5b6ae1](https://github.com/ant-design/ant-design/commit/bf5b6ae1f3b5da4629a7d10a2d1764eaa3fbbb04) - - 🌟 Add `Select` missing showArrow option in types. [cde2a6b6](https://github.com/ant-design/ant-design/commit/cde2a6b6f011a5b3a367b3f58731def547bc98d8) -- 🌟 Add custom local support in `Pagination`. [babbbdd4](https://github.com/ant-design/ant-design/commit/babbbdd4e5c33ca050f8ee08969185c8d3269b4c) -- 🌟 Move max-width to ant-tooltip, so that it can be override by overlayStyle.maxWidth. [e2b359e9](https://github.com/ant-design/ant-design/commit/e2b359e9c3dae067eeba37a886f7896474c87e31) + - 🐞 Fixed `Select` missing showArrow option in types. [cde2a6b6](https://github.com/ant-design/ant-design/commit/cde2a6b6f011a5b3a367b3f58731def547bc98d8) +- 🐞 Add custom local support in `Pagination`. [babbbdd4](https://github.com/ant-design/ant-design/commit/babbbdd4e5c33ca050f8ee08969185c8d3269b4c) +- 🐞 Move max-width to ant-tooltip, so that it can be override by overlayStyle.maxWidth. [e2b359e9](https://github.com/ant-design/ant-design/commit/e2b359e9c3dae067eeba37a886f7896474c87e31) - 🐞 Adjust `Select` mirror style to avoid to long string. [#11035](https://github.com/ant-design/ant-design/issues/11035) -- 🌟 Add `AutoComplete` onBlur & onFocus functions to properties. [#10920](https://github.com/ant-design/ant-design/pull/10920) ## 3.6.4 diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 3299523c62..3da733da41 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -19,17 +19,14 @@ timeline: true `2018-07-02` -- 🐞 修复官网上的"展开全部"按钮不工作的问题。[#11113](https://github.com/ant-design/ant-design/issues/11113) - 🐞 修复 `Transfer` 组件的文本 "Not Found" 在 IE 或 Edge 浏览器上显示异常。[#9697](https://github.com/ant-design/ant-design/issues/9697) - 🐞 修复 Chrome 在缩放模式下,`Card` 组件的边框被标题的背景色覆盖。[#9085](https://github.com/ant-design/ant-design/issues/9085) -- 🐞 修复 `Upload` 组件中 uid 为0被误删除问题。[#11089](https://github.com/ant-design/ant-design/issues/11089) - TypeScript - 🐞 修复 `Table` 不兼容的类型 `size`。[bf5b6ae1](https://github.com/ant-design/ant-design/commit/bf5b6ae1f3b5da4629a7d10a2d1764eaa3fbbb04) - - 🌟 给 `Select` 组件添加 `showArrow` 的属性。[cde2a6b6](https://github.com/ant-design/ant-design/commit/cde2a6b6f011a5b3a367b3f58731def547bc98d8) -- 🌟 支持 `Pagination` 组件自定义语言。[babbbdd4](https://github.com/ant-design/ant-design/commit/babbbdd4e5c33ca050f8ee08969185c8d3269b4c) -- 🌟 调整 `Tooltip` 组件的 `max-width` 样式,使 `overlayStyle.maxWidth` 可覆盖。[e2b359e9](https://github.com/ant-design/ant-design/commit/e2b359e9c3dae067eeba37a886f7896474c87e31) + - 🐞 修复 `Select` 组件的 `showArrow` 类型定义。[cde2a6b6](https://github.com/ant-design/ant-design/commit/cde2a6b6f011a5b3a367b3f58731def547bc98d8) +- 🐞 修复 Pagination 全局 locale 设置不能被组件 locale 覆盖的问题。[babbbdd4](https://github.com/ant-design/ant-design/commit/babbbdd4e5c33ca050f8ee08969185c8d3269b4c) +- 🐞 修复 `Tooltip` 组件的 `max-width` 样式,使 `overlayStyle.maxWidth` 可覆盖。[e2b359e9](https://github.com/ant-design/ant-design/commit/e2b359e9c3dae067eeba37a886f7896474c87e31) - 🐞 修复 `Select` 组件的样式,避免过长文本的溢出。[#11035](https://github.com/ant-design/ant-design/issues/11035) -- 🌟 给 `AutoComplete` 组件添加了 `onBlur` 和 `onFocus` 两个属性。[#10920](https://github.com/ant-design/ant-design/pull/10920) ## 3.6.4 From 8c156afb39a1a3f8ddcfb15ee89d21495556a48c Mon Sep 17 00:00:00 2001 From: agent-z <1607291079@qq.com> Date: Mon, 2 Jul 2018 17:38:39 +0800 Subject: [PATCH 19/26] Update use-with-create-react-app.zh-CN.md --- docs/react/use-with-create-react-app.zh-CN.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/react/use-with-create-react-app.zh-CN.md b/docs/react/use-with-create-react-app.zh-CN.md index f66fec13a9..5bd6fc8b1a 100644 --- a/docs/react/use-with-create-react-app.zh-CN.md +++ b/docs/react/use-with-create-react-app.zh-CN.md @@ -182,6 +182,7 @@ $ yarn add react-app-rewire-less --dev - config = injectBabelPlugin(['import', { libraryName: 'antd', style: 'css' }], config); + config = injectBabelPlugin(['import', { libraryName: 'antd', style: true }], config); + config = rewireLess.withLoaderOptions({ ++ javascriptEnabled: true, + modifyVars: { "@primary-color": "#1DA57A" }, + })(config, env); return config; From ee1f450e041a7c34583064ba36a631cf9944d5f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=8F=E5=8F=B3?= Date: Mon, 2 Jul 2018 17:56:16 +0800 Subject: [PATCH 20/26] Update use-with-create-react-app.en-US.md --- docs/react/use-with-create-react-app.en-US.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/react/use-with-create-react-app.en-US.md b/docs/react/use-with-create-react-app.en-US.md index 5915f232a4..03cd0e14c4 100644 --- a/docs/react/use-with-create-react-app.en-US.md +++ b/docs/react/use-with-create-react-app.en-US.md @@ -185,6 +185,7 @@ $ yarn add react-app-rewire-less --dev - config = injectBabelPlugin(['import', { libraryName: 'antd', style: 'css' }], config); + config = injectBabelPlugin(['import', { libraryName: 'antd', style: true }], config); // change importing css to less + config = rewireLess.withLoaderOptions({ ++ javascriptEnabled: true, + modifyVars: { "@primary-color": "#1DA57A" }, + })(config, env); return config; From 450a3142ee3a618d9802e5405b43ad1e59695dd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=84=9A=E9=81=93?= Date: Mon, 2 Jul 2018 10:44:55 +0800 Subject: [PATCH 21/26] fix: fix datepicker selected item style, close #9529 --- components/date-picker/style/Calendar.less | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/date-picker/style/Calendar.less b/components/date-picker/style/Calendar.less index 623a7b1787..3b1fcd4163 100644 --- a/components/date-picker/style/Calendar.less +++ b/components/date-picker/style/Calendar.less @@ -211,6 +211,10 @@ } &-selected-day &-date { + background: tint(@primary-color, 80%); + } + + &-selected-date &-date { background: @primary-color; color: #fff; border: @border-width-base @border-style-base transparent; From 004561ba1f3b894dc164225e9e27b0a90679d15c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=84=9A=E9=81=93?= Date: Mon, 2 Jul 2018 11:01:38 +0800 Subject: [PATCH 22/26] fix style in range select --- components/date-picker/style/Calendar.less | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/components/date-picker/style/Calendar.less b/components/date-picker/style/Calendar.less index 3b1fcd4163..df76e508f1 100644 --- a/components/date-picker/style/Calendar.less +++ b/components/date-picker/style/Calendar.less @@ -214,13 +214,15 @@ background: tint(@primary-color, 80%); } - &-selected-date &-date { - background: @primary-color; - color: #fff; - border: @border-width-base @border-style-base transparent; - - &:hover { + &-selected-date, &-selected-start-date, &-selected-end-date { + .@{calendar-prefix-cls}-date { background: @primary-color; + color: #fff; + border: @border-width-base @border-style-base transparent; + + &:hover { + background: @primary-color; + } } } From 8607c58abc2dd9f1a999035af97065e5e8c4587e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=8F=E5=8F=B3?= Date: Tue, 3 Jul 2018 00:10:14 +0800 Subject: [PATCH 23/26] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9d1eed3c3a..a848bb518b 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ # Ant Design -[![](https://img.shields.io/travis/ant-design/ant-design.svg?style=flat-square)](https://travis-ci.org/ant-design/ant-design) +[![](https://img.shields.io/travis/ant-design/ant-design/master.svg?style=flat-square)](https://travis-ci.org/ant-design/ant-design) [![Codecov](https://img.shields.io/codecov/c/github/ant-design/ant-design/master.svg?style=flat-square)](https://codecov.io/gh/ant-design/ant-design/branch/master) [![Dependencies](https://img.shields.io/david/ant-design/ant-design.svg)](https://david-dm.org/ant-design/ant-design) [![DevDependencies](https://img.shields.io/david/dev/ant-design/ant-design.svg)](https://david-dm.org/ant-design/ant-design#info=devDependencies&view=list) From 60ebb434c115330f3c4cd848e53f72cad3cabd7e Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 3 Jul 2018 14:04:46 +0800 Subject: [PATCH 24/26] Fix form controls align issue in IE11 close #9827 close #11133 --- components/cascader/style/index.less | 1 - components/date-picker/style/Picker.less | 1 - components/input-number/style/index.less | 1 - 3 files changed, 3 deletions(-) diff --git a/components/cascader/style/index.less b/components/cascader/style/index.less index 73c0b32b62..a4c5258942 100644 --- a/components/cascader/style/index.less +++ b/components/cascader/style/index.less @@ -13,7 +13,6 @@ background-color: transparent !important; cursor: pointer; width: 100%; - display: block; position: static; } diff --git a/components/date-picker/style/Picker.less b/components/date-picker/style/Picker.less index ca574099df..9640c3e37e 100644 --- a/components/date-picker/style/Picker.less +++ b/components/date-picker/style/Picker.less @@ -39,7 +39,6 @@ &-input { outline: none; - display: block; } &:hover &-input:not(.@{ant-prefix}-input-disabled) { diff --git a/components/input-number/style/index.less b/components/input-number/style/index.less index 7e83cf08a7..f4ab497690 100644 --- a/components/input-number/style/index.less +++ b/components/input-number/style/index.less @@ -77,7 +77,6 @@ border: 0; border-radius: @border-radius-base; padding: 0 @control-padding-horizontal - 1px; - display: block; .placeholder(); } From 4aabc5374497359e13a958ef81ae4569db6164a7 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 3 Jul 2018 15:35:56 +0800 Subject: [PATCH 25/26] Fix InputNumber handler background https://gw.alipayobjects.com/zos/rmsportal/QDxJpiArMgQJCLhmVvEZ.png --- components/input-number/style/index.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/input-number/style/index.less b/components/input-number/style/index.less index f4ab497690..a90e63d62a 100644 --- a/components/input-number/style/index.less +++ b/components/input-number/style/index.less @@ -102,7 +102,7 @@ border-left: @border-width-base @border-style-base @border-color-base; width: 22px; height: 100%; - background: transparent; + background: @component-background; position: absolute; top: 0; right: 0; From cde8bc836135cc933659fdb0b624fb9548cbdacd Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 3 Jul 2018 15:46:12 +0800 Subject: [PATCH 26/26] Selected value in Cascader should be gray when focus search input --- components/cascader/index.tsx | 3 ++- components/cascader/style/index.less | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/components/cascader/index.tsx b/components/cascader/index.tsx index 79c79423cd..290f11765b 100644 --- a/components/cascader/index.tsx +++ b/components/cascader/index.tsx @@ -341,7 +341,7 @@ export default class Cascader extends React.Component