跳转到主要内容

onClick

Description

当用户点击事件的左键鼠标时触发

onClick: (id: string, e: Event) => boolean;

Parameters

  • id - (required) string - 事件的 id
  • e - (required) Event - 一个原生事件对象

Returns

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

Example

scheduler.attachEvent("onClick", function (id, e){
// 此处编写自定义逻辑
return true;
});

Details

此事件可以被阻止。事件处理函数返回除 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.