>
)
}
export default App;
```
:::
### Prop
| Attribute |Description | Type | Default |
|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------|------------------|
| autoUpload | Whether to upload the file immediately after selecting it, if false, you need to manually execute the ref submit method to upload | Boolean | true |
| name | The name of the `input` tag `name`, the file parameter name sent to the background | String | "file" |
| url | The interface address of the upload server | String | - |
| defaultFileList | List of uploaded files by default | FileItem[] | [] |
| isPreview | Whether to display the preview image after the upload is successful | Boolean | true |
| defaultImg | When uploading a default image URL in a non-image ('image') format | String | '' |
| isDeletable | Whether to display the delete button | Boolean | true |
| method | The http method of upload request | String | "post" |
| listType | The built-in style of the upload list, supports two basic styles picture, list | String | "picture" |
| capture | Capture, can be set to[camera](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/input#htmlattrdefcapture),,turn on the camera directly | String | false |
| maximize | You can set the maximum upload file size (bytes) | Number丨String | Number.MAX_VALUE |
| maximum | File upload limit | Number丨String | 1 |
| clearInput | Whether to clear the `input` content, set to `true` to support repeated selection and upload of the same file | Boolean | true |
| accept | File types that can be accepted. See[Des](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/Input/file#%E9%99%90%E5%88%B6%E5%85%81%E8%AE%B8%E7%9A%84%E6%96%87%E4%BB%B6%E7%B1%BB%E5%9E%8B) | String | * |
| headers | Set request headers | Object | {} |
| data | Uploading extra params or function which can return uploading extra params formData | Object | {} |
| uploadIcon | Upload area[icon name](#/zh-CN/icon)or image link | String | "photograph" |
| uploadIconSize | Upload area [icon size](#/icon) size, such as `20px` `2em` `2rem` | String or Number | - |
| xhrState | The success status (status) value of the interface response | Number | 200 |
| withCredentials | Support for sending cookie credential information | Boolean | false |
| multiple | Whether to support multiple file selection | Boolean | false |
| disabled | Whether to disable file upload | Boolean | false |
| timeout | timeout, in milliseconds | Number丨String | 1000 * 30 |
| onBeforeUpload | The pre-upload function needs to return a `Promise` object | Function | null |
| onBeforeXhrUpload | When performing an XHR upload, the custom method | Function(xhr,option) | null |
| onBeforeDelete | Callback when file is removed. If the return value is false, it will not be removed. Supports returning a `Promise` object, which is not removed when the `Promise` object resolves(false) or rejects | Function(file): boolean 丨Promise | - |
### FileItem
| Attribute | Description | Default |
|----------|---------------------------------------------------------|---------------------------------|
| status | File status value, optional ‘ready,uploading,success,error’' | "ready" |
| uid | Unique ID of the file | new Date().getTime().toString() |
| name | File name | "" |
| url | File path | "" |
| type | File type | "image/jpeg" |
| formData | Upload the required data | new FormData() |
### Event
| Event | Description | Arguments |
|----------|------------------------|----------------------|
| onStart | File upload starts | options |
| onProgress | The progress of the file upload | event,options,percentage |
| onOversize | Triggered when the file size exceeds the limit | files |
| onSuccess | Uploaded successfully | responseText,options |
| onFailure | Upload failed | responseText,options |
| onChange | The state when the uploaded file changes | fileList,event |
| onRemove | The state before the file was deleted | files,fileList |
| onFileItemClick | File delete event | fileItem |