From fe9bf34a4162a4b473b59d9e16eba6ad966816b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=93=88=E5=93=88=E5=93=88?= <2867557054@qq.com> Date: Sat, 16 Apr 2022 02:40:35 +0000 Subject: [PATCH] =?UTF-8?q?fixed=20component/pear/module/frame.js=20=20?= =?UTF-8?q?=E4=B8=BA=20loading.css=20=E6=8F=90=E4=BA=A4=20typeof=20?= =?UTF-8?q?=E6=A3=80=E6=B5=8B=EF=BC=8C=E9=98=B2=E6=AD=A2=E9=9D=9E=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E6=A8=A1=E5=BC=8F=E4=B8=8B=E6=8F=90=E7=A4=BA=20loadin?= =?UTF-8?q?g.css=20=E9=9D=9Efunction=E9=94=99=E8=AF=AF=20=E9=9D=9E?= =?UTF-8?q?=E8=A7=86=E5=9B=BE=E6=A8=A1=E5=BC=8F=E4=B8=8B=EF=BC=8C=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E4=BE=A7=E6=A0=8F=E5=AF=BC=E8=88=AA=E4=B8=8A=E6=9D=A1?= =?UTF-8?q?=E7=9B=AE=E6=97=B6=EF=BC=8C=E4=BC=9A=E4=BA=A7=E7=94=9F=20loadin?= =?UTF-8?q?g.css=20=E9=9D=9E=20function=E9=94=99=E8=AF=AF=20=20frame.js=3F?= =?UTF-8?q?v=3D3.9.4:28=20Uncaught=20TypeError:=20loading.css=20is=20not?= =?UTF-8?q?=20a=20function=20=20=20=20=20=20=20=20=20=20=20=20=20at=20pear?= =?UTF-8?q?Frame.changePage=20(frame.js=3Fv=3D3.9.4:28:12)=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20at=20admin.js=3Fv=3D3.9.4:165:17=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20at=20HTMLAnchorElement.=20(menu.js=3Fv=3D3.9.4:122:4)=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20at=20HTMLBodyElement.dispatch=20(layui.js:2:22295)?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20at=20HTMLBodyElement.m.h?= =?UTF-8?q?andle=20(layui.js:2:18997)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- component/pear/module/frame.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/component/pear/module/frame.js b/component/pear/module/frame.js index 6b41e0f..ac6664c 100644 --- a/component/pear/module/frame.js +++ b/component/pear/module/frame.js @@ -24,7 +24,18 @@ layui.define(['jquery', 'element'], function (exports) { pearFrame.prototype.changePage = function (url, loading) { var $frameLoad = $("#" + this.option.elem).find(".pear-frame-loading"); - if (loading) { + + /** + * 非视图模式下,切换侧栏导航上条目时,会产生 loading.css 非 function错误 + * frame.js?v=3.9.4:28 Uncaught TypeError: loading.css is not a function + at pearFrame.changePage (frame.js?v=3.9.4:28:12) + at admin.js?v=3.9.4:165:17 + at HTMLAnchorElement. (menu.js?v=3.9.4:122:4) + at HTMLBodyElement.dispatch (layui.js:2:22295) + at HTMLBodyElement.m.handle (layui.js:2:18997) + * + */ + if (loading && typeof loading.css ==='function') { loading.css({ display: 'block' }); } $("#" + this.option.elem + " iframe").attr("src", url); -- Gitee