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: 代表当前行,
index:代表当前行的下标,
可以使用return 返回你想要的数据显示在单元格中;
本文深入探讨了表格组件中单元格格式化属性的作用与用法,解析了如何通过formatter属性来定制显示效果,包括参数解释及函数应用实例。
4万+

被折叠的 条评论
为什么被折叠?



