From 360fe73b2910967f425d0b7643d5af09187085f6 Mon Sep 17 00:00:00 2001 From: Hufe921 Date: Mon, 3 Oct 2022 16:41:48 +0800 Subject: [PATCH] feat:get value add header data --- src/editor/core/draw/Draw.ts | 3 ++- src/editor/interface/Editor.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/editor/core/draw/Draw.ts b/src/editor/core/draw/Draw.ts index 3a511a5..1db601e 100644 --- a/src/editor/core/draw/Draw.ts +++ b/src/editor/core/draw/Draw.ts @@ -494,7 +494,7 @@ export class Draw { public getValue(): IEditorResult { // 配置 - const { width, height, margins, watermark } = this.options + const { width, height, margins, watermark, header } = this.options // 数据 const data = zipElementList(this.elementList) return { @@ -502,6 +502,7 @@ export class Draw { width, height, margins, + header: header.data ? header : undefined, watermark: watermark.data ? watermark : undefined, data } diff --git a/src/editor/interface/Editor.ts b/src/editor/interface/Editor.ts index 5492618..bba5fc4 100644 --- a/src/editor/interface/Editor.ts +++ b/src/editor/interface/Editor.ts @@ -51,6 +51,7 @@ export interface IEditorResult { width: number; height: number; margins: IMargin; + header?: IHeader; watermark?: IWatermark; data: IElement[]; } \ No newline at end of file