Skip to content

Commit

Permalink
fix: 修复antdv文件上传限制数量的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
greper committed May 31, 2023
1 parent 12580ef commit 8b14ba3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ export default defineComponent({
};
function buildAntdvBinding() {
return {
const res: any = {
customRequest,
beforeUpload,
listType: props.listType,
Expand All @@ -466,6 +466,11 @@ export default defineComponent({
},
onPreview: handlePreview
};
if (props.limit != null && ctx.attrs.maxCount == null) {
res.maxCount = props.limit;
}
return res;
}
function buildElementBinding() {
Expand Down
1 change: 0 additions & 1 deletion packages/fast-extends/src/uploader/type/validators.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { compute } from "@fast-crud/fast-crud";
export const createAllUploadSuccessValidator = (getFormComponentRef: (key: string, isAsync: boolean) => any) => {
return async (rule: any, value: any) => {
debugger;
const ref = await getFormComponentRef(rule.fullField, true);
if (ref && ref.hasUploading()) {
throw new Error("还有未上传完成的文件");
Expand Down

0 comments on commit 8b14ba3

Please sign in to comment.