跳至主要內容

Class: ui_manage

muzzik大约 2 分钟

index / ui_manage

Class: ui_manage

模块管理器

Remarks

  • 支持模块(注册/打开/关闭/取消注册)

  • 内置模块对象池

  • 模块栈

  • 全屏 UI 展示优化

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new ui_manage()

Overrides

instance_base.constructor

Defined in

assets/@framework/mk_ui_manage.ts:34open in new window

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
NameType
Textends Constructor<view_base>
Parameters
NameType
keyT
Returns

regis_data<T>

Remarks

open 未注册模块时会使用此函数获取注册数据自动注册

Defined in

assets/@framework/mk_ui_manage.ts:47open in new window

Methods

regis

regis<T>(key_, source_, target_, config_?): Promise<void>

注册模块

Type parameters

NameType
Textends Constructor<view_base>

Parameters

NameTypeDescription
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:84open in new window


unregis

unregis<T>(key_): Promise<void>

取消注册模块

Type parameters

NameType
Textends Constructor<view_base>

Parameters

NameTypeDescription
key_T模块键

Returns

Promise<void>

Defined in

assets/@framework/mk_ui_manage.ts:231open in new window


get

get(): readonly view_base[]

获取所有模块

Returns

readonly view_base[]

Defined in

assets/@framework/mk_ui_manage.ts:263open in new window

get<T, T2, T3>(key_, type_?): null | T3

获取指定模块

Type parameters

NameType
Textends Constructor<view_base> & Function
T2T extends { type_s: T2 } ? T2 : never
T3T["prototype"]

Parameters

NameTypeDescription
key_T模块键
type_?T2模块类型

Returns

null | T3

Defined in

assets/@framework/mk_ui_manage.ts:269open in new window

get<T, T2, T3>(key_, type_?): readonly T3[]

获取指定模块列表

Type parameters

NameType
Textends Constructor<view_base> & Function
T2T extends { type_s: T2 } ? T2 : never
T3T["prototype"]

Parameters

NameTypeDescription
key_T[]模块键列表 [type]
type_?T2模块类型

Returns

readonly T3[]

Defined in

assets/@framework/mk_ui_manage.ts:278open in new window


open

open<T, T2>(key_, config_?): Promise<null | T2>

打开模块

Type parameters

NameType
Textends Constructor<view_base> & Function
T2T["prototype"]

Parameters

NameTypeDescription
key_T模块键,必须经过 regis 接口注册过
config_?open_config<T>打开配置

Returns

Promise<null | T2>

Defined in

assets/@framework/mk_ui_manage.ts:316open in new window


close

close<T, T2>(args_, config_?): Promise<boolean>

关闭模块

Type parameters

NameType
Textends Constructor<view_base>
T2extends view_base

Parameters

NameTypeDescription
args_Node | T | T2节点/模块键/模块实例
config_?close_config<T>关闭配置

Returns

Promise<boolean>

Defined in

assets/@framework/mk_ui_manage.ts:479open in new window

📣 觉得很赞?分享给你的朋友吧!