feat: add getContainer api
This commit is contained in:
@@ -191,3 +191,13 @@ const {
|
||||
innerText: string | null
|
||||
} = await instance.command.getControlValue(payload: IGetControlValueOption)
|
||||
```
|
||||
|
||||
## getContainer
|
||||
|
||||
Feature: Get editor container
|
||||
|
||||
Usage:
|
||||
|
||||
```javascript
|
||||
const container = await instance.command.getContainer()
|
||||
```
|
||||
|
||||
@@ -191,3 +191,13 @@ const {
|
||||
innerText: string | null
|
||||
} = await instance.command.getControlValue(payload: IGetControlValueOption)
|
||||
```
|
||||
|
||||
## getContainer
|
||||
|
||||
功能:获取编辑器容器
|
||||
|
||||
用法:
|
||||
|
||||
```javascript
|
||||
const container = await instance.command.getContainer()
|
||||
```
|
||||
|
||||
@@ -99,6 +99,7 @@ export class Command {
|
||||
public getLocale: CommandAdapt['getLocale']
|
||||
public getGroupIds: CommandAdapt['getGroupIds']
|
||||
public getControlValue: CommandAdapt['getControlValue']
|
||||
public getContainer: CommandAdapt['getContainer']
|
||||
|
||||
constructor(adapt: CommandAdapt) {
|
||||
// 全局命令
|
||||
@@ -205,6 +206,7 @@ export class Command {
|
||||
this.getSearchNavigateInfo = adapt.getSearchNavigateInfo.bind(adapt)
|
||||
this.getLocale = adapt.getLocale.bind(adapt)
|
||||
this.getGroupIds = adapt.getGroupIds.bind(adapt)
|
||||
this.getContainer = adapt.getContainer.bind(adapt)
|
||||
// 控件
|
||||
this.executeSetControlValue = adapt.setControlValue.bind(adapt)
|
||||
this.getControlValue = adapt.getControlValue.bind(adapt)
|
||||
|
||||
@@ -2082,4 +2082,8 @@ export class CommandAdapt {
|
||||
if (isReadonly) return
|
||||
this.draw.getControl().setValueByConceptId(payload)
|
||||
}
|
||||
|
||||
public getContainer(): HTMLDivElement {
|
||||
return this.draw.getContainer()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user