parse()
描述
将项目加载到 Diagram Editor 的 Toolbar 中
用法
parse(items: (object | string)[]): void;
参数
items-(必需)解析到 Toolbar 中的项目数组。完整的可用项目列表请参见此处
示例
const editor = new dhx.DiagramEditor("editor_container", {
type: "org",
view: {
toolbar: true
}
});
// 使用指定的项目显示 Toolbar
editor.toolbar.parse([{ type: "file", disabled: false }, "spacer", "scale"]);
更新日志:v6.0 中新增