Add popup header

This commit is contained in:
2022-03-22 22:16:11 +08:00
parent 90398b593e
commit 4d40ddf468
5 changed files with 74 additions and 6 deletions
+9 -1
View File
@@ -1,5 +1,6 @@
import { ReactNode } from "react";
import { ReactNode, createElement } from "react";
import { Emitter } from "@Model/Emitter";
import { Localization } from "@Component/Localization/Localization";
type IPopupConstructor = new (controller: PopupController, id: string) => Popup;
@@ -55,6 +56,13 @@ class Popup {
*/
public reactNode: ReactNode;
/**
* 渲染标题
*/
public onRenderHeader(): ReactNode {
return createElement(Localization, {i18nKey: "Popup.Title.Unnamed"});
}
/**
* 渲染函数
*/