feat: add set active zone api

pr675
Hufe921 2 years ago
parent 1455a2afb2
commit 6b30e3ca9d

@ -862,6 +862,16 @@ Usage:
instance.command.executeLocationGroup(groupId: string) instance.command.executeLocationGroup(groupId: string)
``` ```
## executeSetZone
Feature: Set active zone (header, main, footer)
Usage:
```javascript
instance.command.executeSetZone(zone: EditorZone)
```
## executeSetControlValue ## executeSetControlValue
Feature: Set control value Feature: Set control value

@ -862,6 +862,16 @@ instance.command.executeDeleteGroup(groupId: string)
instance.command.executeLocationGroup(groupId: string) instance.command.executeLocationGroup(groupId: string)
``` ```
## executeSetZone
功能:设置激活区域(页眉、正文、页脚)
用法:
```javascript
instance.command.executeSetZone(zone: EditorZone)
```
## executeSetControlValue ## executeSetControlValue
功能:设置控件值 功能:设置控件值

@ -85,6 +85,7 @@ export class Command {
public executeSetGroup: CommandAdapt['setGroup'] public executeSetGroup: CommandAdapt['setGroup']
public executeDeleteGroup: CommandAdapt['deleteGroup'] public executeDeleteGroup: CommandAdapt['deleteGroup']
public executeLocationGroup: CommandAdapt['locationGroup'] public executeLocationGroup: CommandAdapt['locationGroup']
public executeSetZone: CommandAdapt['setZone']
public executeSetControlValue: CommandAdapt['setControlValue'] public executeSetControlValue: CommandAdapt['setControlValue']
public executeSetControlExtension: CommandAdapt['setControlExtension'] public executeSetControlExtension: CommandAdapt['setControlExtension']
public getCatalog: CommandAdapt['getCatalog'] public getCatalog: CommandAdapt['getCatalog']
@ -198,6 +199,7 @@ export class Command {
this.executeSetGroup = adapt.setGroup.bind(adapt) this.executeSetGroup = adapt.setGroup.bind(adapt)
this.executeDeleteGroup = adapt.deleteGroup.bind(adapt) this.executeDeleteGroup = adapt.deleteGroup.bind(adapt)
this.executeLocationGroup = adapt.locationGroup.bind(adapt) this.executeLocationGroup = adapt.locationGroup.bind(adapt)
this.executeSetZone = adapt.setZone.bind(adapt)
// 获取 // 获取
this.getImage = adapt.getImage.bind(adapt) this.getImage = adapt.getImage.bind(adapt)
this.getOptions = adapt.getOptions.bind(adapt) this.getOptions = adapt.getOptions.bind(adapt)

@ -6,6 +6,7 @@ import { ControlComponent, ImageDisplay } from '../../dataset/enum/Control'
import { import {
EditorContext, EditorContext,
EditorMode, EditorMode,
EditorZone,
PageMode, PageMode,
PaperDirection PaperDirection
} from '../../dataset/enum/Editor' } from '../../dataset/enum/Editor'
@ -2174,6 +2175,10 @@ export class CommandAdapt {
}) })
} }
public setZone(zone: EditorZone) {
this.draw.getZone().setZone(zone)
}
public getControlValue( public getControlValue(
payload: IGetControlValueOption payload: IGetControlValueOption
): IGetControlValueResult | null { ): IGetControlValueResult | null {

Loading…
Cancel
Save