mirror of
https://github.com/wallace5303/ee-core.git
synced 2026-04-05 15:39:03 +08:00
[todo] [ee-core] subsequent optimization of emitLifecycle
This commit is contained in:
@@ -20,6 +20,7 @@ class EventBus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// call lifecycle event
|
// call lifecycle event
|
||||||
|
// [todo] 如果是一个 async 函数,且函数的运行时间比较长,如何正确执行
|
||||||
emitLifecycle(eventName, ...args) {
|
emitLifecycle(eventName, ...args) {
|
||||||
const eventFn = this.lifecycleEvents[eventName];
|
const eventFn = this.lifecycleEvents[eventName];
|
||||||
if (eventFn) {
|
if (eventFn) {
|
||||||
|
|||||||
Reference in New Issue
Block a user