|
|
|
|
@ -5,7 +5,7 @@
|
|
|
|
|
```javascript
|
|
|
|
|
import Editor from "@hufe921/canvas-editor"
|
|
|
|
|
|
|
|
|
|
new Editor(container, [], {
|
|
|
|
|
new Editor(container, IEditorData | IElement[], {
|
|
|
|
|
// 配置项
|
|
|
|
|
})
|
|
|
|
|
```
|
|
|
|
|
@ -49,6 +49,7 @@ interface IEditorOption {
|
|
|
|
|
headerTop?: number; // 页眉距离上边距。默认:50
|
|
|
|
|
header?: IHeader; // 页眉信息。{data:string; color?:string; size?:number; font?:string;}
|
|
|
|
|
paperDirection?: PaperDirection; // 纸张方向:纵向、横向
|
|
|
|
|
inactiveAlpha?: number; // 正文内容失焦时透明度。默认值:0.6
|
|
|
|
|
watermark?: IWatermark; // 水印信息。{data:string; color?:string; opacity?:number; size?:number; font?:string;}
|
|
|
|
|
control?: IControlOption; // 控件信息。 {placeholderColor?:string; bracketColor?:string; prefix?:string; postfix?:string;}
|
|
|
|
|
checkbox?: ICheckboxOption; // 复选框信息。{width?:number; height?:number; gap?:number; lineWidth?:number; fillStyle?:string; fontStyle?: string;}
|
|
|
|
|
|