From e7049b5f5b6033627dfc50108ae0c5e41874bcd9 Mon Sep 17 00:00:00 2001 From: pllx Date: Tue, 28 Apr 2026 10:33:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E8=81=8A=E5=A4=A9?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=B7=BB=E5=8A=A0=20loading=3D"lazy"=20?= =?UTF-8?q?=E6=87=92=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在 message-renderer.js 的聊天图片缩略图 img 标签上添加 loading="lazy" decoding="async",非可视区域的图片不会被加载,减少初始页面数据传输。 --- resources/js/chat-room/message-renderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/js/chat-room/message-renderer.js b/resources/js/chat-room/message-renderer.js index 9c873c6..1835e60 100644 --- a/resources/js/chat-room/message-renderer.js +++ b/resources/js/chat-room/message-renderer.js @@ -68,7 +68,7 @@ export function buildChatMessageContent(msg, fontColor, textColorClass) { - ${imageName} ${captionHtml}