跳至主要內容

Class: guide_manage

muzzik大约 1 分钟

index / guide_manage

Class: guide_manage

引导管理器

Remarks

  • 支持多实例

  • 支持任意步骤的(插入/删除)

  • 支持(暂停/完成)引导

  • 支持任意步骤跳转后的状态还原(操作单元)

  • 引导步骤脚本分离,支持组件式挂载

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new guide_manage(init_)

Parameters

NameType
init_init_config

Defined in

assets/@framework/guide/mk_guide_manage.ts:23open in new window

Properties

event

event: event_target<event_protocol>

事件

Defined in

assets/@framework/guide/mk_guide_manage.ts:35open in new window


step_map

step_map: Map<number, guide_step_base<any>>

步骤表

Defined in

assets/@framework/guide/mk_guide_manage.ts:37open in new window

Accessors

pause_b

get pause_b(): boolean

暂停状态

Returns

boolean

Defined in

assets/@framework/guide/mk_guide_manage.ts:39open in new window

set pause_b(value_b_): void

Parameters

NameType
value_b_boolean

Returns

void

Defined in

assets/@framework/guide/mk_guide_manage.ts:43open in new window


finish_b

get finish_b(): boolean

完成状态

Returns

boolean

Defined in

assets/@framework/guide/mk_guide_manage.ts:48open in new window


end_step_n

get end_step_n(): number

结束步骤

Returns

number

Defined in

assets/@framework/guide/mk_guide_manage.ts:53open in new window

Methods

regis

regis(step_): void

注册步骤

Parameters

NameTypeDescription
step_guide_step_base<any> | guide_step_base<any>[]步骤实例

Returns

void

Defined in

assets/@framework/guide/mk_guide_manage.ts:77open in new window


run

run(): Promise<void>

运行引导

Returns

Promise<void>

Remarks

自动取消暂停状态,且更新当前步骤视图

Defined in

assets/@framework/guide/mk_guide_manage.ts:94open in new window


set_step

set_step(step_n_, init_data_?): Promise<void>

设置当前步骤

Parameters

NameTypeDescription
step_n_number步骤
init_data_?any初始化数据

Returns

Promise<void>

Remarks

  • 暂停状态:更新步骤数据

  • 正常状态:更新步骤数据,执行步骤生命周期

Defined in

assets/@framework/guide/mk_guide_manage.ts:212open in new window


get_step

get_step(): number

获取步骤

Returns

number

Defined in

assets/@framework/guide/mk_guide_manage.ts:254open in new window


finish

finish(): void

完成引导

Returns

void

Defined in

assets/@framework/guide/mk_guide_manage.ts:259open in new window

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