From cfaad0edce931ffc827cb73010ecca3dbf9d7e9c Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 23 Feb 2022 18:15:18 +0800 Subject: [PATCH 1/7] =?UTF-8?q?chore:=20fix=20Chinese=20expression=20about?= =?UTF-8?q?=20"=E7=9A=84=E5=9C=B0=E5=BE=97"=20(#34173)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close #34167 --- docs/spec/copywriting.zh-CN.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/spec/copywriting.zh-CN.md b/docs/spec/copywriting.zh-CN.md index 2ce88bfce8c9..983d4863fac7 100644 --- a/docs/spec/copywriting.zh-CN.md +++ b/docs/spec/copywriting.zh-CN.md @@ -142,7 +142,7 @@ title: 文案 ## 语气 -语言定义的是内容,而情绪和气氛更多的是通过语气来表达,并且同样的内容面对不同的用户我们可以使用不同的语气来表达;例如,我们对应专业的运维人员和小白用户应有不同的表达方式。 +语言定义的是内容,而情绪和气氛更多地是通过语气来表达,并且同样的内容面对不同的用户我们可以使用不同的语气来表达;例如,我们对应专业的运维人员和小白用户应有不同的表达方式。 ### 拉近彼此的距离 @@ -211,7 +211,7 @@ title: 文案 正确示范 错误示范 -为了帮助用户更加高效得扫视文本内容,可以省略不必要的断句点。 +为了帮助用户更加高效地扫视文本内容,可以省略不必要的断句点。 以下元素单独出现时可以省略标点: @@ -279,6 +279,6 @@ title: 文案 -正确得使用标点符号会让句子看起来更清晰和具有可读性。 +正确地使用标点符号会让句子看起来更清晰和具有可读性。 具体使用请参考 1995 年中国标准出版社出版的[《标点符号用法》](http://www.moe.gov.cn/ewebeditor/uploadfile/2015/01/13/20150113091548267.pdf),右图为重点列出的在设计中需要注意的部分。 From 780da54c3b4651dcf8cf25447f1951049c1be7e7 Mon Sep 17 00:00:00 2001 From: Dave Date: Wed, 23 Feb 2022 18:44:26 +0800 Subject: [PATCH 2/7] fix(upload): onChange params type err (#34161) * fix(upload): onChange params type err * test(upload): check onChange params type --- components/upload/__tests__/type.test.tsx | 14 ++++++++++++++ components/upload/interface.tsx | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/components/upload/__tests__/type.test.tsx b/components/upload/__tests__/type.test.tsx index ffd297b30cf4..b48e267836a2 100644 --- a/components/upload/__tests__/type.test.tsx +++ b/components/upload/__tests__/type.test.tsx @@ -21,6 +21,20 @@ describe('Upload.typescript', () => { expect(upload).toBeTruthy(); }); + it('onChange params', () => { + type IFile = { + customFile: File; + }; + + const upload = ( + onChange={({ file }) => file.response?.customFile}> + click to upload + + ); + + expect(upload).toBeTruthy(); + }); + it('onChange in UploadProps', () => { const uploadProps: UploadProps = { onChange: ({ file }) => file, diff --git a/components/upload/interface.tsx b/components/upload/interface.tsx index ff47c3c1b6e1..0fac22efa06c 100755 --- a/components/upload/interface.tsx +++ b/components/upload/interface.tsx @@ -104,7 +104,7 @@ export interface UploadProps extends Pick { file: RcFile, FileList: RcFile[], ) => BeforeUploadValueType | Promise; - onChange?: (info: UploadChangeParam) => void; + onChange?: (info: UploadChangeParam>) => void; onDrop?: (event: React.DragEvent) => void; listType?: UploadListType; className?: string; From 1c28ed37fcf3edc6c4f1d59f3d916c04d2d5c94b Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 24 Feb 2022 10:38:26 +0800 Subject: [PATCH 3/7] fix: Dropdown item style when text is long (#34177) close #34176 --- components/dropdown/style/index.less | 1 - 1 file changed, 1 deletion(-) diff --git a/components/dropdown/style/index.less b/components/dropdown/style/index.less index bb604479211d..101894767f4b 100644 --- a/components/dropdown/style/index.less +++ b/components/dropdown/style/index.less @@ -199,7 +199,6 @@ font-weight: normal; font-size: @dropdown-font-size; line-height: @dropdown-line-height; - white-space: nowrap; cursor: pointer; transition: all @animation-duration-slow; From 517ab4c3cefc139a9e098c006ca1998519d65a2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Long=20Hao=20=28=E9=BE=99=E6=BF=A0=29?= <45565100+LongHaoo@users.noreply.github.com> Date: Thu, 24 Feb 2022 10:53:51 +0800 Subject: [PATCH 4/7] fix: issue #34015 cascader document of option less isleaf param (#34174) * fix: issue #34015 cascader document of option less isleaf param * fix: add comment * fix: comment change Co-authored-by: zengguhao.zgh --- components/cascader/index.en-US.md | 4 ++++ components/cascader/index.zh-CN.md | 3 +++ 2 files changed, 7 insertions(+) diff --git a/components/cascader/index.en-US.md b/components/cascader/index.en-US.md index c4ef48b1e42f..9b2fe4cb5b84 100644 --- a/components/cascader/index.en-US.md +++ b/components/cascader/index.en-US.md @@ -75,6 +75,10 @@ interface Option { label?: React.ReactNode; disabled?: boolean; children?: Option[]; + // Determines if this is a leaf node(effective when `loadData` is specified). + // `false` will force trade TreeNode as a parent node. + // Show expand icon even if the current node has no children. + isLeaf?: boolean; } ``` diff --git a/components/cascader/index.zh-CN.md b/components/cascader/index.zh-CN.md index f80a9f95f801..1d5d722e3556 100644 --- a/components/cascader/index.zh-CN.md +++ b/components/cascader/index.zh-CN.md @@ -77,6 +77,9 @@ interface Option { label?: React.ReactNode; disabled?: boolean; children?: Option[]; + // 标记是否为叶子节点,设置了 `loadData` 时有效 + // 设为 `false` 时会强制标记为父节点,即使当前节点没有 children,也会显示展开图标 + isLeaf?: boolean; } ``` From c2423b50a87ae1790ba914e50eb413b98b12508c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=80=9A?= <44010674+lihansir@users.noreply.github.com> Date: Thu, 24 Feb 2022 10:54:57 +0800 Subject: [PATCH 5/7] fix: Overview page EditableProTable link error (#34181) --- site/theme/template/Content/MainContent.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/theme/template/Content/MainContent.jsx b/site/theme/template/Content/MainContent.jsx index 6c776b07676c..aaf979a4edfa 100644 --- a/site/theme/template/Content/MainContent.jsx +++ b/site/theme/template/Content/MainContent.jsx @@ -443,7 +443,7 @@ class MainContent extends Component { meta: { category: 'Components', cover: 'https://gw.alipayobjects.com/zos/antfincdn/N3eU432oA/bianzu%2525209.svg', - filename: 'https://procomponents.ant.design/components/list', + filename: 'https://procomponents.ant.design/components/editable-table', subtitle: '可编辑表格', title: 'EditableProTable', type, From 0ed868989d78be71d3aea0add1a47e6cbbefa84b Mon Sep 17 00:00:00 2001 From: KaKaHuoLuoTe <99702968+KaKaHuoLuoTe@users.noreply.github.com> Date: Fri, 25 Feb 2022 14:02:25 +0800 Subject: [PATCH 6/7] docs: add MasterGo to design assets (#34055) * docs: add MasterGo to design assets * chore: update mastergo links --- docs/resources.en-US.md | 4 ++++ docs/resources.zh-CN.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/resources.en-US.md b/docs/resources.en-US.md index b2dc6b80444c..09d2d3a7c6d3 100644 --- a/docs/resources.en-US.md +++ b/docs/resources.en-US.md @@ -74,6 +74,10 @@ Please find below some of the design resources and tools about Ant Design that w - https://user-images.githubusercontent.com/7129/149994038-76214796-cd6a-4e80-b0a4-117e8edac050.png - Drag/drop live Ant components and manipulate props in this React visual builder - https://www.plasmic.app/ant-design +- MasterGo + - https://mastergo-local-default.oss-cn-beijing.aliyuncs.com/ant-design-mastergo.svg + - Use fully components and templates on MasterGo + - https://mastergo.com/community/resource/31 ## Articles diff --git a/docs/resources.zh-CN.md b/docs/resources.zh-CN.md index 6d61fca75d8d..960a17249ccd 100644 --- a/docs/resources.zh-CN.md +++ b/docs/resources.zh-CN.md @@ -66,6 +66,10 @@ toc: false - https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*dxzdQYWlmjMAAAAAAAAAAAAAARQnAQ - 可在「即时设计」在线免费使用的全套组件和模板 - https://js.design/antd +- MasterGo 组件包 + - https://mastergo-local-default.oss-cn-beijing.aliyuncs.com/ant-design-mastergo.svg + - 可在「MasterGo」在线免费使用的全套组件和模板 + - https://mastergo.com/community/resource/31 ## 文章 From 7d64967d637ce1043467abd7802b872cfe8cc09d Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 25 Feb 2022 18:27:44 +0800 Subject: [PATCH 7/7] test: disabled react/jsx-key --- .eslintrc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.js b/.eslintrc.js index 088f34d17ef8..381513f2be1e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -96,6 +96,7 @@ module.exports = { 'react/require-default-props': 0, 'react/sort-comp': 0, 'react/display-name': 0, + 'react/jsx-key': 0, 'react/static-property-placement': 0, 'react/jsx-no-bind': 0, // Should not check test file 'react/no-find-dom-node': 0,