feat:render header element

This commit is contained in:
Hufe921
2023-03-16 21:31:23 +08:00
parent 8eee356787
commit da2dfd3a16
11 changed files with 150 additions and 46 deletions
+9 -2
View File
@@ -7,6 +7,14 @@ import { IHeader } from './Header'
import { IMargin } from './Margin'
import { IWatermark } from './Watermark'
export interface IEditorDrawData {
header?: IElement[];
main: IElement[];
footer?: IElement[];
}
export type IEditorData = IEditorDrawData | IElement[]
export interface IEditorOption {
mode?: EditorMode;
defaultType?: string;
@@ -54,7 +62,6 @@ export interface IEditorResult {
width: number;
height: number;
margins: IMargin;
header?: IHeader;
watermark?: IWatermark;
data: IElement[];
data: IEditorData;
}
+4 -4
View File
@@ -1,6 +1,6 @@
import { HeaderMaxHeightRatio } from '../dataset/enum/Header'
export interface IHeader {
data: string;
color?: string;
size?: number;
font?: string;
top?: number;
maxHeightRadio?: HeaderMaxHeightRatio;
}