From 7c1f07eb7d2dcda39e4c72aefa68ab7acf106e92 Mon Sep 17 00:00:00 2001 From: tcy <1193318383@qq.com> Date: Thu, 21 Aug 2025 08:55:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=90=8C=E7=99=BB=E8=AE=B0=E7=9B=B8?= =?UTF-8?q?=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FileUpload/index.vue | 7 ++- src/views/ctr/index.vue | 78 ++++++++++++++++++++++++----- 2 files changed, 68 insertions(+), 17 deletions(-) diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index 8f7db5c..9c021eb 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -98,7 +98,7 @@ const props = defineProps({ showFileList: propTypes.bool.def(false), // 默认显示的文件列表 defaultFileList: { - type: Array, + type: Array as any, default: () => [] }, // 其他参数 @@ -180,12 +180,11 @@ watch( { deep: true, immediate: true } ); watch(() => props.defaultFileList, () => { - if(props.defaultFileList.length === 0) return; + if (props.defaultFileList.length === 0) return; props.defaultFileList.forEach((item: any) => { fileList.value.push(item); }); - console.log(fileList.value); - + }, { deep: true, immediate: true }); // 上传前校检格式和大小 const handleBeforeUpload = (file: any) => { diff --git a/src/views/ctr/index.vue b/src/views/ctr/index.vue index 0be90d9..343e9bf 100644 --- a/src/views/ctr/index.vue +++ b/src/views/ctr/index.vue @@ -14,7 +14,7 @@