Browse Source

fix: PDF/word图片模式预览时, 下翻图片时频繁请求图片资源

pull/35/head
ZhengJin Fang 3 years ago committed by GitHub
parent
commit
727e9ae9ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      server/src/main/resources/static/js/lazyload.js

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

@ -19,8 +19,12 @@ 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 mustRun = 500
// function throttle(fn, mustRun) {

Loading…
Cancel
Save