mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-03-13 13:59:04 +08:00
fix(upload): OnBeforeUpload type
This commit is contained in:
parent
ef55c4bdc9
commit
df0d34abcf
@ -7,6 +7,7 @@
|
||||
- Fix UMD bundle doesn't work, closes [#3642](https://github.com/tusen-ai/naive-ui/issues/3642).
|
||||
- Fix `n-calendar`'s displayed month doesn't follow `default-value`, closes [#3645](https://github.com/tusen-ai/naive-ui/issues/3645).
|
||||
- Fix `n-form-item`'s `require-mark-placement` prop not working when set to `left`, closes [#3628](https://github.com/tusen-ai/naive-ui/issues/3628).
|
||||
- Fix `n-upload`'s `OnBeforeUpload` return type can only be `Promise<boolean>`.
|
||||
|
||||
### Feats
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
- 修复 UMD 构建产物不能正常工作,关闭 [#3642](https://github.com/tusen-ai/naive-ui/issues/3642)
|
||||
- 修复 `n-calendar` 在设定了 `default-value` 后默认显示月份没有跟随,关闭 [#3645](https://github.com/tusen-ai/naive-ui/issues/3645)
|
||||
- 修复 `n-form-item` 属性 `require-mark-placement` 值为 `left` 时不生效, 关闭 [#3628](https://github.com/tusen-ai/naive-ui/issues/3628).
|
||||
- 修复 `n-upload` `OnBeforeUpload` 类型返回值只能为 `Promise<boolean>`
|
||||
|
||||
### Feats
|
||||
|
||||
|
@ -121,7 +121,8 @@ export interface UploadInst {
|
||||
export type OnBeforeUpload = (data: {
|
||||
file: SettledFileInfo
|
||||
fileList: SettledFileInfo[]
|
||||
}) => Promise<boolean> | boolean | void
|
||||
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
||||
}) => Promise<boolean | void> | boolean | void
|
||||
|
||||
export type ListType = 'text' | 'image' | 'image-card'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user