From 593df02d29cbec558d02829c5de624eb50b57c8a Mon Sep 17 00:00:00 2001 From: xrkffgg Date: Thu, 31 Dec 2020 17:33:06 +0800 Subject: [PATCH 01/11] style: optimize card cover style (#28624) --- components/card/style/index.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/card/style/index.less b/components/card/style/index.less index c48a215a1c..519a27afcb 100644 --- a/components/card/style/index.less +++ b/components/card/style/index.less @@ -138,9 +138,9 @@ } &-bordered &-cover { + margin-top: -1px; margin-right: -1px; margin-left: -1px; - transform: translateY(-1px); } &-cover { From dba559034aeac7c6e20604f51bebfa853ce78d46 Mon Sep 17 00:00:00 2001 From: pasinter Date: Fri, 1 Jan 2021 14:40:00 +0100 Subject: [PATCH 02/11] docs: use correct link for the list of input props (#28641) --- components/input/index.en-US.md | 2 +- components/input/index.zh-CN.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/input/index.en-US.md b/components/input/index.en-US.md index b816ff33d8..3ce20646de 100644 --- a/components/input/index.en-US.md +++ b/components/input/index.en-US.md @@ -36,7 +36,7 @@ A basic widget for getting the user input is a text field. Keyboard and mouse ca > When `Input` is used in a `Form.Item` context, if the `Form.Item` has the `id` and `options` props defined then `value`, `defaultValue`, and `id` props of `Input` are automatically set. -The rest of the props of Input are exactly the same as the original [input](https://facebook.github.io/react/docs/events.html#supported-events). +The rest of the props of Input are exactly the same as the original [input](https://reactjs.org/docs/dom-elements.html#all-supported-html-attributes). ### Input.TextArea diff --git a/components/input/index.zh-CN.md b/components/input/index.zh-CN.md index 8f84709138..b2fccae42f 100644 --- a/components/input/index.zh-CN.md +++ b/components/input/index.zh-CN.md @@ -37,7 +37,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/xS9YEJhfe/Input.svg > 如果 `Input` 在 `Form.Item` 内,并且 `Form.Item` 设置了 `id` 和 `options` 属性,则 `value` `defaultValue` 和 `id` 属性会被自动设置。 -Input 的其他属性和 React 自带的 [input](https://facebook.github.io/react/docs/events.html#supported-events) 一致。 +Input 的其他属性和 React 自带的 [input](https://reactjs.org/docs/dom-elements.html#all-supported-html-attributes) 一致。 ### Input.TextArea From 2f5d3f0418dfd37488121c916a37ad81cf6d0f78 Mon Sep 17 00:00:00 2001 From: mumiao Date: Fri, 1 Jan 2021 21:40:42 +0800 Subject: [PATCH 03/11] fix: upload fileList with immuable data (#28636) * fix: upload fileList with immuable data * perf: optimize code * ci: fix lint error * feat: reduce cycles counts * feat: reduce cycles counts * ci: fix lint error * ci: fix lint error --- components/upload/Upload.tsx | 18 ++++++++++++---- components/upload/__tests__/upload.test.js | 24 ++++++++++++++++++++++ package.json | 1 + 3 files changed, 39 insertions(+), 4 deletions(-) diff --git a/components/upload/Upload.tsx b/components/upload/Upload.tsx index 294a7d52a6..07f815c153 100644 --- a/components/upload/Upload.tsx +++ b/components/upload/Upload.tsx @@ -162,22 +162,32 @@ const InternalUpload: React.ForwardRefRenderFunction = (pr }; const handleRemove = (file: UploadFile) => { + let currentFile: UploadFile; Promise.resolve(typeof onRemove === 'function' ? onRemove(file) : onRemove).then(ret => { // Prevent removing file if (ret === false) { return; } - const removedFileList = removeFileItem(file, getFileList()); + const fileList = getFileList(); + const removedFileList = removeFileItem(file, fileList); if (removedFileList) { - file.status = 'removed'; + currentFile = { ...file, status: 'removed' }; + fileList?.some(item => { + const matchKey = currentFile.uid !== undefined ? 'uid' : 'name'; + if (item[matchKey] === currentFile[matchKey]) { + item.status = 'removed'; + return true; + } + return false; + }); if (upload.current) { - upload.current.abort(file); + upload.current.abort(currentFile); } onInternalChange({ - file, + file: currentFile, fileList: removedFileList, }); } diff --git a/components/upload/__tests__/upload.test.js b/components/upload/__tests__/upload.test.js index a53af16641..0f9fb7678f 100644 --- a/components/upload/__tests__/upload.test.js +++ b/components/upload/__tests__/upload.test.js @@ -2,6 +2,7 @@ import React from 'react'; import { mount } from 'enzyme'; import { act } from 'react-dom/test-utils'; +import produce from 'immer'; import Upload from '..'; import Form from '../../form'; import { T, fileToObject, getFileItem, removeFileItem } from '../utils'; @@ -326,6 +327,29 @@ describe('Upload', () => { expect(targetItem).toEqual(fileList.slice(1)); }); + it('remove fileItem and fileList with immuable data', () => { + const file = { uid: '-3', name: 'item3.jpg' }; + const fileList = produce( + [ + { + uid: '-1', + name: 'item.jpg', + }, + { + uid: '-2', + name: 'item2.jpg', + }, + ], + draftState => { + draftState.push({ + uid: '-3', + name: 'item3.jpg', + }); + }, + ); + const targetItem = removeFileItem(file, fileList); + expect(targetItem).toEqual(fileList.slice(0, 2)); + }); it('should not be able to remove fileItem', () => { const file = { uid: '-3', name: 'item.jpg' }; const fileList = [ diff --git a/package.json b/package.json index 7180750f3b..5d7cf76f8f 100644 --- a/package.json +++ b/package.json @@ -217,6 +217,7 @@ "husky": "^4.0.3", "identity-obj-proxy": "^3.0.0", "ignore-emit-webpack-plugin": "^2.0.6", + "immer": "^8.0.0", "immutability-helper": "^3.0.0", "inquirer": "^7.1.0", "intersection-observer": "^0.12.0", From 2dee8eaa00276b30865bf7f827780069f944b5ad Mon Sep 17 00:00:00 2001 From: xrkffgg Date: Sat, 2 Jan 2021 23:59:32 +0800 Subject: [PATCH 04/11] ci: update issues helper version (#28645) * ci: update issues helper version * Update issue-close-require.yml --- .github/workflows/issue-check-inactive.yml | 2 +- .github/workflows/issue-close-require.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/issue-check-inactive.yml b/.github/workflows/issue-check-inactive.yml index f49273f659..82bb9effd6 100644 --- a/.github/workflows/issue-check-inactive.yml +++ b/.github/workflows/issue-check-inactive.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: check-inactive - uses: actions-cool/issues-helper@v1.4 + uses: actions-cool/issues-helper@v1.7 with: actions: 'check-inactive' token: ${{ secrets.ANT_BOT_TOKEN }} diff --git a/.github/workflows/issue-close-require.yml b/.github/workflows/issue-close-require.yml index 376e4c6d95..a65fbe1f77 100644 --- a/.github/workflows/issue-close-require.yml +++ b/.github/workflows/issue-close-require.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: need reproduce - uses: actions-cool/issues-helper@v1.4 + uses: actions-cool/issues-helper@v1.7 with: actions: 'close-issues' token: ${{ secrets.ANT_BOT_TOKEN }} @@ -17,7 +17,7 @@ jobs: inactive-day: 3 - name: needs more info - uses: actions-cool/issues-helper@v1.4 + uses: actions-cool/issues-helper@v1.7 with: actions: 'close-issues' token: ${{ secrets.ANT_BOT_TOKEN }} From bd88f96bb53ae773eb0a35d88fed5f39bc94a0c5 Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 4 Jan 2021 10:59:16 +0800 Subject: [PATCH 05/11] docs: add release date close #28649 --- CHANGELOG.en-US.md | 2 ++ CHANGELOG.zh-CN.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 31e482ce89..98e6c00ae5 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -17,6 +17,8 @@ timeline: true ## 4.9.4 +`2020-12-16` + - 🐞 Fix Menu delayed hover color transition in Chrome. [#28372](https://github.com/ant-design/ant-design/pull/28372) - 🐞 Fix Tree node connection line position problem. [#28354](https://github.com/ant-design/ant-design/pull/28354) [@maksnester](https://github.com/maksnester) - 💄 Fix Table fixed column `z-index` which makes Dropdown not showing on top. [#28346](https://github.com/ant-design/ant-design/pull/28346) diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index f91f4b63f3..eefd342ce5 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -17,6 +17,8 @@ timeline: true ## 4.9.4 +`2020-12-16` + - 🐞 修复 Menu 在 Chrome 下 hover 色延迟变化的问题。[#28372](https://github.com/ant-design/ant-design/pull/28372) - 🐞 修复 Tree 的节点连接线在滚动时位置偏移的问题。[#28354](https://github.com/ant-design/ant-design/pull/28354) [@maksnester](https://github.com/maksnester) - 💄 修复 Table 固定列 `z-index` 样式让 Dropdown 无法展示在最顶层的问题。[#28346](https://github.com/ant-design/ant-design/pull/28346) From 3ed44114ac156e889d4eda9266d16366d2b2d61b Mon Sep 17 00:00:00 2001 From: Meowu <474384902@qq.com> Date: Mon, 4 Jan 2021 11:17:27 +0800 Subject: [PATCH 06/11] fix: no need to filter filterdKeys for custom filterDropdown. (#28627) * fix: no need to filter filterdKeys for custom filterDropdown. * fix: only transform array of filterdValue to string. --- .../table/__tests__/Table.filter.test.js | 66 ++++++++++++++++++- components/table/hooks/useFilter/index.tsx | 28 ++++---- 2 files changed, 82 insertions(+), 12 deletions(-) diff --git a/components/table/__tests__/Table.filter.test.js b/components/table/__tests__/Table.filter.test.js index 37f62f6ee0..ea5687472e 100644 --- a/components/table/__tests__/Table.filter.test.js +++ b/components/table/__tests__/Table.filter.test.js @@ -304,6 +304,34 @@ describe('Table.filter', () => { expect(wrapper.find('tbody tr').length).toBe(4); }); + it('should handle filteredValue and non-array filterValue as expected', () => { + const wrapper = mount( + createTable({ + columns: [ + { + ...column, + filteredValue: ['Lucy', 12, true], + }, + ], + }), + ); + function getFilterMenu() { + return wrapper.find('FilterDropdown'); + } + + expect(getFilterMenu().props().filterState.filteredKeys).toEqual(['Lucy', '12', 'true']); + + wrapper.setProps({ + columns: [ + { + ...column, + filteredValue: null, + }, + ], + }); + expect(getFilterMenu().props().filterState.filteredKeys).toEqual(null); + }); + it('can be controlled by filteredValue null', () => { const wrapper = mount( createTable({ @@ -453,7 +481,7 @@ describe('Table.filter', () => { const wrapper = mount(createTable({ onChange: handleChange })); wrapper.find('.ant-dropdown-trigger').first().simulate('click'); - wrapper.find('.ant-table-filter-dropdown-btns .ant-btn-link').simulate('click'); + wrapper.find('.ant-table-filter-dropdown-btns .ant-btn-primary').simulate('click'); expect(handleChange).not.toHaveBeenCalled(); }); @@ -842,6 +870,42 @@ describe('Table.filter', () => { expect(onChange).not.toHaveBeenCalled(); }); + it('should trigger onChange with correct params if defines custom filterDropdown', () => { + const onChange = jest.fn(); + const filterDropdown = ({ setSelectedKeys, confirm }) => ( +
+ setSelectedKeys([e.target.value])} /> + +
+ ); + const wrapper = mount( + createTable({ + onChange, + columns: [ + { + title: 'Name', + dataIndex: 'name', + key: 'name', + filterDropdown, + }, + ], + }), + ); + wrapper.find('.ant-dropdown-trigger').first().simulate('click'); + wrapper + .find('input') + .first() + .simulate('change', { target: { value: 'test' } }); + wrapper.find('.confirm-btn').first().simulate('click'); + expect(onChange).toHaveBeenCalled(); + onChange.mock.calls.forEach(([, currentFilters]) => { + const [, val] = Object.entries(currentFilters)[0]; + expect(val).toEqual(['test']); + }); + }); + // https://github.com/ant-design/ant-design/issues/17089 it('not crash when dynamic change filter', () => { const onChange = jest.fn(); diff --git a/components/table/hooks/useFilter/index.tsx b/components/table/hooks/useFilter/index.tsx index d47a204e60..2cc2620e29 100644 --- a/components/table/hooks/useFilter/index.tsx +++ b/components/table/hooks/useFilter/index.tsx @@ -34,7 +34,9 @@ function collectFilterStates( } else if (column.filters || 'filterDropdown' in column || 'onFilter' in column) { if ('filteredValue' in column) { // Controlled - const filteredValues = (column.filteredValue || []).map(String); + const filteredValues = Array.isArray(column.filteredValue) + ? column.filteredValue.map(String) + : column.filteredValue; filterStates.push({ column, key: getColumnKey(column, columnPos), @@ -121,17 +123,21 @@ function generateFilterInfo(filterStates: FilterState[]) const currentFilters: Record = {}; filterStates.forEach(({ key, filteredKeys, column }) => { - const { filters } = column; - const originKeys: ColumnFilterItem['value'][] = []; - if (Array.isArray(filteredKeys)) { - filters?.forEach((filter: ColumnFilterItem) => { - if (filteredKeys.includes(String(filter.value))) { - originKeys.push(filter.value); - } - }); - currentFilters[key] = originKeys; + const { filters, filterDropdown } = column; + if (filterDropdown) { + currentFilters[key] = filteredKeys || null; } else { - currentFilters[key] = null; + const originKeys: ColumnFilterItem['value'][] = []; + if (Array.isArray(filteredKeys)) { + filters?.forEach((filter: ColumnFilterItem) => { + if (filteredKeys.includes(String(filter.value))) { + originKeys.push(filter.value); + } + }); + currentFilters[key] = originKeys; + } else { + currentFilters[key] = null; + } } }); From c0035d9b35683b4e2e7a2b2bf759879182e83951 Mon Sep 17 00:00:00 2001 From: Wei Zhu Date: Mon, 4 Jan 2021 11:52:32 +0800 Subject: [PATCH 07/11] docs: Release 4.10.0 (#28642) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add 4.10.0 changelog * bump 4.10.0 * update changelog * Update changelog * fix typo * update changelog * update changelog * docs: Update CHANGELOG.zh-CN.md Co-authored-by: 偏右 Co-authored-by: 二货机器人 Co-authored-by: 偏右 --- CHANGELOG.en-US.md | 57 ++++++++++++++++++++++++++++++++++++++++++++++ CHANGELOG.zh-CN.md | 57 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- 3 files changed, 115 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 98e6c00ae5..9784e7c2fd 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -15,6 +15,63 @@ timeline: true --- +## 4.10.0 + +`2021-01-04` + +🎉 Happy New Year! + +- 🐞 Fix the compatibility issue of less 4.0.0. +- 🐞 Fix the problem of cursor jumping when Typography is editable. [#28545](https://github.com/ant-design/ant-design/pull/28545) +- 🐞 Fix the problem that repeatedly clicking on expanded nodes when Tree dynamically loads data will lead to wrong status.[#28349](https://github.com/ant-design/ant-design/issues/28349) [@liuchao233](https://github.com/react-component/tree/pull/401) +- 🐞 Fix the problem that TreeSelect & Select cannot open the dropdown menu when it's `searchValue` has value. [#28574](https://github.com/ant-design/ant-design/pull/28574) +- 🐞 Fix Dropdown disabled menu item link style. [#28578](https://github.com/ant-design/ant-design/pull/28578) +- 🐞 Fix Progress `steps` display accuracy issue. [#28530](https://github.com/ant-design/ant-design/pull/28530) [@gaoryrt](https://github.com/gaoryrt) +- 🐞 Fix Radio align issue in Chrome. [#28616](https://github.com/ant-design/ant-design/pull/28616) +- 🐞 Fix Collapse arrow position not aligned when change @collapse-header-padding variable. [#28507](https://github.com/ant-design/ant-design/pull/28507) +- 💄 Optimize the white border style of Card images. [#28624](https://github.com/ant-design/ant-design/pull/28624) +- Input + - 🐞 Fix TextArea value get cut when input chinese words. [#28456](https://github.com/ant-design/ant-design/pull/28456) + - 🆕 The `showCount` property of Input.TextArea now supports passing in a method to customize the display format of the number. [#28145](https://github.com/ant-design/ant-design/pull/28145) [@MrHeer](https://github.com/MrHeer) + - 🆕 Input `focus` supports configuring the cursor position when getting focus. [#28602](https://github.com/ant-design/ant-design/pull/28602) +- Modal + - 🆕 Modal.method adds an `afterClose` callback that will be triggered after the Modal is completely closed. [#28053](https://github.com/ant-design/ant-design/pull/28053) [@liuchao233](https://github.com/liuchao233) + - 🐞 Fix the problem that Modal can be dragged outside the viewport. [#28438](https://github.com/ant-design/ant-design/pull/28527) [@mumiao](https://github.com/mumiao) +- Table + - 🐞 Fix the problem that Table childrenColumnName and checkStrictly={false} cannot be used together. [#28568](https://github.com/ant-design/ant-design/pull/28568) + - 🐞 Fix Table selection abnormal behavior when inside Checkbox.Group. [#28576](https://github.com/ant-design/ant-design/pull/28576) + - 🐞 Fix the problem that the sticky header style is messy when there is no data. [#28323](https://github.com/ant-design/ant-design/issues/28323) + - 🐞 Fix the problem that `onChange` listener always receives empty list as `filters` parameter if use a custom `filterDropdown`. [#28627](https://github.com/ant-design/ant-design/pull/28627) [@Meowu](https://github.com/Meowu) + - 🆕 Adds `expandable.columnWidth` to customize the width of the expanded column. [#28249](https://github.com/ant-design/ant-design/pull/28249) + - 🆕 Adds clear all option from selection. [#28580](https://github.com/ant-design/ant-design/pull/28580) [@n0ruSh](https://github.com/ant-design/ant-design/pull/285) +- Image + - 🐞 Fix the misalignment issue of Image component.[#28439](https://github.com/ant-design/ant-design/pull/28439) [@MoeCasts](https://github.com/MoeCasts) + - 💄 Adds preview style. [#28235](https://github.com/ant-design/ant-design/pull/28235) + - 🆕 Adds functionality for zoom in\out by sliding the wheel. [#react-component/image/52](https://github.com/react-component/image/pull/52) [@OmriGM](https://github.com/OmriGM) + - 🆕 Support separate settings url for preview images. [#react-component/image/56](https://github.com/react-component/image/pull/56) [@wangcch](https://github.com/wangcch) +- Upload + - 🐞 Fix a warning even when not using `transformFile`. [#28455](https://github.com/ant-design/ant-design/pull/28455) [@YanYuanFE](https://github.com/YanYuanFE) + - 🐞 Fix Upload `fileList` cannot work with data that is produced by immer. [#28636](https://github.com/ant-design/ant-design/pull/28636) [@mumiao](https://github.com/mumiao) + - 🆕 Upload adds a new `maxCount` property to limit the number of files. [#28367](https://github.com/ant-design/ant-design/pull/28367) +- DatePicker + - 🚀 Optimize the logic of `disabledDate`. [#react-component/picker/191](https://github.com/react-component/picker/pull/191) + - 🆕 Adds `onKeyDown` callback. [#react-component/picker/138](https://github.com/react-component/picker/pull/138) [@conquera99](https://github.com/react-component/picker/pull/138) +- Select + - 🐞 Fix issue where `options` update does not trigger the selection box content update. [#react-component/select/580](https://github.com/react-component/select/pull/580) [@jameslahm](https://github.com/jameslahm) + - 🐞 Fix the problem that the dropdown box cannot be opened after clicking the option with `tagRender`. [react-component/select/582](https://github.com/react-component/select/pull/582) [@mumiao](https://github.com/mumiao) + - 🐞 Fix the problem that `tokenSeparators` can not recognize the separator correctly under Chinese input method. [#28564](https://github.com/ant-design/ant-design/issues/28564) + - 🆕 Adds `scrollTo` to the `ref`. [#react-component/select/565](https://github.com/react-component/select/pull/565) + - 🆕 `maxTagCount` supports `responsive` in `multiple` mode. [#28520](https://github.com/ant-design/ant-design/pull/28520) +- 🆕 Slider add a new `range.draggableTrack` prop. [#28592](https://github.com/ant-design/ant-design/pull/28592) +- 🆕 Descriptions support setting `labelStyle` & `contentStyle` directly. [#28613](https://github.com/ant-design/ant-design/pull/28613) +- 🆕 message added a new `onClick` callback that will be triggered when the message is clicked. [#28148](https://github.com/ant-design/ant-design/pull/28148) [@ZeroTo0ne](https://github.com/ant-design/ant-design/pull/28148) +- 🆕 The `scrollToFirstError` property of the Form adds support for setting the position for scrolling. [#28272](https://github.com/ant-design/ant-design/pull/28272) [@vouis](https://github.com/vouis) +- 🆕 Steps support reponsive which allows to turn off reponsive change. [#28459](https://github.com/ant-design/ant-design/pull/28459) +- 🌐 Localization + - 🇭🇷 Improved Croatian language support. [#28458](https://github.com/ant-design/ant-design/pull/28458) +- TypeScript + - ⚒️ Fix `title` type of PageHeader. [#28374](https://github.com/ant-design/ant-design/pull/28374) [@zhukovvandrei](https://github.com/zhukovvandrei) + ## 4.9.4 `2020-12-16` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index eefd342ce5..42c60b254b 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -15,6 +15,63 @@ timeline: true --- +## 4.10.0 + +`2021-01-04` + +🎉 新年快乐! + +- 🐞 修复不兼容 less 4.0.0 的问题。 +- 🐞 修复 Typography 可编辑态光标跳动的问题。[#28545](https://github.com/ant-design/ant-design/pull/28545) +- 🐞 修复 Tree 动态加载数据时重复点击展开节点会导致状态错误的问题。[#28349](https://github.com/ant-design/ant-design/issues/28349) [@liuchao233](https://github.com/react-component/tree/pull/401) +- 🐞 修复 TreeSelect & Select `searchValue` 在受控且有值时,下拉菜单无法打开的问题。[#28574](https://github.com/ant-design/ant-design/pull/28574) +- 🐞 修复 Dropdown 禁用菜单项内的链接样式。[#28578](https://github.com/ant-design/ant-design/pull/28578) +- 🐞 修复 Progress `steps` 显示精度问题。[#28530](https://github.com/ant-design/ant-design/pull/28530) [@gaoryrt](https://github.com/gaoryrt) +- 🐞 修复 Radio 在 Chrome 下的对齐样式问题。[#28616](https://github.com/ant-design/ant-design/pull/28616) +- 🐞 修复 Collapse 修改 `@collapse-header-padding` 时箭头位置不居中的问题。[#28507](https://github.com/ant-design/ant-design/pull/28507) +- 💄 优化 Card 图片白边样式。[#28624](https://github.com/ant-design/ant-design/pull/28624) +- Input + - 🐞 修复 Input.TextArea 有 `maxLength` 时输入中文被截断的问题。[#28456](https://github.com/ant-design/ant-design/pull/28456) + - 🆕 Input.TextArea 的 `showCount` 属性现在支持传入一个方法来自定义数字的展示格式了。[#28145](https://github.com/ant-design/ant-design/pull/28145) [@MrHeer](https://github.com/MrHeer) + - 🆕 Input `focus` 支持配置获取焦点时的光标位置。[#28602](https://github.com/ant-design/ant-design/pull/28602) +- Modal + - 🐞 修复 Modal 可以被拖拽到窗口外的问题。[#28438](https://github.com/ant-design/ant-design/pull/28527) [@mumiao](https://github.com/mumiao) + - 🆕 Modal.method 新增 `afterClose` 回调,会在 Modal 完全关闭后触发。[#28053](https://github.com/ant-design/ant-design/pull/28053) [@liuchao233](https://github.com/liuchao233) +- Table + - 🐞 修复 `childrenColumnName` 和 `checkStrictly={false}` 无法一起使用的问题。[#28568](https://github.com/ant-design/ant-design/pull/28568) + - 🐞 修复 Checkbox.Group 内选择行为异常的问题。[#28576](https://github.com/ant-design/ant-design/pull/28576) + - 🐞 修复无数据时固定表头样式错乱的问题。[#28323](https://github.com/ant-design/ant-design/issues/28323) + - 🐞 修复自定义 `filterDropdown` 时 `onChange` 事件的 `filters` 参数总是接收空数组的问题。[#28627](https://github.com/ant-design/ant-design/pull/28627) [@Meowu](https://github.com/Meowu) + - 🆕 新增 `expandable.columnWidth` 以自定义展开列的宽度。[#28249](https://github.com/ant-design/ant-design/pull/28249) + - 🆕 选择项新增清空所有选项。[#28580](https://github.com/ant-design/ant-design/pull/28580) [@n0ruSh](https://github.com/ant-design/ant-design/pull/285) +- Image + - 🐞 修复错位问题。[#28439](https://github.com/ant-design/ant-design/pull/28439) [@MoeCasts](https://github.com/MoeCasts) + - 💄 添加预览样式。[#28235](https://github.com/ant-design/ant-design/pull/28235) + - 🆕 支持使用鼠标滚轮缩放图片。[#react-component/image/52](https://github.com/react-component/image/pull/52) [@OmriGM](https://github.com/OmriGM) + - 🆕 支持单独设置预览图片。[#react-component/image/56](https://github.com/react-component/image/pull/56) [@wangcch](https://github.com/wangcch) +- Upload + - 🐞 修复不使用 `transformFile` 时也会有警告的问题。[#28455](https://github.com/ant-design/ant-design/pull/28455) [@YanYuanFE](https://github.com/YanYuanFE) + - 🐞 修复 Upload 的 `fileList` 和 immer 数据配合使用报错问题。[#28636](https://github.com/ant-design/ant-design/pull/28636) [@mumiao](https://github.com/mumiao) + - 🆕 Upload 新增 `maxCount` 属性以限制文件数量。[#28367](https://github.com/ant-design/ant-design/pull/28367) +- DatePicker + - 🚀 优化 `disabledDate` 逻辑。[#react-component/picker/191](https://github.com/react-component/picker/pull/191) + - 🆕 新增 `onKeyDown` 回调。[#react-component/picker/138](https://github.com/react-component/picker/pull/138) [@conquera99](https://github.com/react-component/picker/pull/138) +- Select + - 🐞 修复 `options` 更新不会触发选择框内容更新的问题。[#react-component/select/580](https://github.com/react-component/select/pull/580) [@jameslahm](https://github.com/jameslahm) + - 🐞 修复使用 `tagRender` 后点击选项无法打开下拉框的问题。[react-component/select/582](https://github.com/react-component/select/pull/582) [@mumiao](https://github.com/mumiao) + - 🐞 修复 `tokenSeparators` 在中文输入法下无法正确识别分隔符的问题。[#28564](https://github.com/ant-design/ant-design/issues/28564) + - 🆕 `ref` 新增 `scrollTo` 方法。[#react-component/select/565](https://github.com/react-component/select/pull/565) + - 🆕 多选模式下 `maxTagCount` 支持 `responsive`。[#28520](https://github.com/ant-design/ant-design/pull/28520) +- 🆕 Slider 新增 range.draggableTrack 以支持范围刻度整体可拖拽。[#28592](https://github.com/ant-design/ant-design/pull/28592) +- 🆕 `message` 新增 `onClick` 回调,会在消息被点击时触发。[#28148](https://github.com/ant-design/ant-design/pull/28148) [@ZeroTo0ne](https://github.com/ant-design/ant-design/pull/28148) +- 🆕 Descriptions 上可以统一设置 `labelStyle` 和 `contentStyle`。 [#28613](https://github.com/ant-design/ant-design/pull/28613) +- 🆕 Form 的 `scrollToFirstError` 属性支持设置滚动的位置参数。[#28272](https://github.com/ant-design/ant-design/pull/28272) [@vouis](https://github.com/vouis) +- 🆕 Steps 新增 reponsive 属性用于关闭响应式样式。[#28459](https://github.com/ant-design/ant-design/pull/28459) +- 🌐 国际化 + - 🇭🇷 改进克罗地亚语的支持。[#28458](https://github.com/ant-design/ant-design/pull/28458) +- TypeScript + - 🛠 修复 PageHeader 的 `title` 的类型问题。[#28374](https://github.com/ant-design/ant-design/pull/28374) [@zhukovvandrei](https://github.com/zhukovvandrei) + ## 4.9.4 `2020-12-16` diff --git a/package.json b/package.json index 2a36b92401..2e9212ce2d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "antd", - "version": "4.9.4", + "version": "4.10.0", "description": "An enterprise-class UI design language and React components implementation", "title": "Ant Design", "keywords": [ From 9946e6c56ffdf496e519377841484986ae08d0d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=8F=E5=8F=B3?= Date: Mon, 4 Jan 2021 16:19:32 +0800 Subject: [PATCH 08/11] style: fix notification closing style of hooks (#28660) close #28143 --- components/notification/style/index.less | 2 -- 1 file changed, 2 deletions(-) diff --git a/components/notification/style/index.less b/components/notification/style/index.less index e001323d8c..a144fb1dbc 100644 --- a/components/notification/style/index.less +++ b/components/notification/style/index.less @@ -206,8 +206,6 @@ 0% { max-height: 150px; margin-bottom: @notification-margin-bottom; - padding-top: @notification-padding-vertical; - padding-bottom: @notification-padding-vertical; opacity: 1; } 100% { From b5aeced4e2d71eb17cbd80928cfb504ae8e02642 Mon Sep 17 00:00:00 2001 From: xrkffgg Date: Mon, 4 Jan 2021 16:58:51 +0800 Subject: [PATCH 09/11] ci: fix ie contains check (#28666) * ci: fix contains check * Update issue-open-check.yml --- .github/workflows/issue-open-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue-open-check.yml b/.github/workflows/issue-open-check.yml index e912a3342b..82d2f0138a 100644 --- a/.github/workflows/issue-open-check.yml +++ b/.github/workflows/issue-open-check.yml @@ -60,7 +60,7 @@ jobs: * Ant Design Pro Preview : https://prosite.z23.web.core.windows.net - name: check-ie - if: contains(github.event.issue.body, 'ant-design-issue-helper') == true && (contains(github.event.issue.title, 'IE') == true || contains(github.event.issue.title, 'Internet Explorer') == true) + if: contains(github.event.issue.body, 'ant-design-issue-helper') == true && github.event.issue.title.includes('IE9') == true || github.event.issue.title.includes('IE 9') == true || github.event.issue.title.includes('IE10') == true || github.event.issue.title.includes('IE 10') == true || github.event.issue.title.includes('IE11') == true || github.event.issue.title.includes('IE 11') == true || contains(github.event.issue.title, 'Internet Explorer') == true) uses: actions-cool/issues-helper@v1.2 with: actions: 'add-labels' From 9e7aabd13128a5fc9bff6c091a4dabd76c4a1274 Mon Sep 17 00:00:00 2001 From: xrkffgg Date: Mon, 4 Jan 2021 17:03:57 +0800 Subject: [PATCH 10/11] ci: fix symbol miss --- .github/workflows/issue-open-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue-open-check.yml b/.github/workflows/issue-open-check.yml index 82d2f0138a..b9cb1f6360 100644 --- a/.github/workflows/issue-open-check.yml +++ b/.github/workflows/issue-open-check.yml @@ -60,7 +60,7 @@ jobs: * Ant Design Pro Preview : https://prosite.z23.web.core.windows.net - name: check-ie - if: contains(github.event.issue.body, 'ant-design-issue-helper') == true && github.event.issue.title.includes('IE9') == true || github.event.issue.title.includes('IE 9') == true || github.event.issue.title.includes('IE10') == true || github.event.issue.title.includes('IE 10') == true || github.event.issue.title.includes('IE11') == true || github.event.issue.title.includes('IE 11') == true || contains(github.event.issue.title, 'Internet Explorer') == true) + if: contains(github.event.issue.body, 'ant-design-issue-helper') == true && (github.event.issue.title.includes('IE9') == true || github.event.issue.title.includes('IE 9') == true || github.event.issue.title.includes('IE10') == true || github.event.issue.title.includes('IE 10') == true || github.event.issue.title.includes('IE11') == true || github.event.issue.title.includes('IE 11') == true || contains(github.event.issue.title, 'Internet Explorer') == true) uses: actions-cool/issues-helper@v1.2 with: actions: 'add-labels' From 3ac343333a35317d7b11941b2ab15897bc2af51a Mon Sep 17 00:00:00 2001 From: xrkffgg Date: Mon, 4 Jan 2021 17:17:23 +0800 Subject: [PATCH 11/11] ci: fix ie check (#28671) --- .github/workflows/issue-open-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue-open-check.yml b/.github/workflows/issue-open-check.yml index b9cb1f6360..e2864810e3 100644 --- a/.github/workflows/issue-open-check.yml +++ b/.github/workflows/issue-open-check.yml @@ -60,7 +60,7 @@ jobs: * Ant Design Pro Preview : https://prosite.z23.web.core.windows.net - name: check-ie - if: contains(github.event.issue.body, 'ant-design-issue-helper') == true && (github.event.issue.title.includes('IE9') == true || github.event.issue.title.includes('IE 9') == true || github.event.issue.title.includes('IE10') == true || github.event.issue.title.includes('IE 10') == true || github.event.issue.title.includes('IE11') == true || github.event.issue.title.includes('IE 11') == true || contains(github.event.issue.title, 'Internet Explorer') == true) + if: contains(github.event.issue.body, 'ant-design-issue-helper') == true && (contains(github.event.issue.title, 'IE9') == true || contains(github.event.issue.title, 'IE 9') == true || contains(github.event.issue.title, 'IE10') == true || contains(github.event.issue.title, 'IE 10') == true || contains(github.event.issue.title, 'IE11') == true || contains(github.event.issue.title, 'IE 11') == true || contains(github.event.issue.title, 'Internet Explorer') == true) uses: actions-cool/issues-helper@v1.2 with: actions: 'add-labels'