docs: improve editor options

pr675
Hufe921 3 years ago
parent 3cba30bcf9
commit 51d4a036a0

@ -10,7 +10,7 @@ instance.register.contextMenuList([
{
isDivider?: boolean;
icon?: string;
name?: string;
name?: string; // 使用%s代表选区文本。示例搜索%s
shortCut?: string;
when?: (payload: IContextMenuContext) => boolean;
callback?: (command: Command, context: IContextMenuContext) => any;

@ -55,4 +55,48 @@ interface IEditorOption {
checkbox?: ICheckboxOption; // 复选框信息。{width?:number; height?:number; gap?:number; lineWidth?:number; fillStyle?:string; fontStyle?: string;}
cursor?: ICursorOption; // 光标样式。{width?: number; color?: string; dragWidth?: number; dragColor?: string;}
}
```
## 页眉配置
```typescript
interface IHeader {
top?: number; // 距离页面顶部大小。默认30
maxHeightRadio?: MaxHeightRatio; // 占页面最大高度比。默认HALF
}
```
## 页脚配置
```typescript
interface IFooter {
bottom?: number; // 距离页面底部大小。默认30
maxHeightRadio?: MaxHeightRatio; // 占页面最大高度比。默认HALF
}
```
## 页码配置
```typescript
interface IPageNumber {
bottom?: number; // 距离页面底部大小。默认60
size?: number; // 字体大小。默认12
font?: string; // 字体。默认Yahei
color?: string; // 字体颜色。默认:#000000
rowFlex?: RowFlex; // 行对齐方式。默认CENTER
format?: string; // 页码格式。默认:{pageNo}。示例:第{pageNo}页/共{pageCount}页
numberType?: NumberType; // 数字类型。默认ARABIC
}
```
## 水印配置
```typescript
interface IWatermark {
data: string; // 文本。
color?: string; // 颜色。默认:#AEB5C0
opacity?: number; // 透明度。默认0.3
size?: number; // 字体大小。默认200
font?: string; // 字体。默认Yahei
}
```
Loading…
Cancel
Save