插件基本事件

interface EventMap {
    click: ((index) => void);
    dataChange: ((data, prevData?) => void);
    dataLoaded: ((data) => void);
    disable: ((event) => void);
    dispose: (() => void);
    enable: ((event) => void);
    historyLengthChange: ((historyStackLength) => void);
    stateChange: ((params) => void);
}

Hierarchy (view full)

Properties

click: ((index) => void)

Type declaration

    • (index): void
    • Parameters

      • index: number

      Returns void

dataChange: ((data, prevData?) => void)

数据变更

Type declaration

dataLoaded: ((data) => void)

数据加载完成

Type declaration

disable: ((event) => void)

Type declaration

    • (event): void
    • Parameters

      • event: {
            userAction: boolean;
        }

        event.userAction是否是用户操作

        • userAction: boolean

      Returns void

Description

enabled 从 true 到 false 的回调

dispose: (() => void)

Type declaration

    • (): void
    • Returns void

Description

插件 dispose

enable: ((event) => void)

Type declaration

    • (event): void
    • Parameters

      • event: {
            userAction: boolean;
        }

        event.userAction是否是用户操作

        • userAction: boolean

      Returns void

Description

enabled 从 false 到 true 的回调

historyLengthChange: ((historyStackLength) => void)

Type declaration

    • (historyStackLength): void
    • Parameters

      • historyStackLength: number

        历史堆栈当前数量

      Returns void

Description

历史堆栈更新

stateChange: ((params) => void)

插件状态变化

Type declaration