layui框架使用与代码编写
一、layui增加操作工具列
ShowLeakList = ListPager.extend({
init : function(container, primaryKey, url){
//列表容器
this.container = container;
//主键字段
this.primaryKey = primaryKey;
//数据请求地址
this.url = url;
//界面需要引用的插件
this.plugins = ['table', 'element', 'form', 'laydate', 'layer','carousel'];
// //弹出卡片界面的大小[60%,80%]
// this.cardSize = ['100%','100%'];
// //弹出卡片界面方式:页面层(这里content是一个普通的String):1;iframe层(content是一个URl):2
this.cardPopStyle = 2;
//每页大小
this.pageSize = 5;
//列表头
this.title = [[
{field: 'checkDate', title: '检测日期', width: 120},
{field: 'startTime', title: '检测开始时间', w