如果它们与列无关,那么您可以将它们粘贴在表格上方的 div 中。
如果您正在谈论分组列,那么制表符通过在列定义中使用嵌套对象来内置该功能
var table = new Tabulator("#example-table", {
columnHeaderVertAlign:"bottom", //align header contents to bottom of cell
columns:[
{title:"Name", field:"name", width:160},
{//create column group
title:"Work Info",
columns:[
{title:"Progress", field:"progress", hozAlign:"right", sorter:"number", width:100},
{title:"Rating", field:"rating", hozAlign:"center", width:80},
{title:"Driver", field:"car", hozAlign:"center", width:80},
],
},
{//create column group
title:"Personal Info",
columns:[
{title:"Gender", field:"gender", width:90},
{title:"Favourite Color", field:"col", width:140},
{title:"Date Of Birth", field:"dob", hozAlign:"center", sorter:"date", width:130},
],
},
],
});
有关完整详细信息,请查看列分组文档