From 825448811d355ae150011fff4fb2d64600c18f62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Mon, 10 May 2021 10:40:03 +0800 Subject: [PATCH] Update admin.js --- public/static/admin.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public/static/admin.js b/public/static/admin.js index 34bcc9d74..8b8581634 100644 --- a/public/static/admin.js +++ b/public/static/admin.js @@ -806,7 +806,7 @@ $(function () { } }); }; - return (img.src = src), defer; + return (img.src = src), defer.resolve(); }; /*! 注册 data-phone-view 事件行为 */ @@ -902,6 +902,11 @@ $(function () { })(code) }; + /*! 延时关闭加载动画 */ + window.addEventListener('load', function () { + $('body>.layui-page-loader').fadeOut(); + }, true); + /*! 图片加载异常处理 */ document.addEventListener('error', function (event) { var elem = event.target; @@ -910,11 +915,6 @@ $(function () { } }, true); - /*! 延时关闭加载动画 */ - setTimeout(function () { - $('.layui-page-loader').fadeOut(); - }, 800); - /*! 系统菜单表单页面初始化 */ $.menu.listen(), $.vali.listen(), $.form.reInit($body); }); \ No newline at end of file