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