improve: history stack memory

This commit is contained in:
Hufe921
2024-03-10 10:35:43 +08:00
parent c6534f766d
commit 5044c31921
3 changed files with 53 additions and 18 deletions
+16 -1
View File
@@ -1,4 +1,11 @@
import { cloneProperty, deepClone, getUUID, isArrayEqual, splitText } from '.'
import {
cloneProperty,
deepClone,
deepCloneOmitKeys,
getUUID,
isArrayEqual,
splitText
} from '.'
import {
ElementType,
IEditorOption,
@@ -28,6 +35,7 @@ import {
} from '../dataset/constant/Title'
import { ControlComponent, ControlType } from '../dataset/enum/Control'
import { DeepRequired } from '../interface/Common'
import { IRowElement } from '../interface/Row'
import { ITd } from '../interface/table/Td'
import { ITr } from '../interface/table/Tr'
@@ -1169,3 +1177,10 @@ export function getTextFromElementList(elementList: IElement[]) {
}
return buildText(zipElementList(elementList))
}
export function getSlimCloneElementList(elementList: IElement[]) {
return deepCloneOmitKeys<IElement[], IRowElement>(elementList, [
'metrics',
'style'
])
}