添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
阳刚的牛排  ·  IN 运算符 | ClickHouse Docs·  1 月前    · 
销魂的海豚  ·  [MS SQL]使用#Temp ...·  1 月前    · 
谦虚好学的领结  ·  程式宅急便: [MS ...·  1 月前    · 
至今单身的杨桃  ·  Beta Report: "Error ...·  4 周前    · 
豪爽的热水瓶  ·  How to export a Hive ...·  3 周前    · 
憨厚的黄瓜  ·  QCPItemRect - CSDN文库·  1 年前    · 
温暖的拖把  ·  qtreeview removerows-掘金·  1 年前    · 
茫然的键盘  ·  Chrome Extension ...·  2 年前    · 
精彩文章免费看

Bootstrap Table 学习笔记之列参数(一)

title

field

表格列数据的字段。

radio

  • 使用方法:设置 radio:true 启用。
  • checkbox

  • 使用方法:设置 checkbox:true 启用。
  • titleTooltip

    定义把鼠标放在列头上时提示的文字。

    class

    定义列所用的样式类名。
  • 使用方法:先定义一个类选择器如 .red{color: #ff0000} ,再在列参数中启用 class:'red' var operatorObj = { operateFormatter:function(value, row, index) {//初始操作栏的按钮 return ['<a class="write" href="javascript:void(0)" title="查看详情" style="margin:0">', '<i class="glyphicon glyphicon-eye-open"></i>查看详情', '</a>' ].join('');//配置表格操作栏的内容 },operateEvents:{//点击时触发的事件 'click .write': function (e, value, row, index) { alert(row.name); $('#table').bootstrapTable({ url: 'data/data1.json', columns: [{ field: 'statebox', checkbox: true field: 'name', title: '姓名', class:'red' field: 'age', title: '年龄', sortable:true, formatter:function(value,row,index){ return getValue(value); field: 'id', title: '证件号' width: "150px", field: 'operate', title: '相关操作', align: 'center', events: operatorObj.operateEvents, formatter: operatorObj.operateFormatter striped:true, showColumns:true, showToggle:true function getValue(value,row,index){ if(value >= 18){ return "<span>已成年</span>"; }else{ return "<span>未成年</span>" </script>
  •