Skip to content

@vtj / Modules / core / HistoryModel

Class: HistoryModel

core.HistoryModel

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new HistoryModel(schema, options?): HistoryModel

Parameters

NameType
schemaHistorySchema
optionsPartial<HistoryModelOptions>

Returns

HistoryModel

Defined in

packages/core/src/models/history.ts:23

Properties

id

id: string

Defined in

packages/core/src/models/history.ts:21


index

index: number = -1

Defined in

packages/core/src/models/history.ts:20


items

items: HistoryItem[]

Defined in

packages/core/src/models/history.ts:22


options

Private options: HistoryModelOptions

Defined in

packages/core/src/models/history.ts:19

Methods

add

add(dsl, silent?): void

增加历史记录

Parameters

NameTypeDefault value
dslBlockSchemaundefined
silentbooleanfalse

Returns

void

Defined in

packages/core/src/models/history.ts:54


backward

backward(silent?): void

Parameters

NameTypeDefault value
silentbooleanfalse

Returns

void

Defined in

packages/core/src/models/history.ts:121


clear

clear(silent?): void

Parameters

NameTypeDefault value
silentbooleanfalse

Returns

void

Defined in

packages/core/src/models/history.ts:151


forward

forward(silent?): void

Parameters

NameTypeDefault value
silentbooleanfalse

Returns

void

Defined in

packages/core/src/models/history.ts:107


get

get(id): undefined | HistoryItem

获取历史项

Parameters

NameType
idstring

Returns

undefined | HistoryItem

Defined in

packages/core/src/models/history.ts:45


load

load(id, silent?): void

Parameters

NameTypeDefault value
idstringundefined
silentbooleanfalse

Returns

void

Defined in

packages/core/src/models/history.ts:138


remove

remove(id, silent?): void

删除历史记录

Parameters

NameTypeDefault value
idstringundefined
silentbooleanfalse

Returns

void

Defined in

packages/core/src/models/history.ts:86


toDsl

toDsl(): HistorySchema

Returns

HistorySchema

Defined in

packages/core/src/models/history.ts:33

Released under the MIT License.