Class: ui_manage
index / ui_manage
Class: ui_manage
模块管理器
Remarks
支持模块(注册/打开/关闭/取消注册)
内置模块对象池
模块栈
全屏 UI 展示优化
Hierarchy
↳
ui_manage
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new ui_manage()
Overrides
Defined in
assets/@framework/mk_ui_manage.ts:34
Properties
get_regis_data_f
• Optional
get_regis_data_f: <T>(key
: T
) => regis_data
<T
>
Type declaration
▸ <T
>(key
): regis_data
<T
>
获取模块注册数据
Type parameters
Name | Type |
---|---|
T | extends Constructor <view_base > |
Parameters
Name | Type |
---|---|
key | T |
Returns
regis_data
<T
>
Remarks
open 未注册模块时会使用此函数获取注册数据自动注册
Defined in
assets/@framework/mk_ui_manage.ts:47
Methods
regis
▸ regis<T
>(key_
, source_
, target_
, config_?
): Promise
<void
>
注册模块
Type parameters
Name | Type |
---|---|
T | extends Constructor <view_base > |
Parameters
Name | Type | Description |
---|---|---|
key_ | T | 模块键 |
source_ | source_type <T > | 模块来源 |
target_ | null | follow_release_object <release_call_back_type > | 跟随释放对象 |
config_? | Partial <regis_config <T >> | 模块配置 |
Returns
Promise
<void
>
Defined in
assets/@framework/mk_ui_manage.ts:84
unregis
▸ unregis<T
>(key_
): Promise
<void
>
取消注册模块
Type parameters
Name | Type |
---|---|
T | extends Constructor <view_base > |
Parameters
Name | Type | Description |
---|---|---|
key_ | T | 模块键 |
Returns
Promise
<void
>
Defined in
assets/@framework/mk_ui_manage.ts:231
get
▸ get(): readonly view_base
[]
获取所有模块
Returns
readonly view_base
[]
Defined in
assets/@framework/mk_ui_manage.ts:263
▸ get<T
, T2
, T3
>(key_
, type_?
): null
| T3
获取指定模块
Type parameters
Name | Type |
---|---|
T | extends Constructor <view_base > & Function |
T2 | T extends { type_s : T2 } ? T2 : never |
T3 | T ["prototype" ] |
Parameters
Name | Type | Description |
---|---|---|
key_ | T | 模块键 |
type_? | T2 | 模块类型 |
Returns
null
| T3
Defined in
assets/@framework/mk_ui_manage.ts:269
▸ get<T
, T2
, T3
>(key_
, type_?
): readonly T3
[]
获取指定模块列表
Type parameters
Name | Type |
---|---|
T | extends Constructor <view_base > & Function |
T2 | T extends { type_s : T2 } ? T2 : never |
T3 | T ["prototype" ] |
Parameters
Name | Type | Description |
---|---|---|
key_ | T [] | 模块键列表 [type] |
type_? | T2 | 模块类型 |
Returns
readonly T3
[]
Defined in
assets/@framework/mk_ui_manage.ts:278
open
▸ open<T
, T2
>(key_
, config_?
): Promise
<null
| T2
>
打开模块
Type parameters
Name | Type |
---|---|
T | extends Constructor <view_base > & Function |
T2 | T ["prototype" ] |
Parameters
Name | Type | Description |
---|---|---|
key_ | T | 模块键,必须经过 regis 接口注册过 |
config_? | open_config <T > | 打开配置 |
Returns
Promise
<null
| T2
>
Defined in
assets/@framework/mk_ui_manage.ts:316
close
▸ close<T
, T2
>(args_
, config_?
): Promise
<boolean
>
关闭模块
Type parameters
Name | Type |
---|---|
T | extends Constructor <view_base > |
T2 | extends view_base |
Parameters
Name | Type | Description |
---|---|---|
args_ | Node | T | T2 | 节点/模块键/模块实例 |
config_? | close_config <T > | 关闭配置 |
Returns
Promise
<boolean
>