app
qirong
2024-01-09 ade0a9866acd10139562ca5b093873781ddb93ae
src/components/FileUpload/index.vue
@@ -46,7 +46,7 @@
});
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const emit = defineEmits(['update:modelValue','closePopup']);
const emit = defineEmits(['update:modelValue','closePopup','openPopup']);
const number = ref(0);
const uploadList = ref<any[]>([]);
//互联网端
@@ -160,11 +160,21 @@
const handleUploadError = () => {
    proxy?.$modal.msgError("上传文件失败");
}
const debounce = (fn: Function, delay = 1500) => {
  let timer: number | null = null;
  return (...args: any[]) => {
    if (timer) {
      clearTimeout(timer);
    }
    timer = setTimeout(() => {
      fn(...args);
    }, delay);
  }
}
const handleUploadProgress=(e: any) => {
//   downloadLoadingInstance = ElLoading.service({ text: '正在上传文件,请稍候', background: 'rgba(0, 0, 0, 0.7)' });
//   dialogVisible.value = true;
  emit('closePopup','123123');
  // downloadProgress.value = downloadProgress.value + 50
  // emit('closePopup','123123');
  emit('openPopup','123123');
}
// 上传成功回调
const handleUploadSuccess = (res: any, file: UploadFile) => {