diff --git a/docs/en/guide/command-execute.md b/docs/en/guide/command-execute.md index 9fd2cb7..3d68b16 100644 --- a/docs/en/guide/command-execute.md +++ b/docs/en/guide/command-execute.md @@ -831,5 +831,5 @@ Feature: Set control value Usage: ```javascript -instance.command.executeSetControlValue(payload: ISetControlOption) +instance.command.executeSetControlValue(payload: ISetControlValueOption) ``` diff --git a/docs/guide/command-execute.md b/docs/guide/command-execute.md index b1c54f8..7c70077 100644 --- a/docs/guide/command-execute.md +++ b/docs/guide/command-execute.md @@ -831,5 +831,5 @@ instance.command.executeLocationGroup(groupId: string) 用法: ```javascript -instance.command.executeSetControlValue(payload: ISetControlOption) +instance.command.executeSetControlValue(payload: ISetControlValueOption) ``` diff --git a/src/editor/core/command/CommandAdapt.ts b/src/editor/core/command/CommandAdapt.ts index eb11d59..a05cac3 100644 --- a/src/editor/core/command/CommandAdapt.ts +++ b/src/editor/core/command/CommandAdapt.ts @@ -21,7 +21,7 @@ import { DeepRequired } from '../../interface/Common' import { IGetControlValueOption, IGetControlValueResult, - ISetControlOption + ISetControlValueOption } from '../../interface/Control' import { IAppendElementListOption, @@ -2077,7 +2077,7 @@ export class CommandAdapt { return this.draw.getControl().getValueByConceptId(payload) } - public setControlValue(payload: ISetControlOption) { + public setControlValue(payload: ISetControlValueOption) { const isReadonly = this.draw.isReadonly() if (isReadonly) return this.draw.getControl().setValueByConceptId(payload) diff --git a/src/editor/core/draw/control/Control.ts b/src/editor/core/draw/control/Control.ts index f808725..7faef9b 100644 --- a/src/editor/core/draw/control/Control.ts +++ b/src/editor/core/draw/control/Control.ts @@ -8,7 +8,7 @@ import { IControlOption, IGetControlValueOption, IGetControlValueResult, - ISetControlOption + ISetControlValueOption } from '../../../interface/Control' import { IEditorData } from '../../../interface/Editor' import { IElement, IElementPosition } from '../../../interface/Element' @@ -463,7 +463,7 @@ export class Control { return result } - public setValueByConceptId(payload: ISetControlOption) { + public setValueByConceptId(payload: ISetControlValueOption) { const isReadonly = this.draw.isReadonly() if (isReadonly) return let isExistSet = false diff --git a/src/editor/interface/Control.ts b/src/editor/interface/Control.ts index 35fd59e..75fb80c 100644 --- a/src/editor/interface/Control.ts +++ b/src/editor/interface/Control.ts @@ -82,7 +82,7 @@ export type IGetControlValueResult = (Omit & { innerText: string | null })[] -export interface ISetControlOption { +export interface ISetControlValueOption { conceptId: string value: string }