Browse Source

Merge pull request #15502 from ant-design/fix-doc

Optimize some docs
pull/15506/head
偏右 6 years ago
committed by GitHub
parent
commit
810f2b21f0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      CHANGELOG.en-US.md
  2. 8
      CHANGELOG.zh-CN.md
  3. 2
      components/affix/index.en-US.md
  4. 2
      components/affix/index.zh-CN.md
  5. 9
      components/typography/index.en-US.md
  6. 9
      components/typography/index.zh-CN.md
  7. 8
      components/upload/index.en-US.md
  8. 4
      components/upload/index.zh-CN.md

2
CHANGELOG.en-US.md

@ -20,7 +20,7 @@ timeline: true
`2019-03-17`
- 🌟 Add four less variables `@pagination-item-bg-active`, `@icon-color`. [#15302](https://github.com/ant-design/ant-design/pull/15302) [#15343](https://github.com/ant-design/ant-design/issues/15343)
- 🐞 Fix tree shaking not working for importing PageHeader. [#15354](https://github.com/ant-design/ant-design/pull/15354)
- 🐞 Fix tree-shaking not working for importing PageHeader. [#15354](https://github.com/ant-design/ant-design/pull/15354)
- List
- 🐞 Fix some List Item styling issues. [#15328](https://github.com/ant-design/ant-design/pull/15328)
- 🐞 Keep same content color of List like previous version. [#15301](https://github.com/ant-design/ant-design/pull/15301)

8
CHANGELOG.zh-CN.md

@ -20,7 +20,7 @@ timeline: true
`2019-03-17`
- 🌟 补充了 less 变量 `@pagination-item-bg-active`、`@icon-color`。 [#15302](https://github.com/ant-design/ant-design/pull/15302) [#15345](https://github.com/ant-design/ant-design/pull/15345)
- 🐞 修复引入 PageHeader 导致 tree shaking 失效的问题。[#15354](https://github.com/ant-design/ant-design/pull/15354)
- 🐞 修复引入 PageHeader 导致 tree-shaking 失效的问题。[#15354](https://github.com/ant-design/ant-design/pull/15354)
- List
- 🐞 修复 List 的一些样式问题。[#15328](https://github.com/ant-design/ant-design/pull/15328)
- 🐞 保持 List 组件内容颜色与之前的版本一致。[#15301](https://github.com/ant-design/ant-design/pull/15301)
@ -30,13 +30,13 @@ timeline: true
- 🐞 修复 Badge 组件内带小圆点时的高度问题。[#15395](https://github.com/ant-design/ant-design/pull/15395)
- 🐞 微调 Tabs 标签模式在浏览器放大时丢失边框的问题。[#15299](https://github.com/ant-design/ant-design/pull/15299) [@rinick](https://github.com/rinick)
- 🐞 修复 Avatar 组件设置了 `display: none` 的时候无法计算偏移量的问题。[#15351](https://github.com/ant-design/ant-design/pull/15351) [@ppbl](https://github.com/ppbl)
- 🐞 修复 Input.Password 组件的后置 Icon。[#15381](https://github.com/ant-design/ant-design/pull/15381) [@melchior-voidwolf](https://github.com/melchior-voidwolf)
- 🐞 修复 Layout 即使在 `hasSider` 属性为 `false` 的时候依然会加 `ant-layout-has-sider` 的 classname 的问题[#15396](https://github.com/ant-design/ant-design/pull/15396) [@SoraYama](https://github.com/SoraYama)
- 🐞 修复 Input.Password 组件的 `suffix` 失效问题。[#15381](https://github.com/ant-design/ant-design/pull/15381) [@melchior-voidwolf](https://github.com/melchior-voidwolf)
- 🐞 修复 Layout 即使在 `hasSider` 属性为 `false` 的时候依然会加 `ant-layout-has-sider` 类名的问题[#15396](https://github.com/ant-design/ant-design/pull/15396) [@SoraYama](https://github.com/SoraYama)
- 🐞 修复 Divider 在 PageHeader 组件中的对齐问题。[#15400](https://github.com/ant-design/ant-design/pull/15400)
- 🐞 修复 Menu 收缩后,SubMenu 异常渲染的问题。[#15409](https://github.com/ant-design/ant-design/pull/15409) [@zy410419243](https://github.com/zy410419243)
- 🐞 修复 Skeleton 组件的样式问题。[#15421](https://github.com/ant-design/ant-design/pull/15421) [@Maktel](https://github.com/Maktel)
- 调整了多处 Typescript 类型
- 🌟 FormComponentProps 新增 Form 值的型。[#15355](https://github.com/ant-design/ant-design/pull/15355)
- 🌟 FormComponentProps 新增 Form 值的型。[#15355](https://github.com/ant-design/ant-design/pull/15355)
- 🌟 导出 ConfigProviderProps 定义。[#15446](https://github.com/ant-design/ant-design/pull/15446) [@DiamondYuan](https://github.com/DiamondYuan)
- 🐞 添加 Breadcrumb.Item 的 `onClick` 定义。[#15331](https://github.com/ant-design/ant-design/pull/15331) [@tgxpuisb](https://github.com/tgxpuisb)
- 🐞 添加 Steps.Step 组件的 `style` 定义。[#15393](https://github.com/ant-design/ant-design/pull/15393) [@pavolgolias](https://github.com/pavolgolias)

2
components/affix/index.en-US.md

@ -24,7 +24,7 @@ Please note that Affix should not cover other content on the page, especially wh
**Note:** Children of `Affix` can not be `position: absolute`, but you can set `Affix` as `position: absolute`:
```jsx
<Affix style={{ position: 'absolute', top: y, left: x}}>
<Affix style={{ position: 'absolute', top: y, left: x }}>
...
</Affix>
```

2
components/affix/index.zh-CN.md

@ -25,7 +25,7 @@ title: Affix
**注意:**`Affix` 内的元素不要使用绝对定位,如需要绝对定位的效果,可以直接设置 `Affix` 为绝对定位:
```jsx
<Affix style={{ position: 'absolute', top: y, left: x}}>
<Affix style={{ position: 'absolute', top: y, left: x }}>
...
</Affix>
```

9
components/typography/index.en-US.md

@ -5,15 +5,12 @@ title: Typography
cols: 1
---
Basic format and regular operation on text.
Basic text writing, including headings, body text, lists, and more.
## When To Use
When need to display title or text content. Like:
* Copy
* Ellipsis / expand
* Edit
* Markdown Typography
- When need to display title or paragraph contents in Articles/Blogs/Notes.
- When you need copyable/editable/ellipsis texts.
## API

9
components/typography/index.zh-CN.md

@ -6,15 +6,12 @@ title: Typography
cols: 1
---
文本的基本格式及常见操作
文本的基本格式。
## 何时使用
当需要展示标题、文本内容时使用。例如:
* 拷贝
* 省略/展开
* 可编辑
* Markdown 排版样式
- 当需要展示标题、段落、列表内容时使用,如文章/博客/日志的文本样式。
- 当需要一列基于文本的基础操作时,如拷贝/省略/可编辑。
## API

8
components/upload/index.en-US.md

@ -32,12 +32,12 @@ Uploading is the process of publishing information (web pages, text, pictures, v
| multiple | Whether to support selected multiple file. `IE10+` supported. You can select multiple files with CTRL holding down while multiple is set to be true | boolean | false |
| name | The name of uploading file | string | 'file' |
| showUploadList | Whether to show default upload list, could be an object to specify `showPreviewIcon` and `showRemoveIcon` individually | Boolean or { showPreviewIcon?: boolean, showRemoveIcon?: boolean } | true |
| supportServerRender | Need to be turned on while the server side is rendering. | boolean | false |
| supportServerRender | Need to be turned on while the server side is rendering | boolean | false |
| withCredentials | ajax upload with cookie sent | boolean | false |
| openFileDialogOnClick | click open file dialog | boolean | true |
| onChange | A callback function, can be executed when uploading state is changing. See [onChange](#onChange) | Function | - |
| onPreview | A callback function, will be executed when file link or preview icon is clicked. | Function(file) | - |
| onRemove | A callback function, will be executed when removing file button is clicked, remove event will be prevented when return value is `false` or a Promise which resolve(false) or reject. | Function(file): `boolean | Promise` | - |
| onChange | A callback function, can be executed when uploading state is changing, see [onChange](#onChange) | Function | - |
| onPreview | A callback function, will be executed when file link or preview icon is clicked | Function(file) | - |
| onRemove | A callback function, will be executed when removing file button is clicked, remove event will be prevented when return value is `false` or a Promise which resolve(false) or reject | Function(file): `boolean | Promise` | - |
### onChange

4
components/upload/index.zh-CN.md

@ -30,9 +30,9 @@ title: Upload
| fileList | 已经上传的文件列表(受控),使用此参数时,如果遇到 `onChange` 只调用一次的问题,请参考 [#2423](https://github.com/ant-design/ant-design/issues/2423) | object\[] | 无 |
| headers | 设置上传的请求头部,IE10 以上有效 | object | 无 |
| listType | 上传列表的内建样式,支持三种基本样式 `text`, `picture``picture-card` | string | 'text' |
| multiple | 是否支持多选文件,`ie10+` 支持。开启后按住 ctrl 可选择多个文件 | boolean | false |
| multiple | 是否支持多选文件,`ie10+` 支持。开启后按住 ctrl 可选择多个文件 | boolean | false |
| name | 发到后台的文件参数名 | string | 'file' |
| showUploadList | 是否展示 uploadList, 可设为一个对象,用于单独设定 showPreviewIcon 和 showRemoveIcon | Boolean or { showPreviewIcon?: boolean, showRemoveIcon?: boolean } | true |
| showUploadList | 是否展示文件列表, 可设为一个对象,用于单独设定 `showPreviewIcon``showRemoveIcon` | Boolean or { showPreviewIcon?: boolean, showRemoveIcon?: boolean } | true |
| supportServerRender | 服务端渲染时需要打开这个 | boolean | false |
| withCredentials | 上传请求时是否携带 cookie | boolean | false |
| openFileDialogOnClick | 点击打开文件对话框 | boolean | true |

Loading…
Cancel
Save