开发工具与关键技术: VS , ;自定义表格渲染
作者:刘佳明
撰写时间:2019年 6 月 3 日
之前有编辑过运用layui渲染出table表格,本篇文章是不使用layui的方法,自己在HTML中使用标签来构建出一个table的表格
以下是经常使用的layuitable表格渲染
tabStudent = layuiTable.render({
elem: "#tabStudent",//html table id
//url: "/PateOnt/SelectPateOnt/",//数据接口
cols: [[ //表头
{ type: 'checkbox', fixed: 'left' },//复选框列,fixed:'left' 将列固定在左边
{ type: 'numbers', title: '序号' },//序号列,title设定标题名称
{ field: 'employeeID', title: 'employeeID', hide: true },
//{ field: 'UserID', title: 'UserID', hide: true },//hide:true 隐藏列
{ field: 'employeeName', title: '员工姓名' },
{ field: 'employeeNum', title: '员工编号' },
{ field: 'telphone', title: '电话号码' },
{ field: 'address', title: '家庭住址' },