跳至主要内容

readonly

描述

可选。启用/禁用只读模式

在只读模式下,无法通过 UI 配置 Pivot 的结构。

用法

 readonly?: boolean;

参数

该属性可设置为 truefalse

  • true - 启用只读模式
  • false - 默认值,禁用只读模式

示例

const table = new pivot.Pivot("#root", {
fields,
data: dataset,
config: {
rows: ["studio", "genre"],
columns: [],
values: [
{
field: "title",
method: "count"
},
{
field: "score",
method: "max"
}
]
},
readonly: true
});

相关示例Pivot 2. 只读模式