diff --git a/miniprogram/core/Api.ts b/miniprogram/core/Api.ts index 7ecf7f8..66b4e8e 100644 --- a/miniprogram/core/Api.ts +++ b/miniprogram/core/Api.ts @@ -1,4 +1,4 @@ -import { EventEmitter } from "./EventEmitter"; +import { Emitter } from "./Emitter"; import { Logger, LogLabel, LevelLogLabel, colorRadio, StatusLabel } from "./Logger"; interface IAppAPIParam { api: { @@ -118,7 +118,7 @@ type IAPIEvent = { /** * 接口调用 */ -class API extends EventEmitter> { +class API extends Emitter> { /** * 基础 URL diff --git a/miniprogram/core/EventEmitter.ts b/miniprogram/core/Emitter.ts similarity index 98% rename from miniprogram/core/EventEmitter.ts rename to miniprogram/core/Emitter.ts index b3fc67c..06ca652 100644 --- a/miniprogram/core/EventEmitter.ts +++ b/miniprogram/core/Emitter.ts @@ -22,7 +22,7 @@ type GenericEventHandler> = | Handler | WildcardHandler; -export class EventEmitter> { +export class Emitter> { /** * A Map of event names to registered handler functions. diff --git a/miniprogram/core/Logger.ts b/miniprogram/core/Logger.ts index 5b745bb..14878e5 100644 --- a/miniprogram/core/Logger.ts +++ b/miniprogram/core/Logger.ts @@ -782,7 +782,7 @@ class StatusLabel { * 失败 */ static readonly Failed = new LogLabel( - "×", new LogStyle().setBlank("0 4px").setBorder("1000px", "1px solid red").setColor("red") + "x", new LogStyle().setBlank("0 4px").setBorder("1000px", "1px solid red").setColor("red") ); } diff --git a/miniprogram/core/Module.ts b/miniprogram/core/Module.ts index 59f62a5..61610ce 100644 --- a/miniprogram/core/Module.ts +++ b/miniprogram/core/Module.ts @@ -1,4 +1,4 @@ -import { EventEmitter, EventType } from "./EventEmitter"; +import { Emitter, EventType } from "./Emitter"; import { Logger, LogLabel, LogStyle, LevelLogLabel } from "./Logger"; /** @@ -62,7 +62,7 @@ class Modular< DEP extends Depends = Depends, E extends Record = Record, TD extends IAnyTypeObject = IAnyTypeObject> -extends EventEmitter +extends Emitter implements WXContext { // [x:string]: any;