feat:data persistent format

This commit is contained in:
黄云飞
2021-12-30 15:01:59 +08:00
parent 8a4688cfd1
commit c13404738b
3 changed files with 26 additions and 5 deletions
+10
View File
@@ -1,3 +1,5 @@
import { IElement } from ".."
export interface IEditorOption {
defaultType?: string;
defaultFont?: string;
@@ -27,4 +29,12 @@ export interface IEditorOption {
tdPadding?: number;
defaultTdHeight?: number;
defaultHyperlinkColor?: string;
}
export interface IEditorResult {
version: string;
width: number;
height: number;
margins: [top: number, right: number, bootom: number, left: number];
data: IElement[];
}
+3 -3
View File
@@ -1,5 +1,5 @@
import { IElement } from ".."
import { RowFlex } from "../dataset/enum/Row"
import { IEditorResult } from "./Editor"
export interface IRangeStype {
undo: boolean;
@@ -13,7 +13,7 @@ export interface IRangeStype {
color: string | null;
highlight: string | null;
rowFlex: RowFlex | null;
rowMargin: number
rowMargin: number;
}
export type IRangeStyleChange = (payload: IRangeStype) => void
@@ -26,4 +26,4 @@ export type IPageSizeChange = (payload: number) => void
export type IPageScaleChange = (payload: number) => void
export type ISaved = (payload: IElement[]) => void
export type ISaved = (payload: IEditorResult) => void