Skip to content

Commit

Permalink
docs: tranlation for image-picker, ref #329
Browse files Browse the repository at this point in the history
  • Loading branch information
silentcloud committed Aug 31, 2017
1 parent ea88b70 commit 01a5bc6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions components/image-picker/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: Data Entry
title: ImagePicker
---

注意:只是图片选择器,一般用于上传图片前的文件选择操作,但不包括图片上传的功能
Note: Just for selecting picture. Generally `ImagePicker` is used to select picture before uploading, but without the feature of uploading.


## API
Expand All @@ -13,10 +13,10 @@ Support WEB, React-Native.

Properties | Descrition | Type | Default
-----------|------------|------|--------
| files | 图片文件数组,元素为对象,包含属性 url(必选, 可能还有id, orientation, 以及业务需要的其它属性 | Array | [] |
| onChange | files 值发生变化触发的回调函数, operationType 操作类型有添加,移除,如果是移除操作,则第三个参数代表的是移除图片的索引 | (files: Object, operationType: string, index: number): void | |
| onImageClick(`web only`) | 点击图片触发的回调 | (index: number, files: Object): void | |
| onAddImageClick(`web only`) | 自定义选择图片的方法 | (): void | |
| selectable(`web only`) | 是否显示添加按钮 | boolean | true |
| files | Picture files array which includes `url`(required) in each object | Array | [] |
| onChange | Callback is called when the value of `files` is changed. The `operationType` is one of `add` or `remove`(the third argument is the removed index).| (files: Object, operationType: string, index: number): void | |
| onImageClick(`web only`) | Callback is called when the user clicks the selected picture | (index: number, files: Object): void | |
| onAddImageClick(`web only`) | Callback is called when the selector button is clicked | (): void | |
| selectable(`web only`) | whether to show selector button | boolean | true |

> 注: RN 版本回传 assets-library (性能考虑),需要使用 native 模块进行上传,可参考 https://github.com/facebook/react-native/issues/201
> Note: Only return assets-library type for RN, if you want to upload files, see https://github.com/facebook/react-native/issues/201

0 comments on commit 01a5bc6

Please sign in to comment.