-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
【BasicForm】当组件设置为Upload的时候,multiple属性无效 #240
Comments
multiple是选择文件的时候可以多选,如果要限制文件上传数量,应该用maxNumber,这个是bug,我等会修复 |
我如果多选文件,会多次调用上传接口,请问怎样才能在一次请求中同时上传多个文件?另外怎么拿到返回值啊? |
{ field: 'logoFileId', label: '模组图标', component: 'ImageUpload', componentProps: (props) => { return { api: uploadOrDownloadModule, maxSize: 2, maxCount: 1, resultField: 'result', }; }, rules: [ { required: true, trigger: 'change', type: 'array', message: '请上传模组图标', validator(rule, value) { console.log(value); return !value ? Promise.reject() : Promise.resolve(); }, }, ], }, 在BasicForm用ImageUpload;form这个logoFileId字段一直校验没有的,应该怎么给他赋值啊 |
问题描述:当组件设置为Upload的时候,multiple属性无效,设置为false仍然可以添加多个文件。
示例代码:
结果:
从控制台打印可以看出,添加的是多个文件:
预期结果:将multiple设置为false时,只能上传并保存一个文件。
The text was updated successfully, but these errors were encountered: