feat:format control data

This commit is contained in:
黄云飞
2022-03-31 17:46:50 +08:00
parent 66319d5405
commit 666a880c4f
4 changed files with 91 additions and 3 deletions
+7 -2
View File
@@ -6,16 +6,21 @@ export interface IValueSet {
code: string;
}
export interface IControl {
export interface IControlSelect {
valueSets: IValueSet[];
}
export interface IControlBasic {
type: ControlType;
value: IElement[] | null;
placeholder: string;
conceptId?: string;
prefix?: string;
postfix?: string;
valueSets?: IValueSet[];
}
export type IControl = IControlBasic & Partial<IControlSelect>
export interface IControlOption {
placeholderColor?: string;
bracketColor?: string;
+8 -1
View File
@@ -1,3 +1,4 @@
import { ControlComponent } from '../dataset/enum/Control'
import { ElementType } from '../dataset/enum/Element'
import { RowFlex } from '../dataset/enum/Row'
import { IControl } from './Control'
@@ -52,13 +53,19 @@ export interface ISeparator {
dashArray?: number[];
}
export interface IControlElement {
control?: IControl;
controlId?: string;
controlComponent?: ControlComponent;
}
export type IElement = IElementBasic
& IElementStyle
& ITable
& IHyperlinkElement
& ISuperscriptSubscript
& ISeparator
& { control?: IControl }
& IControlElement
export interface IElementMetrics {
width: number;