mirror of
https://gitee.com/layui/layui.git
synced 2025-10-27 03:09:32 +08:00
修复之前提交的修改导致排序之后点击分页切换页数的时候滚动条没有回零的问题
This commit is contained in:
@@ -1039,7 +1039,7 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
|
||||
|
||||
var thisCheckedRowIndex;
|
||||
if(!sort && that.sortKey){
|
||||
return that.sort(that.sortKey.field, that.sortKey.sort, true);
|
||||
return that.sort(that.sortKey.field, that.sortKey.sort, true, null, type);
|
||||
}
|
||||
layui.each(data, function(i1, item1){
|
||||
var tds = [], tds_fixed = [], tds_fixed_r = []
|
||||
@@ -1382,7 +1382,7 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
|
||||
};
|
||||
|
||||
//数据排序
|
||||
Class.prototype.sort = function(th, type, pull, formEvent){
|
||||
Class.prototype.sort = function(th, type, pull, formEvent, reloadType){
|
||||
var that = this
|
||||
,field
|
||||
,res = {}
|
||||
@@ -1449,7 +1449,7 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
|
||||
curr: that.page,
|
||||
count: that.count,
|
||||
sort: true,
|
||||
type: formEvent ? '' : 'reloadData' // 通过按钮触发排序会默认回滚到顶部否则根据情况处理
|
||||
type: formEvent ? '' : reloadType // 通过按钮触发排序会默认回滚到顶部否则根据情况处理
|
||||
});
|
||||
|
||||
if(formEvent){
|
||||
|
||||
Reference in New Issue
Block a user