From 800fdff965920b78a67b42216e50f0825ae7ee62 Mon Sep 17 00:00:00 2001 From: msr123 Date: Sun, 17 Dec 2023 06:29:41 +0000 Subject: [PATCH] =?UTF-8?q?update=20component/pear/module/page.js.=20?= =?UTF-8?q?=E7=BB=99=E5=88=87=E6=8D=A2=E9=A1=B5=E9=9D=A2=E5=8A=A0=E4=B8=AA?= =?UTF-8?q?=E8=BF=87=E6=B8=A1=EF=BC=8C=E8=A7=A3=E5=86=B3=E5=9C=A8=E5=A4=9C?= =?UTF-8?q?=E9=97=B4=E6=A8=A1=E5=BC=8F=E4=B8=8B=E7=82=B9=E5=87=BB=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E8=A1=A8=E6=A0=BC=E6=97=B6=E5=87=BA=E7=8E=B0=E7=9F=AD?= =?UTF-8?q?=E6=9A=82=E7=9A=84=E7=99=BD=E8=89=B2=E8=83=8C=E6=99=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: msr123 --- component/pear/module/page.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/component/pear/module/page.js b/component/pear/module/page.js index de90eac..bf30652 100644 --- a/component/pear/module/page.js +++ b/component/pear/module/page.js @@ -32,7 +32,8 @@ layui.define(['jquery', 'element'], function (exports) { */ page.prototype.changePage = function (options) { - const $frame = $(`#${this.option.elem} .pear-page-content`); + const $frame = $(`#${this.option.elem} .pear-page-content`).css({display:'none'}); + var $frameLoad = $(`#${this.option.elem} .pear-page-loading`).css({display:'block'}); if (options.type === "_iframe") { @@ -44,7 +45,10 @@ layui.define(['jquery', 'element'], function (exports) { type: 'get', dataType: 'html', success: function (data) { - $frame.html(data) + $frame.html(data); + $frameLoad.fadeOut(1000); + $frame.fadeIn(2000); + element.init(); }, error: function (xhr) { return layer.msg('Status:' + xhr.status + ',' + xhr.statusText + ',请稍后再试!'); -- Gitee