fix: wake up pop-up controls #580

This commit is contained in:
Hufe921
2024-05-18 17:21:01 +08:00
parent 24aa33a4f1
commit 28f6bdbb41
6 changed files with 81 additions and 14 deletions
+8 -4
View File
@@ -1,6 +1,7 @@
import { ControlType, ControlIndentation } from '../dataset/enum/Control'
import { EditorZone } from '../dataset/enum/Editor'
import { ICheckbox } from './Checkbox'
import { IDrawOption } from './Draw'
import { IElement } from './Element'
import { IRadio } from './Radio'
import { IRange } from './Range'
@@ -97,18 +98,15 @@ export interface IControlInitResult {
}
export interface IControlInstance {
setElement(element: IElement): void
getElement(): IElement
getValue(): IElement[]
setValue(
data: IElement[],
context?: IControlContext,
options?: IControlRuleOption
): number
keydown(evt: KeyboardEvent): number | null
cut(): number
}
@@ -119,6 +117,7 @@ export interface IControlContext {
export interface IControlRuleOption {
isIgnoreDisabledRule?: boolean // 忽略禁用校验规则
isAddPlaceholder?: boolean // 是否添加占位符
}
export interface IGetControlValueOption {
@@ -147,3 +146,8 @@ export type ISetControlProperties = {
conceptId: string
properties: Partial<Omit<IControl, 'value'>>
}
export type IRepaintControlOption = Pick<
IDrawOption,
'curIndex' | 'isCompute' | 'isSubmitHistory'
>