Skip to content

Commit 590ad1e

Browse files
fix(upload): inst type (#5882)
1 parent 7ede9be commit 590ad1e

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/upload/demos/enUS/index.demo-entry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ interface UploadCustomRequestOptions {
117117
| --- | --- | --- | --- |
118118
| clear | `() => void` | Clear current upload list. | 2.24.2 |
119119
| openOpenFileDialog | `() => void` | Open the file dialog window. | |
120-
| submit | `(fileId?: string \| number)` | Submit all files with pending status. | |
120+
| submit | `(fileId?: string)` | Submit all files with pending status. | |
121121

122122
### Upload Slots
123123

src/upload/demos/zhCN/index.demo-entry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ interface UploadCustomRequestOptions {
118118
| --- | --- | --- | --- |
119119
| clear | `() => void` | 清空上传列表 | 2.24.2 |
120120
| openOpenFileDialog | `() => void` | 打开文件选择对话框 | |
121-
| submit | `(fileId?: string \| number)` | 提交当前所有处于 pending 状态的文件 | |
121+
| submit | `(fileId?: string)` | 提交当前所有处于 pending 状态的文件 | |
122122

123123
### Upload Slots
124124

src/upload/src/interface.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ export interface XhrHandlers {
9292
handleXHRError: (e: ProgressEvent) => void
9393
}
9494

95+
export interface UploadInst {
96+
openOpenFileDialog: () => void
97+
submit: (fileId?: string) => void
98+
clear: () => void
99+
}
100+
95101
export type OnBeforeUpload = (data: {
96102
file: UploadSettledFileInfo
97103
fileList: UploadSettledFileInfo[]

0 commit comments

Comments
 (0)