feat: add set active zone api
This commit is contained in:
@@ -862,6 +862,16 @@ Usage:
|
||||
instance.command.executeLocationGroup(groupId: string)
|
||||
```
|
||||
|
||||
## executeSetZone
|
||||
|
||||
Feature: Set active zone (header, main, footer)
|
||||
|
||||
Usage:
|
||||
|
||||
```javascript
|
||||
instance.command.executeSetZone(zone: EditorZone)
|
||||
```
|
||||
|
||||
## executeSetControlValue
|
||||
|
||||
Feature: Set control value
|
||||
|
||||
@@ -862,6 +862,16 @@ instance.command.executeDeleteGroup(groupId: string)
|
||||
instance.command.executeLocationGroup(groupId: string)
|
||||
```
|
||||
|
||||
## executeSetZone
|
||||
|
||||
功能:设置激活区域(页眉、正文、页脚)
|
||||
|
||||
用法:
|
||||
|
||||
```javascript
|
||||
instance.command.executeSetZone(zone: EditorZone)
|
||||
```
|
||||
|
||||
## executeSetControlValue
|
||||
|
||||
功能:设置控件值
|
||||
|
||||
@@ -85,6 +85,7 @@ export class Command {
|
||||
public executeSetGroup: CommandAdapt['setGroup']
|
||||
public executeDeleteGroup: CommandAdapt['deleteGroup']
|
||||
public executeLocationGroup: CommandAdapt['locationGroup']
|
||||
public executeSetZone: CommandAdapt['setZone']
|
||||
public executeSetControlValue: CommandAdapt['setControlValue']
|
||||
public executeSetControlExtension: CommandAdapt['setControlExtension']
|
||||
public getCatalog: CommandAdapt['getCatalog']
|
||||
@@ -198,6 +199,7 @@ export class Command {
|
||||
this.executeSetGroup = adapt.setGroup.bind(adapt)
|
||||
this.executeDeleteGroup = adapt.deleteGroup.bind(adapt)
|
||||
this.executeLocationGroup = adapt.locationGroup.bind(adapt)
|
||||
this.executeSetZone = adapt.setZone.bind(adapt)
|
||||
// 获取
|
||||
this.getImage = adapt.getImage.bind(adapt)
|
||||
this.getOptions = adapt.getOptions.bind(adapt)
|
||||
|
||||
@@ -6,6 +6,7 @@ import { ControlComponent, ImageDisplay } from '../../dataset/enum/Control'
|
||||
import {
|
||||
EditorContext,
|
||||
EditorMode,
|
||||
EditorZone,
|
||||
PageMode,
|
||||
PaperDirection
|
||||
} from '../../dataset/enum/Editor'
|
||||
@@ -2174,6 +2175,10 @@ export class CommandAdapt {
|
||||
})
|
||||
}
|
||||
|
||||
public setZone(zone: EditorZone) {
|
||||
this.draw.getZone().setZone(zone)
|
||||
}
|
||||
|
||||
public getControlValue(
|
||||
payload: IGetControlValueOption
|
||||
): IGetControlValueResult | null {
|
||||
|
||||
Reference in New Issue
Block a user