Skip to content
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

关于onUploadImg的类型问题 #22

Closed
sniqa opened this issue Apr 23, 2022 · 2 comments
Closed

关于onUploadImg的类型问题 #22

sniqa opened this issue Apr 23, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@sniqa
Copy link

sniqa commented Apr 23, 2022

感谢大佬的无私奉献

[onUploadImg的第一个参数是FileList类型,点击上传图片的话函数传进来的是FileList类型,但是点击裁剪上传的话函数传进来的却是File[]类型:

2022-04-23 121601

如果是使用FileList.item()而不是通过数组下标进行取值的话就会报错:

屏幕截图 2022-04-23 122930

@imzbf
Copy link
Owner

imzbf commented Apr 23, 2022

em..这个后面统一成返回Array,目前先使用Array.from规避这个问题

@imzbf imzbf added the enhancement New feature or request label Apr 24, 2022
@imzbf
Copy link
Owner

imzbf commented Apr 24, 2022

1.6.12统一了这个问题,先入参全部类型为数组文件类型

@imzbf imzbf closed this as completed Apr 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants