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
07f2162fea
commit
7f89a3513c
@ -702,13 +702,13 @@ $(function () {
|
|||||||
});
|
});
|
||||||
// 实例并绑定事件
|
// 实例并绑定事件
|
||||||
$table.data('this', layui.table.render(bindData(option)));
|
$table.data('this', layui.table.render(bindData(option)));
|
||||||
$table.bind('reload render reloadData', function (evt, opts) {
|
$table.bind('reload render reloadData', function (evt, opts, next) {
|
||||||
data = $.extend({}, data, (opts = opts || {}).where || {});
|
data = $.extend({}, data, (opts || {}).where || {});
|
||||||
opts = bindData($.extend({}, opts, {loading: true}));
|
opts = bindData($.extend({}, opts || {}, {loading: true}));
|
||||||
if (evt.type.indexOf('reload') > -1) {
|
if (evt.type.indexOf('reload') > -1) {
|
||||||
if (layui.table.reloadData) {
|
if (layui.table.reloadData) {
|
||||||
var $next = $table.data('next');
|
next = $table.data('next'), next.where = data;
|
||||||
$next.sort = $next.initSort = opts.initSort, $next.where = data;
|
next.sort = next.initSort = opts.initSort || {};
|
||||||
layui.table.reloadData(table.id, (opts.page || {}).curr || 1);
|
layui.table.reloadData(table.id, (opts.page || {}).curr || 1);
|
||||||
} else {
|
} else {
|
||||||
layui.table.reload(table.id, opts);
|
layui.table.reload(table.id, opts);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user