解决用户管理页面滚动返回顶部条失效方案:重新绑定,没有更好的办法

This commit is contained in:
Ricky 2020-06-29 16:37:23 +08:00
parent ce3d5d2021
commit 3334acd494
2 changed files with 17 additions and 1 deletions

View File

@ -193,6 +193,14 @@ $(function() {
var elem = this;
var win = $(window);
var doc = $('html, body');
if(typeof(opt) != "undefined"){
if(opt.win != null){
win = opt.win;
}
if(opt.doc != null){
doc = opt.doc;
}
}
var options = $.extend({
autohide: true,
offset: 50,

View File

@ -101,6 +101,14 @@
panehHidden = true;
}
$('body').layout({ initClosed: panehHidden, west__size: 185});
// 回到顶部绑定
if ($.fn.toTop !== undefined) {
var opt = {
win:$('.ui-layout-center'),
doc:$('.ui-layout-center')
};
$('#scroll-up').toTop(opt);
}
queryUserList();
queryDeptTree();
});