修改分页处理

This commit is contained in:
Anyon 2021-12-31 11:55:04 +08:00
parent 52a67c5a7f
commit 8e287d6473

View File

@ -707,13 +707,14 @@ $(function () {
}); });
// 生成初始化参数 // 生成初始化参数
function bindData(opts) { function bindData(options) {
data['output'] = 'layui.table'; data['output'] = 'layui.table';
if (sort.field && sort.type) { if (sort.field && sort.type) {
data['_order_'] = sort.type, data['_field_'] = sort.field; data['_order_'] = sort.type, data['_field_'] = sort.field;
opts.initSort = {type: sort.type.split(',')[0].split(' ')[0], field: sort.field.split(',')[0].split(' ')[0]}; options.initSort = {type: sort.type.split(',')[0].split(' ')[0], field: sort.field.split(',')[0].split(' ')[0]};
} }
return (opts['where'] = data), opts; if (options.page === false) options.limit = '';
return (options['where'] = data), options;
} }
}); });
} }