Skip to content

Commit

Permalink
fix(docs): [upload] fix the version of supporting async data (#14242)
Browse files Browse the repository at this point in the history
  • Loading branch information
HADB committed Sep 10, 2023
1 parent 27e2c59 commit 5d7532d
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions docs/en-US/component/upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,33 +93,33 @@ upload/manual

### Attributes

| Name | Description | Type | Default | Required |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -------- | -------- |
| `action` | request URL. | `string` | β€” | Yes |
| `headers` | request headers. | `Headers \| Record<string, any>` | β€” | No |
| `method` | set upload request method. | `string` | `'post'` | No |
| `multiple` | whether uploading multiple files is permitted. | `boolean` | `false` | No |
| `data` | additions options of request. support `Awaitable` data and `Function` since v3.3.13 | `Record<string, any> \| Awaitable<Record<string, any>> \| ((rawFile: UploadRawFile) => Awaitable<Record<string, any>>)` | β€” | No |
| `name` | key name for uploaded file. | `string` | `'file'` | No |
| `with-credentials` | whether cookies are sent. | `boolean` | `false` | No |
| `show-file-list` | whether to show the uploaded file list. | `boolean` | `true` | No |
| `drag` | whether to activate drag and drop mode. | `boolean` | `false` | No |
| `accept` | accepted [file types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept), will not work when `thumbnail-mode === true`. | `string` | β€” | No |
| `on-preview` | hook function when clicking the uploaded files. | `(uploadFile: UploadFile) => void` | β€” | No |
| `on-remove` | hook function when files are removed. | `(uploadFile: UploadFile, uploadFiles: UploadFiles) => void` | β€” | No |
| `on-success` | hook function when uploaded successfully. | `(response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void` | β€” | No |
| `on-error` | hook function when some errors occurs. | `(error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void` | β€” | No |
| `on-progress` | hook function when some progress occurs. | `(evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void` | β€” | No |
| `on-change` | hook function when select file or upload file success or upload file fail. | `(uploadFile: UploadFile, uploadFiles: UploadFiles) => void` | β€” | No |
| `on-exceed` | hook function when limit is exceeded. | `(files: File[], uploadFiles: UploadUserFile[]) => void` | β€” | No |
| `before-upload` | hook function before uploading with the file to be uploaded as its parameter. If `false` is returned or a `Promise` is returned and then is rejected, uploading will be aborted. | `(rawFile: UploadRawFile) => Awaitable<void \| undefined \| null \| boolean \| File \| Blob>` | β€” | No |
| `before-remove` | hook function before removing a file with the file and file list as its parameters. If `false` is returned or a `Promise` is returned and then is rejected, removing will be aborted. | `(uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>` | β€” | No |
| `file-list` / `v-model:file-list` | default uploaded files. | `UploadUserFile[]` | `[]` | No |
| `list-type` | type of file list. | `'text' \| 'picture' \| 'picture-card'` | `'text'` | No |
| `auto-upload` | whether to auto upload file. | `boolean` | `true` | No |
| `http-request` | override default xhr behavior, allowing you to implement your own upload-file's request. | `(options: UploadRequestOptions) => XMLHttpRequest \| Promise<unknown>` | β€” | No |
| `disabled` | whether to disable upload. | `boolean` | `false` | No |
| `limit` | maximum number of uploads allowed. | `number` | β€” | No |
| Name | Description | Type | Default | Required |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| `action` | request URL. | `string` | β€” | Yes |
| `headers` | request headers. | `Headers \| Record<string, any>` | β€” | No |
| `method` | set upload request method. | `string` | `'post'` | No |
| `multiple` | whether uploading multiple files is permitted. | `boolean` | `false` | No |
| `data` | additions options of request. support `Awaitable` data and `Function` since v2.3.13 | `Record<string, any> \| Awaitable<Record<string, any>> \| ((rawFile: UploadRawFile) => Awaitable<Record<string, any>>)` | β€” | No |
| `name` | key name for uploaded file. | `string` | `'file'` | No |
| `with-credentials` | whether cookies are sent. | `boolean` | `false` | No |
| `show-file-list` | whether to show the uploaded file list. | `boolean` | `true` | No |
| `drag` | whether to activate drag and drop mode. | `boolean` | `false` | No |
| `accept` | accepted [file types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept), will not work when `thumbnail-mode === true`. | `string` | β€” | No |
| `on-preview` | hook function when clicking the uploaded files. | `(uploadFile: UploadFile) => void` | β€” | No |
| `on-remove` | hook function when files are removed. | `(uploadFile: UploadFile, uploadFiles: UploadFiles) => void` | β€” | No |
| `on-success` | hook function when uploaded successfully. | `(response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void` | β€” | No |
| `on-error` | hook function when some errors occurs. | `(error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void` | β€” | No |
| `on-progress` | hook function when some progress occurs. | `(evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void` | β€” | No |
| `on-change` | hook function when select file or upload file success or upload file fail. | `(uploadFile: UploadFile, uploadFiles: UploadFiles) => void` | β€” | No |
| `on-exceed` | hook function when limit is exceeded. | `(files: File[], uploadFiles: UploadUserFile[]) => void` | β€” | No |
| `before-upload` | hook function before uploading with the file to be uploaded as its parameter. If `false` is returned or a `Promise` is returned and then is rejected, uploading will be aborted. | `(rawFile: UploadRawFile) => Awaitable<void \| undefined \| null \| boolean \| File \| Blob>` | β€” | No |
| `before-remove` | hook function before removing a file with the file and file list as its parameters. If `false` is returned or a `Promise` is returned and then is rejected, removing will be aborted. | `(uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>` | β€” | No |
| `file-list` / `v-model:file-list` | default uploaded files. | `UploadUserFile[]` | `[]` | No |
| `list-type` | type of file list. | `'text' \| 'picture' \| 'picture-card'` | `'text'` | No |
| `auto-upload` | whether to auto upload file. | `boolean` | `true` | No |
| `http-request` | override default xhr behavior, allowing you to implement your own upload-file's request. | `(options: UploadRequestOptions) => XMLHttpRequest \| Promise<unknown>` | β€” | No |
| `disabled` | whether to disable upload. | `boolean` | `false` | No |
| `limit` | maximum number of uploads allowed. | `number` | β€” | No |

### Slots

Expand Down

0 comments on commit 5d7532d

Please sign in to comment.