Browse Source

懒加载同时加载水印

pull/54/MERGE
陈精华 2 years ago
parent
commit
5ecb5f667d
No known key found for this signature in database
GPG Key ID: 30BDC970902B755D
  1. 5
      server/src/main/resources/static/js/lazyload.js

5
server/src/main/resources/static/js/lazyload.js

@ -19,12 +19,9 @@ function checkImgs() {
} }
function loadImg(el) { function loadImg(el) {
var loaded = el.getAttribute("loaded");
if (!Boolean(loaded)) {
var source = el.getAttribute("data-src"); var source = el.getAttribute("data-src");
el.setAttribute("loaded", true);
el.src = source; el.src = source;
}
} }
// var mustRun = 500 // var mustRun = 500
// function throttle(fn, mustRun) { // function throttle(fn, mustRun) {

Loading…
Cancel
Save