BootStrap Table 1)列参数:formatter属性

formatter

  • Attribute: data-formatter

  • Type: Function

  • Detail:

    The context (this) is the column Object.

    The cell formatter function, take three parameters:

    • value: the field value.
    • row: the row record data.
    • index: the row index.
    • field: the row field.
  • Default: undefined

  • Example: Column Formatter

 

formatter这个属性属于列参数,意思就是对当前列的数据进行格式化操作,它是一个函数,有三个参数,value,row,index,

value: 代表当前单元格中的值,

row: 代表当前行,

扫描二维码关注公众号,回复: 11006402 查看本文章

index:代表当前行的下标,

可以使用return 返回你想要的数据显示在单元格中;

发布了162 篇原创文章 · 获赞 30 · 访问量 9万+

猜你喜欢

转载自blog.csdn.net/ScorpC/article/details/99674110