2023-05-06 11:29:46 +08:00
|
|
|
import {App} from "../index";
|
2023-05-07 17:31:50 +08:00
|
|
|
import {EventBus} from "./EventBus";
|
2023-05-04 18:28:57 +08:00
|
|
|
|
2023-05-06 11:29:46 +08:00
|
|
|
export class Plugin {
|
|
|
|
|
public i18n: IObject;
|
2023-05-07 17:31:50 +08:00
|
|
|
public eventBus: EventBus;
|
2023-05-04 18:28:57 +08:00
|
|
|
|
2023-05-06 11:29:46 +08:00
|
|
|
constructor(options: {
|
|
|
|
|
app: App,
|
|
|
|
|
id: string,
|
2023-05-07 17:31:50 +08:00
|
|
|
name: string,
|
2023-05-06 11:29:46 +08:00
|
|
|
i18n: IObject
|
|
|
|
|
}) {
|
|
|
|
|
this.i18n = options.i18n;
|
2023-05-07 17:31:50 +08:00
|
|
|
this.eventBus = new EventBus(options.name);
|
2023-05-04 18:28:57 +08:00
|
|
|
}
|
|
|
|
|
|
2023-05-06 11:29:46 +08:00
|
|
|
public getData() {
|
2023-05-04 18:28:57 +08:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public onload() {
|
2023-05-05 14:04:43 +08:00
|
|
|
console.log("Hello, world!");
|
2023-05-04 18:28:57 +08:00
|
|
|
}
|
|
|
|
|
}
|