From 05772ee646caf403d6057fe277236cdb9ce0bf03 Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 8 Jan 2021 16:29:31 +0800 Subject: [PATCH] Update admin.js --- public/static/admin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/static/admin.js b/public/static/admin.js index 71a3dd5a9..7639d5a0a 100644 --- a/public/static/admin.js +++ b/public/static/admin.js @@ -761,12 +761,12 @@ $(function () { $body.on('click', '[data-tips-image]', function () { $.previewImage(this.dataset.tipsImage || this.dataset.lazySrc || this.src, this.dataset.with); }); - $.previewImage = function (src, area) { + $.previewImage = function (src, area, done) { var img = new Image(), index = $.msg.loading(); img.style.background = '#fff', img.style.display = 'none'; img.style.height = 'auto', img.style.width = area || '480px'; document.body.appendChild(img), img.onerror = function () { - $.msg.close(index); + $.msg.close(index), (typeof done === 'function' && done()); }, img.onload = function () { layer.open({ type: 1, shadeClose: true, success: img.onerror, content: $(img), title: false,