From 302e92dee88986e6e3cd0ca40c8e343ab3210c4b Mon Sep 17 00:00:00 2001 From: PPPSCN <35696959@qq.com> Date: Wed, 11 Apr 2018 21:23:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=AF=E7=94=A8slimScroll=E7=BE=8E=E5=8C=96?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/js/fast.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/assets/js/fast.js b/public/assets/js/fast.js index 18d0ea51..22f12f5f 100644 --- a/public/assets/js/fast.js +++ b/public/assets/js/fast.js @@ -303,12 +303,13 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'slimscroll'], functio //公共代码 $(function ($) { if (self === top) { - $('#main').slimScroll({height: $(window).height() + 'px'}); + $('div[role="main"]').slimScroll({height: $(window).height() + 'px'}); } else { var ScrollHeight = $('iframe', parent.document).height(); - if (ScrollHeight) { - $('#main').slimScroll({height: ScrollHeight + 'px'}); + if (!ScrollHeight || ScrollHeight === 100) { + ScrollHeight = $('.content-wrapper', parent.document).height(); } + $('div[role="main"]').slimScroll({height: ScrollHeight + 'px'}); } }); //配置Toastr的参数