自定义layui动态渲染的数据表格单元格样式

layui.use('table', function() {
var table = layui.table; table.render({
elem: "#table",
url: "{:url('xxxx')}",
page: true,
done: function(res) {
},
cols: [[
{field: 'id', title: 'ID', width: 80, sort: true, align: 'center'},
{field: 'xx', title: 'xx', sort: true,width: 120, align: 'center'},
{field: 'xx', title: 'xx', sort: true,width: 120, align: 'center'},
{field: 'xx', title: 'xxx', sort: true,width: 180, align: 'center'},
{field: 'xx', title: 'xx', style:'color:red', sort: true,width: 180, align: 'center'},
{title: '操作', width: 120, align: 'center', templet: '#operation'}
]]
}); // 监听工具栏
table.on('tool(table)', function(o) {
var d = o.data,
lEv = o.event,
tr = o.tr if (lEv == 'detail') pop(d);
if (lEv == 'deleted') deleted(d);
})
});

最新文章

  1. iframe的自适应高度
  2. C语言复习(1)
  3. 基于MATLAB的离散小波变换
  4. ExcelReport第一篇:使用ExcelReport导出Excel
  5. Bug:播放页面自动跳到首页
  6. [GraphQL] Write a GraphQL Schema in JavaScript
  7. 第1章 UML基础:类的关系
  8. AE开发 入门教程
  9. Multiple reportviewers on one page With reportviwer 11.0
  10. 使用NetUserAdd API函数创建远程用户
  11. asp.net 微信公众平台我也来搞一搞(看看和大家的有什么不一样)
  12. 在MFC主对话框OnInitDialog()中弹出对话框
  13. lintcode.68 二叉树后序遍历
  14. Python 编程规范
  15. 不能ssh连接ubuntu linux 服务器 secureCRT不能ssh连接服务器 不能远程ssh连接虚拟机的ubuntu linux
  16. 《CLR Via C#》读书笔记:26.线程基础
  17. hql里面union和union all的区别
  18. BZOJ4196[Noi2015]软件包管理器——树链剖分+线段树
  19. css3整理--calc()
  20. CentOS和Ubuntu哪个好?

热门文章

  1. jq通过对象获取其ID值
  2. 在centos上使用yum安装rabbitmq-server
  3. Netty入门简介
  4. 一、Windows下Git的安装与配置
  5. FFmpeg流媒体处理-收流与推流
  6. FFmpeg封装格式处理
  7. Django组件之cookie与session
  8. java的四个基本特征
  9. GridView控件的属性、事件
  10. 【Servlet】1、Servlet监听器及相关接口