|
@@ -75,7 +75,7 @@ const props = defineProps({
|
|
|
});
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
-const emit = defineEmits(['update:modelValue']);
|
|
|
+const emit = defineEmits(['update:modelValue','successupload','addfile']);
|
|
|
const number = ref(0);
|
|
|
const uploadList = ref<any[]>([]);
|
|
|
|
|
@@ -136,6 +136,8 @@ const handleBeforeUpload = (file: any) => {
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ emit('addfile');
|
|
|
// proxy?.$modal.loading("正在上传文件,请稍候...");
|
|
|
number.value++;
|
|
|
return true;
|
|
@@ -175,12 +177,14 @@ const handleDelete = (index: number) => {
|
|
|
|
|
|
// 上传结束处理
|
|
|
const uploadedSuccessfully = () => {
|
|
|
+
|
|
|
if (number.value > 0 && uploadList.value.length === number.value) {
|
|
|
fileList.value = fileList.value.filter(f => f.url !== undefined).concat(uploadList.value);
|
|
|
uploadList.value = [];
|
|
|
number.value = 0;
|
|
|
emit("update:modelValue", listToString(fileList.value));
|
|
|
- proxy?.$modal.closeLoading();
|
|
|
+ // proxy?.$modal.closeLoading();
|
|
|
+ emit('successupload');
|
|
|
}
|
|
|
}
|
|
|
|