|
@@ -46,7 +46,7 @@
|
|
|
:before-remove="isAnimation?removeFile5:removeFile"
|
|
|
>
|
|
|
<div type="primary" :disabled="!!file">
|
|
|
- <div>点击或拖拽文件上传 {{ isAnimation?'2GB':'5MB' }}</div>
|
|
|
+ <div>点击或拖拽文件上传 {{ isAnimation?'5MB':'2GB' }}</div>
|
|
|
<div class="">以内的{{ formatDesc }}</div>
|
|
|
</div>
|
|
|
<template v-slot:file="{ file }: { file: UploadFile }">
|
|
@@ -102,12 +102,12 @@ onMounted(async () => {
|
|
|
});
|
|
|
|
|
|
const { size, fileList, upload, removeFile, previewFile, file, accept } = useUpload({
|
|
|
- maxSize: isAnimation.value?5 * 1024 * 1024: 2000 * 1024 * 1024,
|
|
|
- formats: isAnimation.value?[".zip",".glb"]:[".jpg", ".png", ".jpeg", ".mp4", ".wav", ".mp3", ".shp"],
|
|
|
+ maxSize: 2000 * 1024 * 1024,
|
|
|
+ formats: [".jpg", ".png", ".jpeg", ".mp4", ".wav", ".mp3", ".shp"],
|
|
|
});
|
|
|
|
|
|
const { size:size5, fileList:fileLists, upload:upload5, removeFile:removeFile5, previewFile:previewFile5, file:file5, accept:accept5 } = useUpload({
|
|
|
- maxSize: 2000 * 1024 * 1024,
|
|
|
+ maxSize: 5 * 1024 * 1024,
|
|
|
formats: [".zip",".glb"],
|
|
|
});
|
|
|
const formatDesc = computed(() =>
|
|
@@ -150,7 +150,7 @@ defineExpose<QuiskExpose>({
|
|
|
throw "附件标题不能为空!";
|
|
|
}
|
|
|
|
|
|
- await uploadNewFile({ dictId: caseFile.value.dictId, file: file.value });
|
|
|
+ await uploadNewFile({ dictId: caseFile.value.dictId, file: isAnimation.value?file5.value:file.value });
|
|
|
return
|
|
|
},
|
|
|
});
|