layui 表格内容显示更改
在cole 中使用temple 属性进行修改
例:
table.render({
elem: '#messageTable'
,id: 'search_table_mId'
,height: 500
,url: '/manage/article/getMessageByType'
,where: {type:${type}}
,page: true
,limit: 10
,limits : [10]
,cols: [[
{ checkbox: true, fixed: true },
{ field: 'id', title: '序号', width:'6%', sort: true, fixed: true },
{ field: 'state', title: '状态', width:'6%', templet: function(d){
if (d.state==1) { // 自定义内容
return "显示";
} else if (d.state==2) {
return "未显示";
} else {
return "暂存";
}
} },
{ field: 'createUser', title: '创建人',width:'7%'},
{ field: 'modifyUser', title: '修改人',width:'7%' },
{ field: 'createTime', title: '创建时间',width:'10%' },
{ field: 'modifyTime', title: '修改时间',width:'10%' },
{ field: 'title', title: '标题',width:'8%' },
{ field: 'content', title: '内容',width:'8%' },
{ field: 'picture', title: '图片地址',width:'8%' },
{ field: 'file', title: '文件地址',width:'8%' },
{ field: 'remark', title: '备注',width:'4%' },
{ field: 'tempmId', title: '操作', width:'15%', templet: function(d){ // 自定义属性
return '<a class="layui-btn layui-btn-xs" lay-event="edit" lay-id="'+ d.tempmId +'"><i class="layui-icon layui-icon-edit"></i>编辑</a>' +
'<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del" lay-id="'+ d.tempmId +'"><i class="layui-icon layui-icon-delete"></i>移除</a>';
}
}
layui 表格内容显示更改的更多相关文章
- datatable转layui表格【偏原理】
如题这个类负责把datatable转换为layui表格可以显示的内容.适合配合表格url字段的webapi服务端,为其返回响应字符串.代码如下:using System;using System.We ...
- php网址显示excel表格内容
/** * excel表格内容在网页中显示 * * 首先需要下载PHPExcel 工具包 * 网址: http://phpexcel.codeplex.com/releases/view/119187 ...
- CSS控制长文本内容显示(截取的地方用省略号代替)
自动换行问题,正常字符的换行是比较合理的,而连续的数字和英文字符常常将容器撑大,下面介绍的是CSS如何实现处理的方法. 现实中经常出现一些内容比较长的文本,为了使整体布局美观,需要将文本内容控制在一行 ...
- 解决百度Ueditor编辑器表格不显示边框问题
一.主要内容 CMS使用百度Ueditor编辑器中的表格功能,在编辑模式下可以正常显示边框,而文章发布之后表格不能显示边框.本博文经过查阅相关资料,最终解决了该问题. 二.使用平台 1. dedecm ...
- layui.table图片显示不全和404问题
1.图片显示不全 在使用layui.table组件中,加载的图片显示不全,需重新定义CSS如下: .layui-table-cell{ height: auto!important; white-sp ...
- UEditor在asp.netMVC4中的使用,包括上传功能,粘贴表格不显示边框问题
网页编程中在线编辑器的使用还是很重要的,最近研究了一下百度出的UEditor编辑器,把它结合到刚学的asp.netMVC+EF中,同时实现上传资料(包括图片,视频等)功能,下面就以一个最简单的新闻管理 ...
- 如何将excel中的一个表格内容转成xml格式的文件
转自:http://www.cnblogs.com/sansi/archive/2012/02/06/2340471.html 感谢作者,解决了折磨我几天的问题,顿时心情开朗~ ----------- ...
- clipboard.min.js 复制表格内容
<script type="text/javascript" src="js/clipboard.min.js"></script> & ...
- 跨平台信息获取小工具第三版本(增加了继承、多线程、异常处理模块、excel表格内容剔除空格)
# coding=utf-8 import threadingimport paramikoimport osimport timeimport xlrdimport xlwtimport openp ...
随机推荐
- FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)”
https://stackoverflow.com/questions/29188789/eclipse-mac-os-x-debug-error-fatal-error-in-native-meth ...
- PHP-高并发和大流量的解决方案
一 高并发的概念在互联网时代,并发,高并发通常是指并发访问.也就是在某个时间点,有多少个访问同时到来. 二 高并发架构相关概念1.QPS (每秒查询率) : 每秒钟请求或者查询的数量,在互联网领域 ...
- 2-1、FileBeat入门
FileBeat入门 要开始使用Filebeat设置,请安装并配置相关产品: 用于存储和索引数据的Elasticsearch. 用户界面的Kibana. 用于解析和增强数据的Logstash(可选). ...
- Springboot 打jar包分离lib,配置文件正确方式
文章来源:https://my.oschina.net/xiaozhutefannao/blog/1932764 POM.xml <?xml version="1.0" en ...
- mac上安装vue项目
mac上如何安装vue项目 一, mac系统安装brew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/H ...
- 2018年最新JAVA面试题总结之框架(4)
转自于:https://zhuanlan.zhihu.com/p/40098726 1.谈谈对spring框架的了解 ,spring有什么作用(IOC,AOP),spring的核心是什么?回答:Spr ...
- 解决ODBC连接Oracle数据库报Unable to connect SQLState=08004问题
今天用ODBC连接Oracle数据库时,报了这么一个错“Unable to connect SQLState=08004 Oracle ODBC Ora-12154”,上网查了好久都说PowerDes ...
- [原创]Vivado SDK Initializing s/w repositories不动
21:56:16 INFO : Launching XSDB server: xsdb.bat C:/Xilinx/SDK/2015.4/scripts/xsdb/xsdb/xsdb-server.t ...
- CF809E Surprise me!
题解: 一道很套路的题目 首先一个结论 $\phi(xy)=\frac{\phi(x)*\phi(y)*gcd(x,y)}{\phi(gcd(x,y))}$ 这个按照$\phi$的定义很容易知道 然后 ...
- 使用云服务器实现Google搜索
>>>>>>>>>>>>>>>>>>>>>>>>> ...