items
描述
可选。一个数组,包含排列在看板工具栏上的控件。
用法
items?: [
"search" | {
// 搜索参数
type: "search",
options?: [
{
id: string,
label: string,
searchRule?: (card, value, by) => {
return boolean
}
}, {...}
],
resultTemplate?: template(searchResult => {
return "搜索结果的 HTML 模板";
})
},
"sort" | {
// 排序参数
type: "sort",
options?: [
{
text: string,
by?: string, // by?: ((card: object) => any),
dir?: "asc" | "desc"
}, {...}
]
},
"spacer",
"undo",
"redo",
"addColumn",
"addRow",
custom_control // 字符串或函数
];
参数
在 items 数组中,可以包含以下参数:
信息