跳转到主要内容

deleteSection

信息

此功能仅在 PRO 版本中可用。

Description

从当前活动视图中移除一个 section

deleteSection: (section_id: string) => boolean

Parameters

  • section_id - (required) string - section 的标识符

Returns

  • isSuccess - (boolean) - 如果成功移除 section 则返回 true,否则返回 false(例如,section ID 无效时)。

Example

scheduler.createTimelineView({
name: "timeline",
render:"tree",
...
y_unit:[
{key:"production", label:"生产部门", children:[
{key:"p1", label:"经理组", children:[
{key:"pm1", label:"John Williams"},
{key:"pm2", label:"David Miller"}
]}
]},
{key:"sales", label:"销售与市场部", children:[
{key:"s1", label:"Kate Moss"},
{key:"s2", label:"Dian Fossey"}
]}
]
});
...
scheduler.deleteSection("sales");

Applicable views: Timeline view

Details

注释

该方法需要启用 treetimeline 插件。

注释

如果当前视图不是以"Tree"模式的 Timeline,该方法将无效。

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.