如何设置列的默认颜色?

How to set default color for column?

制表符有内置的格式化程序color

有没有办法设置默认列颜色(对于所有单元格)?

类似于:

columns: [
  { width: 50, color: "red" },
]

格式化程序没有内置默认方法,但您可以使用简单的方法 CSS 设置具有给定字段名称的列中单元格的背景颜色

.tabulator .tabulator-row .tabulator-cell[tabulator-field="fieldname"]{
    background-color:red;
}