mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-13 01:14:30 +08:00
docs: @motajs/system 文档
This commit is contained in:
1 parent
0df879298e
commit
83f460de65
9 files changed
+1089
-18
No files matched your search
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user