DYL0109
2025-01-21 efde01cee841611bf6f5cc9538fc39f6313e1533
zhitan-vue/src/components/FileUpload/index.vue
@@ -40,7 +40,6 @@
<script setup>
import { getToken } from "@/utils/auth";
const props = defineProps({
  modelValue: [String, Object, Array],
  // 数量限制
@@ -56,7 +55,7 @@
  // 文件类型, 例如['png', 'jpg', 'jpeg']
  fileType: {
    type: Array,
    default: () => ["doc", "xls", "ppt", "txt", "pdf"],
    default: () => ["doc", "xls", "ppt", "txt", "pdf","docx"],
  },
  // 是否显示提示
  isShowTip: {
@@ -148,7 +147,7 @@
// 删除文件
function handleDelete(index) {
  fileList.value.splice(index, 1);
  emit("update:modelValue", listToString(fileList.value));
  emit("update:modelValue", fileList.value);
}
// 上传结束处理
@@ -157,7 +156,8 @@
    fileList.value = fileList.value.filter(f => f.url !== undefined).concat(uploadList.value);
    uploadList.value = [];
    number.value = 0;
    emit("update:modelValue", listToString(fileList.value));
    console.log(fileList.value)
    emit("update:modelValue", fileList.value);
    proxy.$modal.closeLoading();
  }
}