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, diff --git a/components/cascader/index.en-US.md b/components/cascader/index.en-US.md index 5f76197f91fe..89acf95517b7 100644 --- a/components/cascader/index.en-US.md +++ b/components/cascader/index.en-US.md @@ -76,6 +76,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 0c8a91bc0336..92988351cd40 100644 --- a/components/cascader/index.zh-CN.md +++ b/components/cascader/index.zh-CN.md @@ -78,6 +78,9 @@ interface Option { label?: React.ReactNode; disabled?: boolean; children?: Option[]; + // 标记是否为叶子节点,设置了 `loadData` 时有效 + // 设为 `false` 时会强制标记为父节点,即使当前节点没有 children,也会显示展开图标 + isLeaf?: boolean; } ``` diff --git a/components/dropdown/style/index.less b/components/dropdown/style/index.less index 0212045f8c16..1da41231673c 100644 --- a/components/dropdown/style/index.less +++ b/components/dropdown/style/index.less @@ -201,7 +201,6 @@ font-weight: normal; font-size: @dropdown-font-size; line-height: @dropdown-line-height; - white-space: nowrap; cursor: pointer; transition: all @animation-duration-slow; 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; 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 ## 文章 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),右图为重点列出的在设计中需要注意的部分。 diff --git a/site/theme/template/Content/MainContent.jsx b/site/theme/template/Content/MainContent.jsx index 202406831422..28855ea47cc8 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,