问题描述:table数据表格page设为false时,limit为默认设置10
解决办法:limit设为 Number.MAX_VALUE 加载全部数据
实例:
var table = layui.table; var dataList = [ { No: 1, Name: '张三' }, { No: 2, Name: '李四' } ]; var titleList = [[ { field: 'No', title: '序号' }, { field: 'Name', title: '名字' } ]]; table.render({ elem: '#tableTest', page: false, limit: Number.MAX_VALUE, data: dataList, cols: titleList, id: 'tableId' });