Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EventHub

事件管理器

Hierarchy

  • EventHub

Index

Constructors

Methods

Constructors

constructor

  • Returns EventHub

Methods

Static off

  • off(event: string, callback: Function): void
  • 注销事件监听

    Parameters

    • event: string

      事件名

    • callback: Function

      回调函数

    Returns void

Static on

  • on(event: string, callback: Function): void
  • 注册事件监听

    Parameters

    • event: string

      事件名

    • callback: Function

      回调函数

    Returns void

Static remove

  • remove(event: string, callback: Function): void
  • deprecated

    注销事件监听, 请使用EventHub.off代替

    Parameters

    • event: string

      事件名

    • callback: Function

      回调函数

    Returns void