最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
layui实现table加载的示例代码
时间:2022-06-25 15:46:11 编辑:袖梨 来源:一聚教程网
js实现:
layui.use(['table','form'], function() { $ = layui.jquery; table = layui.table; tableIns = initTable(); }); //加载列表 function initTable(){ // 执行渲染 tableIns = table.render({ id: 'idTest', elem : '#deviceTable', // 指定原始表格元素选择器(推荐id选择器) size: 'lg', height : 'full-20', // 容器高度 url : '/csCloud-admin/deviceController/getDeviceList.do', where: { 'orgId':$("#orgId").val(), 'coldNum':$("#coldNum").val(), 'devType':$("#devType").val(), 'isUsed':$("#isUsedId").val() }, method : 'post', cols : [ [ // 标题栏 { field : 'rownum', title : '序号', width : 100, sort : true }, { field : 'devNum', title : '设备编号', width : 200 }, { field : 'devAlias', title : '设备别名', width : 100 }, { field : 'devTypeVal', title : '设备类型', width : 100 }, { field : 'devModel', title : '设备型号', width : 100 }, { field : 'stateVal', title : '设备状态', width : 100 }, { field : 'coldNum', title : '冷库编号', width : 100 }, { field : 'orgName', title : '所属机构', width : 300 }, { field : 'isUsedValue', title : '状态', width : 100 }, { fixed : 'right', width : 300, align:'center', toolbar : '#barDemo' } ] ], // 设置表头 page : true, limits : [ 10,30, 60, 90, 150, 300 ], limit : 10 }); return tableIns; }
jsp实现:
相关文章
- 碧蓝航线大型作战装备研发优先级攻略 04-30
- 我的勇者游侠怎么搭配最强 04-30
- 仙剑世界照影迷妄镜任务流程完整解析 04-30
- CF手游王者风神保底价格攻略 04-30
- 明日之后前期装备推荐依据分享 04-30
- 明日之后菊花瓣食谱怎样 04-30