From 5ecb5f667d5aba677dc0c29849ec765b0d06f964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=B2=BE=E5=8D=8E?= <842761733@qq.com> Date: Tue, 13 Dec 2022 17:56:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=87=92=E5=8A=A0=E8=BD=BD=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E6=B0=B4=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/main/resources/static/js/lazyload.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/server/src/main/resources/static/js/lazyload.js b/server/src/main/resources/static/js/lazyload.js index 206459ff..4296d46d 100644 --- a/server/src/main/resources/static/js/lazyload.js +++ b/server/src/main/resources/static/js/lazyload.js @@ -19,12 +19,9 @@ function checkImgs() { } function loadImg(el) { - var loaded = el.getAttribute("loaded"); - if (!Boolean(loaded)) { - var source = el.getAttribute("data-src"); - el.setAttribute("loaded", true); - el.src = source; - } + var source = el.getAttribute("data-src"); + el.src = source; + } // var mustRun = 500 // function throttle(fn, mustRun) {