mirror of
https://github.com/motajs/template.git
synced 2026-11-02 15:04:30 +08:00
feat: 楼层切换
This commit is contained in:
1 parent
4bf39062a8
commit
f4c77d152f
15 files changed
+449
-23
No files matched your search
@@ -1,4 +1,5 @@
|
||||
export * from './collection';
|
||||
export * from './collector';
|
||||
export * from './registry';
|
||||
export * from './trigger';
|
||||
export * from './types';
|
||||
@@ -0,0 +1,16 @@
|
||||
import { IStateBase } from '@user/data-base';
|
||||
import { ITrigger, ITriggerCollection, ITriggerHandler } from './types';
|
||||
import { TriggerCollection } from './collection';
|
||||
|
||||
export abstract class BaseTrigger implements ITrigger {
|
||||
abstract type: number;
|
||||
abstract priority: number;
|
||||
|
||||
constructor(readonly state: IStateBase) {}
|
||||
|
||||
abstract trigger(handler: ITriggerHandler): Promise<void>;
|
||||
|
||||
collection(): ITriggerCollection {
|
||||
return new TriggerCollection([this]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user