启用slimScroll美化滚动条

pull/71/head
PPPSCN 2018-04-11 21:23:20 +08:00
parent 53be2a2e96
commit 302e92dee8
1 changed files with 4 additions and 3 deletions

View File

@ -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的参数