Skip to content

@vtj


@vtj / core / HistoryModel

Class: HistoryModel

Constructors

new HistoryModel()

new HistoryModel(schema, options): HistoryModel

Parameters

schema

HistorySchema

options

Partial<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

Methods

add()

add(dsl, silent): void

增加历史记录

Parameters

dsl

BlockSchema

silent

boolean = false

Returns

void

Defined in

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


backward()

backward(silent): void

Parameters

silent

boolean = false

Returns

void

Defined in

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


clear()

clear(silent): void

Parameters

silent

boolean = false

Returns

void

Defined in

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


forward()

forward(silent): void

Parameters

silent

boolean = false

Returns

void

Defined in

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


get()

get(id): undefined | HistoryItem

获取历史项

Parameters

id

string

Returns

undefined | HistoryItem

Defined in

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


load()

load(id, silent): void

Parameters

id

string

silent

boolean = false

Returns

void

Defined in

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


remove()

remove(id, silent): void

删除历史记录

Parameters

id

string

silent

boolean = false

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.