docs: @motajs/system 文档

This commit is contained in:
AncTe committed 2025-04-03 15:22:25 +08:00
1 parent 0df879298e
commit 83f460de65
9 files changed
+1089 -18

No files matched your search

+6 -1
View File
@@ -74,7 +74,10 @@ export interface IUICustomConfig {
update(stack: IUIInstance[]): void;
}
interface UIControllerEvent {}
interface UIControllerEvent {
open: [ui: IGameUI, ins: IUIInstance];
close: [ui: IUIInstance];
}
export class UIController
extends EventEmitter<UIControllerEvent>
@@ -190,6 +193,7 @@ export class UIController
break;
}
this.sysShowBack.value = true;
this.emit('open', ui, ins);
return ins;
}
@@ -230,6 +234,7 @@ export class UIController
this.sysShowBack.value = false;
}
this.keepBack = false;
this.emit('close', ui);
}
closeAll(ui?: IGameUI): void {
+7
View File
@@ -114,6 +114,13 @@ export interface IUIInstance<C extends UIComponent = UIComponent> {
/** 是否永远保持开启 */
readonly alwaysShow: boolean;
/**
* 设置这个 UI 实例的响应式数据的值
* @param data 要设置的值
* @param merge 是将传入的值与原先的值合并(true),还是将当前值覆盖掉原先的值(false),默认合并
*/
setVBind(data: Partial<Props<C>>, merge?: boolean): void;
/**
* 隐藏这个 ui
*/