# Class: VuexHistory
# Hierarchy
- VuexHistory
# Constructors
# constructor
+ new VuexHistory(plugin
: VuexMultiHistory, historyKey
: string): VuexHistory
Defined in VuexHistory.ts:68
Parameters:
Name | Type |
---|---|
plugin | VuexMultiHistory |
historyKey | string |
Returns: VuexHistory
# Accessors
# hasChanges
• get hasChanges(): boolean
Defined in VuexHistory.ts:150
Returns: boolean
# idCount
• get idCount(): number
Defined in VuexHistory.ts:39
Returns: number
# index
• get index(): number
Defined in VuexHistory.ts:31
Returns: number
# initialState
• get initialState(): any
Defined in VuexHistory.ts:35
Returns: any
# length
• get length(): number
Defined in VuexHistory.ts:27
Returns: number
# Methods
# addSnapshot
▸ addSnapshot(snapshot
: HistorySnapshot): VuexHistory
Defined in VuexHistory.ts:86
Parameters:
Name | Type |
---|---|
snapshot | HistorySnapshot |
Returns: VuexHistory
# canRedo
▸ canRedo(amount
: number): boolean
Defined in VuexHistory.ts:129
Parameters:
Name | Type | Default |
---|---|---|
amount | number | 1 |
Returns: boolean
# canUndo
▸ canUndo(amount
: number): boolean
Defined in VuexHistory.ts:137
Parameters:
Name | Type | Default |
---|---|---|
amount | number | 1 |
Returns: boolean
# clearHistory
▸ clearHistory(): void
Defined in VuexHistory.ts:145
Returns: void
# deserialize
▸ deserialize(stateData
: any): any
Defined in VuexHistory.ts:212
Parameters:
Name | Type |
---|---|
stateData | any |
Returns: any
# getSnapshot
▸ getSnapshot(options
: GetSnapshotOptions): UniqueHistorySnapshot | undefined
Defined in VuexHistory.ts:106
Parameters:
Name | Type |
---|---|
options | GetSnapshotOptions |
Returns: UniqueHistorySnapshot | undefined
# getSnapshotIndex
▸ getSnapshotIndex(options
: GetSnapshotIndexOptions): number
Defined in VuexHistory.ts:110
Parameters:
Name | Type |
---|---|
options | GetSnapshotIndexOptions |
Returns: number
# goto
▸ goto(options
: FindSnapshotOptions): VuexHistory
Defined in VuexHistory.ts:154
Parameters:
Name | Type |
---|---|
options | FindSnapshotOptions |
Returns: VuexHistory
# init
▸ init(): VuexHistory
Defined in VuexHistory.ts:78
Returns: VuexHistory
# overrideInitialState
▸ overrideInitialState(state
: any): VuexHistory
Defined in VuexHistory.ts:172
Parameters:
Name | Type |
---|---|
state | any |
Returns: VuexHistory
# redo
▸ redo(amount
: number): VuexHistory
Defined in VuexHistory.ts:177
Parameters:
Name | Type | Default |
---|---|---|
amount | number | 1 |
Returns: VuexHistory
# removeSnapshot
▸ removeSnapshot(options
: FindSnapshotOptions): HistorySnapshot | undefined
Defined in VuexHistory.ts:114
Parameters:
Name | Type |
---|---|
options | FindSnapshotOptions |
Returns: HistorySnapshot | undefined
# reset
▸ reset(): void
Defined in VuexHistory.ts:190
Returns: void
# serialize
▸ serialize(state
: any): any
Defined in VuexHistory.ts:208
Parameters:
Name | Type |
---|---|
state | any |
Returns: any
# undo
▸ undo(amount
: number): VuexHistory
Defined in VuexHistory.ts:195
Parameters:
Name | Type | Default |
---|---|---|
amount | number | 1 |
Returns: VuexHistory
# updateSnapshot
▸ updateSnapshot(options
: FindSnapshotOptions, snapshot
: HistorySnapshot): VuexHistory
Defined in VuexHistory.ts:119
Parameters:
Name | Type |
---|---|
options | FindSnapshotOptions |
snapshot | HistorySnapshot |
Returns: VuexHistory