chore: auto merge branchs (#34209)

chore: merge master into feature
This commit is contained in:
github-actions[bot] 2022-02-25 10:52:16 +00:00 committed by GitHub
commit 2d194ecd0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 35 additions and 6 deletions

View File

@ -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,

View File

@ -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;
}
```

View File

@ -78,6 +78,9 @@ interface Option {
label?: React.ReactNode;
disabled?: boolean;
children?: Option[];
// 标记是否为叶子节点,设置了 `loadData` 时有效
// 设为 `false` 时会强制标记为父节点,即使当前节点没有 children也会显示展开图标
isLeaf?: boolean;
}
```

View File

@ -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;

View File

@ -21,6 +21,20 @@ describe('Upload.typescript', () => {
expect(upload).toBeTruthy();
});
it('onChange params', () => {
type IFile = {
customFile: File;
};
const upload = (
<Upload<IFile> onChange={({ file }) => file.response?.customFile}>
<span>click to upload</span>
</Upload>
);
expect(upload).toBeTruthy();
});
it('onChange in UploadProps', () => {
const uploadProps: UploadProps<File> = {
onChange: ({ file }) => file,

View File

@ -104,7 +104,7 @@ export interface UploadProps<T = any> extends Pick<RcUploadProps, 'capture'> {
file: RcFile,
FileList: RcFile[],
) => BeforeUploadValueType | Promise<BeforeUploadValueType>;
onChange?: (info: UploadChangeParam<T>) => void;
onChange?: (info: UploadChangeParam<UploadFile<T>>) => void;
onDrop?: (event: React.DragEvent<HTMLDivElement>) => void;
listType?: UploadListType;
className?: string;

View File

@ -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

View File

@ -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
## 文章

View File

@ -142,7 +142,7 @@ title: 文案
## 语气
语言定义的是内容,而情绪和气氛更多是通过语气来表达,并且同样的内容面对不同的用户我们可以使用不同的语气来表达;例如,我们对应专业的运维人员和小白用户应有不同的表达方式。
语言定义的是内容,而情绪和气氛更多是通过语气来表达,并且同样的内容面对不同的用户我们可以使用不同的语气来表达;例如,我们对应专业的运维人员和小白用户应有不同的表达方式。
### 拉近彼此的距离
@ -211,7 +211,7 @@ title: 文案
<img class="preview-img no-padding good" align="right" src="https://gw.alipayobjects.com/zos/rmsportal/QGpLpUFgZnTDzYJCeuun.png" alt="正确示范">
<img class="preview-img no-padding bad" align="right" src="https://gw.alipayobjects.com/zos/rmsportal/fQhiFpjLcHJtJJGzElUT.png" alt="错误示范">
为了帮助用户更加高效扫视文本内容,可以省略不必要的断句点。
为了帮助用户更加高效扫视文本内容,可以省略不必要的断句点。
以下元素单独出现时可以省略标点:
@ -279,6 +279,6 @@ title: 文案
</tr>
</table>
正确使用标点符号会让句子看起来更清晰和具有可读性。
正确使用标点符号会让句子看起来更清晰和具有可读性。
具体使用请参考 1995 年中国标准出版社出版的[《标点符号用法》](http://www.moe.gov.cn/ewebeditor/uploadfile/2015/01/13/20150113091548267.pdf),右图为重点列出的在设计中需要注意的部分。

View File

@ -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,