bootstrap-table为空_BootstrapTable中文文档

名称标签类型默认描述

radio

data-radio

Boolean

false

是否显示单选radio

checkbox

data-checkbox

Boolean

false

是否显示多选checkbox

field

data-field

String

undefined

该列映射的data的参数名

title

data-title

String

undefined

该列的表头名

titleTooltip

data-title-tooltip

String

undefined

该列表头的title提示文本

class

class / data-class

String

undefined

该列的class

rowspan

rowspan / data-rowspan

Number

undefined

合并单元格时定义合并多少行

colspan

colspan / data-colspan

Number

undefined

合并单元格时定义合并多少列

align

data-align

String

undefined

设置该列数据如何对齐,’left’, ‘right’, ‘center’

halign

data-halign

String

undefined

table header对齐方式, ‘left’, ‘right’, ‘center’

falign

data-falign

String

undefined

table footer对齐方式, ‘left’, ‘right’, ‘center’

valign

data-valign

String

undefined

单元格(cell)对齐方式. ‘top’, ‘middle’, ‘bottom’

width

data-width

Number {Pixels or Percentage}

undefined

列的宽度,可以使用像素或者百分比,不带单位则默认为px

sortable

data-sortable

Boolean

false

该列是否排序(表头显示双箭头)

order

data-order

String

‘asc’

该列默认的排序方式, ‘asc’ or ‘desc’.

visible

data-visible

Boolean

true

该列是否可见

cardVisible

data-card-visible

Boolean

true

在card视图里是否可见

switchable

data-switchable

Boolean

true

列切换是否可见.

clickToSelect

data-click-to-select

Boolean

true

是否选中checkbox或者radio,当该列被选择时

formatter

data-formatter

Function

undefined

格式化单元格内容,function(value, row, index), value:该cell本来的值,row:该行数据,index:该行序号(从0开始)

footerFormatter

data-footer-formatter

Function

undefined

格式化footer内容,function(rows),rows:所有行数据

events

data-events

Object

undefined

The cell 的事件监听,当你使用formatter function的时候,有三个参数: event: the jQuery event. value: 该cell的值 row: 该行的数据 index: 该行的序号

sorter

data-sorter

Function

undefined

自定义字段排序函数,function(a, b)

sortName

data-sort-name

String

undefined

当列中有html等标签时,只排序实际内容(忽略标签和样式),例如字段为:”abc“,则sortName=abc

cellStyle

data-cell-style

Function

undefined

单元格样式,支持css和classes,function(value, row, index) value: 该cell的值 row: 该行的数据 index: 该行的序号

searchable

data-searchable

Boolean

true

搜索时是否搜索此列

searchFormatter

data-search-formatter

Boolean

true

搜索是否使用格式化后的数据(即显示在页面上的数据)

$.TableInit = function(i, total) {

$(‘#table‘).bootstrapTable(‘destroy‘);

$(‘#table‘).bootstrapTable({

data: total[i].children,

striped: true,

cache: false,

buttonsAlign: "right", //按钮对齐方式

pagination: true, //是否显示分页(*)

sidePagination: "client", //分页方式:client客户端分页,server服务端分页(*)

pageNumber: 1, //初始化加载第一页,默认第一页

pageSize: 6, //每页的记录行数(*)

height: 150, //行高,如果没有设置height属性,表格自动根据记录条数觉得表格高度

columns: [ //{

//field: ‘documentID‘,

//align: ‘center‘,

//title: ‘单据编号‘

// },

{

width:450,

field: ‘processInstName‘,

align: ‘center‘,

//title: ‘流程名称‘,

formatter: function aFormatter(value, row, index) {

return

[‘‘ + InstName + ‘

].join("")

}

}

},

//{

//  field: ‘biztypecode‘,

//   align: ‘center‘,

//title: ‘单据类型‘

// }, //{

///  field: ‘amount‘,

// align: ‘center‘,

//title: ‘金额‘

// },

{

width:200,

field: ‘time‘,

align: ‘center‘,

// title: ‘时间‘

}, {

width:200,

field: ‘username‘,

align: ‘center‘,

}

]

});

$(".swiper-a").removeClass("todoactived");;

$(".swiper-a").eq(i).addClass("todoactived");

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值