@vtj / Modules / core / HistoryModel
Class: HistoryModel
core.HistoryModel
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new HistoryModel(schema
, options?
): HistoryModel
Parameters
Name | Type |
---|---|
schema | HistorySchema |
options | Partial <HistoryModelOptions > |
Returns
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
Name | Type | Default value |
---|---|---|
dsl | BlockSchema | undefined |
silent | boolean | false |
Returns
void
Defined in
packages/core/src/models/history.ts:54
backward
▸ backward(silent?
): void
Parameters
Name | Type | Default value |
---|---|---|
silent | boolean | false |
Returns
void
Defined in
packages/core/src/models/history.ts:121
clear
▸ clear(silent?
): void
Parameters
Name | Type | Default value |
---|---|---|
silent | boolean | false |
Returns
void
Defined in
packages/core/src/models/history.ts:151
forward
▸ forward(silent?
): void
Parameters
Name | Type | Default value |
---|---|---|
silent | boolean | false |
Returns
void
Defined in
packages/core/src/models/history.ts:107
get
▸ get(id
): undefined
| HistoryItem
获取历史项
Parameters
Name | Type |
---|---|
id | string |
Returns
undefined
| HistoryItem
Defined in
packages/core/src/models/history.ts:45
load
▸ load(id
, silent?
): void
Parameters
Name | Type | Default value |
---|---|---|
id | string | undefined |
silent | boolean | false |
Returns
void
Defined in
packages/core/src/models/history.ts:138
remove
▸ remove(id
, silent?
): void
删除历史记录
Parameters
Name | Type | Default value |
---|---|---|
id | string | undefined |
silent | boolean | false |
Returns
void
Defined in
packages/core/src/models/history.ts:86
toDsl
▸ toDsl(): HistorySchema
Returns
Defined in
packages/core/src/models/history.ts:33