From 6c5ab4debb9280a3a32ce04ab31fbf5e4e843cc1 Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Fri, 5 Sep 2025 13:52:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DesignForm/public/expand/lowcodeImage.vue | 73 ++++++++++++------- 1 file changed, 47 insertions(+), 26 deletions(-) diff --git a/src/components/DesignForm/public/expand/lowcodeImage.vue b/src/components/DesignForm/public/expand/lowcodeImage.vue index 6d44c32..94b5af9 100644 --- a/src/components/DesignForm/public/expand/lowcodeImage.vue +++ b/src/components/DesignForm/public/expand/lowcodeImage.vue @@ -67,6 +67,7 @@ const value = computed({ get: () => { if (props.data.control.imgUrl == "") { return props.modelValue ? props.modelValue : errimg; + //return props.modelValue ? props.modelValue : ''; } else { return props.data.control.imgUrl; } @@ -99,22 +100,28 @@ onMounted(()=>{ } */ }else{ if(props.type==2&&hasELCard(ancestors)){ - props.data.control.uploadedImgs = completionImageDetails(value.value) - if(props.data.control.useDefaultImg==false&&props.data.control.onSiteShot==""){ - toShow.value = true + if(value.value=="/src/assets/404_images/imgNotFound.png"){ + + }else{ + props.data.control.uploadedImgs = completionImageDetails(value.value) + if(props.data.control.useDefaultImg==false&&props.data.control.onSiteShot==""){ + toShow.value = true + } } + } } - },1000) + },100) }) function completionImageDetails(urlString:string) { // 分割URL字符串 const urls = urlString.split(',').map(url => url.trim()).filter(url => url); - + //console.log(urls) if (urls.length === 0) { /* throw new Error('未提供有效的图片URL'); */ - return {} + + return {} } return urls.map(url => { @@ -131,26 +138,32 @@ function completionImageDetails(urlString:string) { // 生成18位随机数字ID const randomId = Math.floor(Math.random() * 9e17) + 1e17; + if(url=="/src/assets/404_images/imgNotFound.png"){ + return {} + }else{ + return { + name: fileName, + percentage: 100, + status: "success", + uid: timestamp, + url: url, + response: { + code: 0, + data: { + id: randomId, + key: "", + name: fileName, + tag: fileExtension, + url: url, + type: 1 + }, + msg: "成功!" + } + }; + } + + - return { - name: fileName, - percentage: 100, - status: "success", - uid: timestamp, - url: url, - response: { - code: 0, - data: { - id: randomId, - key: "", - name: fileName, - tag: fileExtension, - url: url, - type: 1 - }, - msg: "成功!" - } - }; }); } @@ -286,8 +299,16 @@ function selectFile(){ }