在 tabulator.js 下使用“rownum”格式化程序时,有没有办法以 0(而不是 1)开头? 版本:6.2
{title:"auto", field:"auto", width:10, headerSort:false, formatter:"rownum"}
您可以使用自定义格式化程序来实现此目的:
{title:"auto", field:"auto", width:10, headerSort:false, formatter:function(row){
return row.getPosition() - 1; //adjust the row position to 0 index it
}}