-
Notifications
You must be signed in to change notification settings - Fork 28
docs: update uploader doc, add invalid event #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
one/docs/components/uploader.md
Outdated
^^^event-invalid | ||
文件校验失败时触发,回调参数为 `(invalidInfo: Object)`。 | ||
|
||
+++回调参数字段详情 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+++回调参数字段详情 | |
+++参数字段详情 |
one/docs/components/uploader.md
Outdated
|
||
| 名称 | 类型 | 描述 | | ||
| -- | -- | -- | | ||
| `file` | `Object` | 没有通过校验的文件信息。如果校验失败的原因是选择的文件数量超过最大数量 `max-count` 限制,则这个字段为空。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
加一句“file
参数字段与 remove
事件参数相同”吧
one/docs/components/uploader.md
Outdated
| 名称 | 类型 | 描述 | | ||
| -- | -- | -- | | ||
| `file` | `Object` | 没有通过校验的文件信息。如果校验失败的原因是选择的文件数量超过最大数量 `max-count` 限制,则这个字段为空。 | | ||
| `errors` | `Array` | 包含该文件所有校验错误信息的数组,数组的每一项是包含校验失败信息的对象。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `errors` | `Array` | 包含该文件所有校验错误信息的数组,数组的每一项是包含校验失败信息的对象。 | | |
| `errors` | `Array<Object>` | 包含该文件所有校验错误信息的数组,数组的每一项是包含校验失败信息的对象。 | |
one/docs/components/uploader.md
Outdated
|
||
| 名称 | 类型 | 描述 | | ||
| -- | -- | -- | | ||
| `type` | `string` | 校验失败的类型,类型可从 `Uploader` 组件 `export` 的 `(errors: Object)` 对象获取,`errors` 对象包含 `TYPE_INVALID`/`SIZE_INVALID`/`TOO_MANY_FILES`/`CUSTOM_INVALID` 这四个字段,分别对应文件类型、文件大小、文件数量、自定义校验失败。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是不是应该再搞一个表格,列一下 type
和 value
的类型、含义的关系?
98fc56c
to
45eae5e
Compare
No description provided.