add base attr for tableReload

pull/1058/head
贤心 2022-06-28 21:01:21 +08:00
parent 9372560268
commit c86a2271e4
2 changed files with 7 additions and 5 deletions

View File

@ -117,15 +117,16 @@ layui.use(['table', 'dropdown'], function(){
//,width: 600
,title: '用户数据表'
,url: 'json/table/demo1.json'
//,method: 'post'
,pagebar: '#pagebarDemo' // 分页栏模板
,lineStyle: 'height: 95px;' // 行样式
//,lineStyle: 'height: 95px;' // 行样式
,css: [ // 自定义样式
'.layui-table-page{text-align: right;}'
,'.layui-table-pagebar{float: left;}'
].join('')
//,size: 'lg'
//,size: 'sm'
//,skin: 'line'
//,autoSort: false //是否自动排序。如果否,则由服务端排序
//,loading: false

View File

@ -1709,7 +1709,7 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function(exports){
//复选框选择
that.elem.on('click', 'input[name="layTableCheckbox"]+', function(){ //替代元素的 click 事件
var checkbox = $(this).prev()
,childs = that.layBody.find('input[name="layTableCheckbox"]')
,children = that.layBody.find('input[name="layTableCheckbox"]')
,index = checkbox.parents('tr').eq(0).data('index')
,checked = checkbox[0].checked
,isAll = checkbox.attr('lay-filter') === 'layTableAllChoose';
@ -1718,7 +1718,7 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function(exports){
//全选
if(isAll){
childs.each(function(i, item){
children.each(function(i, item){
item.checked = checked;
that.setCheckData(i, checked);
});
@ -2254,7 +2254,8 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function(exports){
// 过滤与数据无关的参数
var dataParams = new RegExp('^('+ [
'data', 'url', 'where', 'page', 'limit',
'data', 'url', 'method', 'contentType',
'headers', 'where', 'page', 'limit',
'request', 'response', 'parseData'
].join('|') + ')$');