跳到主要内容

enable 启用全局事件(延迟)

enable

类型: MethodDeclaration

定义位置: event.ts

描述

启用全局事件(延迟)

参数 id: 全局事件文件ID

参数

参数名类型描述默认值
idstring--

返回值

类型: void

源代码

位置: 第 341 行

public enable(id: string): void {
const commands = this.guidMap[id]
if (commands) {
const {version} = this
commands.callback = () => {
if (this.version === version) {
commands.enabled = true
}
delete commands.callback
}
Callback.push(() => {
commands.callback?.()
})
}
}

文档生成时间:2025/7/7 12:07:06