跳到主要内容
版本:0.9.0-beta.2

Class: Controller

molecule.react.Controller

Hierarchy

Constructors

constructor

new Controller()

Inherited from

GlobalEvent.constructor

Methods

count

count(name): number

Count the service event

Parameters

NameTypeDescription
namestringEvent name

Returns

number

Inherited from

GlobalEvent.count

Defined in

src/common/event/eventBus.ts:28


emit

emit(name, ...args): void

Emit the service event

Parameters

NameTypeDescription
namestringEvent name
...argsanyArguments

Returns

void

Inherited from

GlobalEvent.emit

Defined in

src/common/event/eventBus.ts:20


initView

Abstract initView(): void

Returns

void

Defined in

src/react/controller.ts:4


subscribe

subscribe(name, callback): void

Subscribe the service event

Parameters

NameTypeDescription
namestring | string[]Event name
callbackFunctionCallback function

Returns

void

Inherited from

GlobalEvent.subscribe

Defined in

src/common/event/eventBus.ts:11


unsubscribe

unsubscribe(name): void

Unsubscribe the specific event

Parameters

NameTypeDescription
nameanyThe event name

Returns

void

Inherited from

GlobalEvent.unsubscribe

Defined in

src/common/event/eventBus.ts:37