跳转到主要内容

onBeforeFolderToggle

信息

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

Description

在树状分支打开或关闭之前触发(仅适用于Timeline视图的"tree"模式)

onBeforeFolderToggle: (section: object | boolean, isOpen: boolean, allSections: boolean) => boolean

Parameters

  • section - (required) object | boolean - 即将打开或关闭的分支的配置对象。
    如果通过closeAllSections()/openAllSections()方法同时关闭或打开所有分支,则此参数为true
  • isOpen - (required) boolean - 表示分支是否将要打开(true)或关闭(false
  • allSections - (required) boolean - 如果通过closeAllSections()/openAllSections()一次性打开或关闭所有树状分支,则为true,否则如果只影响单个分支则为false

Returns

  • result - (boolean) - 决定是否继续执行默认事件操作(true)或停止(false

Example

scheduler.attachEvent("onBeforeFolderToggle", function(section,isOpen,allSections){
// 在这里编写自定义逻辑
return true;
});
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.