From 60f3c96b903f04c4f015fae9d60d67b23f8131d8 Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Fri, 12 Sep 2025 10:59:39 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=9C=AA=E4=B8=8A=E4=BC=A0=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E7=9A=84=E6=98=BE=E7=A4=BA=20"=E6=97=A0"=20=E5=AD=97=202.fit?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=94=AF=E6=8C=81=203.=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E5=8F=AF=E4=BF=AE=E6=94=B9=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lowCode/assistant/lowcodeImage.vue | 59 +++++++++++++++++-- 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/src/components/lowCode/assistant/lowcodeImage.vue b/src/components/lowCode/assistant/lowcodeImage.vue index e98d079..1bf1ee7 100644 --- a/src/components/lowCode/assistant/lowcodeImage.vue +++ b/src/components/lowCode/assistant/lowcodeImage.vue @@ -342,6 +342,40 @@ function completionImageDetails(urlString:string) { const toShow = ref(false) + + +import { ref, watchEffect, nextTick } from 'vue' + +// 定义ref获取span元素 +const noPhotoSpanRef = ref(null) +// 存储span是否显示的状态 +const isNoPhotoSpanVisible = ref(false) + +// 监测影响元素显示的依赖项 +watchEffect(async () => { + // 触发依赖收集 + const isDivConditionMet = !props.data.control.useDefaultImg + && attrs.types === 2 + && props.data.control.onSiteShot === 1 + const hasPlaceholder = valueArr.value?.includes('/src/assets/image/404_images/imgNotFound.png') + + // 等待DOM更新 + await nextTick() + + // 通过元素是否存在判断显示状态 + isNoPhotoSpanVisible.value = !!noPhotoSpanRef.value +}) + + +const fit = computed(()=>{ + if(props.data.styles.divStyle&&props.data.styles.divStyle.objectFit){ + return props.data.styles.divStyle.objectFit + }else{ + return 'fill' + } +}) + +