mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Update admin.js
This commit is contained in:
parent
5159fc32cc
commit
aa7ec322de
@ -680,9 +680,10 @@ $(function () {
|
||||
var option = params || {}, data = option.where || {}, sort = option.initSort || option.sort || {};
|
||||
option.id = table.id, option.elem = table, option.url = params.url || table.dataset.url || location.href;
|
||||
option.page = params.page !== false ? (params.page || true) : false, option.limit = params.limit || 20;
|
||||
option.loading = !!params.loading, option.autoSort = params.autoSort === true, option.cols = params.cols || [[]];
|
||||
option.loading = params.loading !== false, option.autoSort = params.autoSort === true, option.cols = params.cols || [[]];
|
||||
// 初始化不显示头部
|
||||
option.css = (option.css || '') + '.layui-table-box{opacity:0}.layui-table-page{opacity:0}';
|
||||
var cls = ['.layui-table-header', '.layui-table-fixed', '.layui-table-body', '.layui-table-page'];
|
||||
option.css = (option.css || '') + cls.join('{opacity:0}') + '{opacity:0}';
|
||||
// 默认动态设置页数, 动态设置最大高度
|
||||
if (option.page === true) option.page = {curr: layui.sessionData('pages')[option.id] || 1};
|
||||
if (option.height === 'full') if ($table.parents('.iframe-pagination').size()) {
|
||||
@ -693,7 +694,7 @@ $(function () {
|
||||
}
|
||||
// 动态计算最大页数
|
||||
option.done = function () {
|
||||
$table.data('that', this).next().find('.layui-table-box,.layui-table-page').animate({opacity: 1});
|
||||
$table.data('that', this).next().find(cls.join(',')).animate({opacity: 1});
|
||||
(option.loading = this.loading = true) && layui.sessionData('pages', {key: table.id, value: this.page.curr || 1});
|
||||
$.form.reInit($table.next()).find('[data-load],[data-queue],[data-action],[data-iframe]').not('[data-table-id]').attr('data-table-id', table.id);
|
||||
}, option.parseData = function (res) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user