From c7afa34f03a1625e80d870b0fa3b564b3061d80b Mon Sep 17 00:00:00 2001 From: 16337 <1633794139@qq.com> Date: Mon, 2 Mar 2026 14:21:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(aiot):=20=E5=91=8A=E8=AD=A6=E6=88=AA?= =?UTF-8?q?=E5=9B=BE=20Image=20=E7=BB=84=E4=BB=B6=E6=B7=BB=E5=8A=A0=20fall?= =?UTF-8?q?back=20=E5=85=9C=E5=BA=95=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 列表缩略图和详情弹窗的 Image 组件均添加 fallback SVG, 当图片 URL 无效或加载失败时显示友好占位符而非损坏图标。 Co-Authored-By: Claude Opus 4.6 --- apps/web-antd/src/views/aiot/alarm/list/index.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/web-antd/src/views/aiot/alarm/list/index.vue b/apps/web-antd/src/views/aiot/alarm/list/index.vue index 2396c7c3f..13dfb88c7 100644 --- a/apps/web-antd/src/views/aiot/alarm/list/index.vue +++ b/apps/web-antd/src/views/aiot/alarm/list/index.vue @@ -252,6 +252,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ :width="40" :height="40" :preview="{ src: row.ossUrl || row.snapshotUrl }" + :fallback="`data:image/svg+xml;utf8,-`" style="object-fit: cover; border-radius: 4px; cursor: pointer" /> - @@ -356,6 +357,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ :src="currentAlert.ossUrl || currentAlert.snapshotUrl" :width="300" :preview="{ src: currentAlert.ossUrl || currentAlert.snapshotUrl }" + :fallback="`data:image/svg+xml;utf8,图片加载失败`" />