feat: add options to the getValue api

This commit is contained in:
Hufe921
2024-06-06 20:51:46 +08:00
parent 53701fc46c
commit 65acd580d6
4 changed files with 9 additions and 26 deletions
+2 -8
View File
@@ -998,9 +998,6 @@ export class Draw {
}
public getValue(options: IGetValueOption = {}): IEditorResult {
// 配置
const { width, height, margins, watermark } = this.options
// 数据
const { pageNo } = options
let mainElementList = this.elementList
if (
@@ -1019,11 +1016,8 @@ export class Draw {
}
return {
version,
width,
height,
margins,
watermark: watermark.data ? watermark : undefined,
data
data,
options: deepClone(this.options)
}
}
+1 -4
View File
@@ -91,11 +91,8 @@ export interface IEditorOption {
export interface IEditorResult {
version: string
width: number
height: number
margins: IMargin
watermark?: IWatermark
data: IEditorData
options: IEditorOption
}
export interface IEditorHTML {