mirror of https://gitee.com/karson/fastadmin.git
解决在使用Table组件时,传递pageSize参数确被设置全局的问题,并开放全局页面显示数方法
parent
8e48aa7edd
commit
5022da9cea
|
|
@ -190,12 +190,6 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
|
||||||
table.on('refresh.bs.table', function (e, settings, data) {
|
table.on('refresh.bs.table', function (e, settings, data) {
|
||||||
$(Table.config.refreshbtn, toolbar).find(".fa").addClass("fa-spin");
|
$(Table.config.refreshbtn, toolbar).find(".fa").addClass("fa-spin");
|
||||||
});
|
});
|
||||||
//当表格分页变更时
|
|
||||||
table.on('page-change.bs.table', function (e, page, pagesize) {
|
|
||||||
if (!isNaN(pagesize)) {
|
|
||||||
localStorage.setItem("pagesize", pagesize);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//当执行搜索时
|
//当执行搜索时
|
||||||
table.on('search.bs.table common-search.bs.table', function (e, settings, data) {
|
table.on('search.bs.table common-search.bs.table', function (e, settings, data) {
|
||||||
table.trigger("uncheckbox");
|
table.trigger("uncheckbox");
|
||||||
|
|
@ -540,6 +534,12 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
|
||||||
Table.list[id] = table;
|
Table.list[id] = table;
|
||||||
return table;
|
return table;
|
||||||
},
|
},
|
||||||
|
// 设置全局分页的单页显示数
|
||||||
|
pageSize: function (pageSize) {
|
||||||
|
if (!isNaN(pageSize)) {
|
||||||
|
localStorage.setItem('pagesize', pageSize);
|
||||||
|
}
|
||||||
|
},
|
||||||
// 批量操作请求
|
// 批量操作请求
|
||||||
multi: function (action, ids, table, element) {
|
multi: function (action, ids, table, element) {
|
||||||
var options = table.bootstrapTable('getOptions');
|
var options = table.bootstrapTable('getOptions');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue