feat:add control interface

This commit is contained in:
黄云飞
2022-03-29 18:12:14 +08:00
parent fdb9295488
commit 6b1336fc1a
7 changed files with 32 additions and 1 deletions
+3
View File
@@ -0,0 +1,3 @@
export class Control {
}
@@ -0,0 +1,3 @@
export class SelectControl {
}
@@ -0,0 +1,3 @@
export class TextControl {
}
+4
View File
@@ -0,0 +1,4 @@
export enum ControlType {
TEXT = 'text',
SELECT = 'select'
}
+2 -1
View File
@@ -6,5 +6,6 @@ export enum ElementType {
SUPERSCRIPT = 'superscript',
SUBSCRIPT = 'subscript',
SEPARATOR = 'separator',
PAGE_BREAK = 'pageBreak'
PAGE_BREAK = 'pageBreak',
CONTROL = 'control'
}
+15
View File
@@ -0,0 +1,15 @@
import { ControlType } from '../dataset/enum/Control'
export interface IValueSet {
value: string;
code: string;
}
export interface IControl {
type: ControlType;
value: string;
conceptId: string;
prefix?: string;
postfix?: string;
valueSets?: IValueSet[]
}
+2
View File
@@ -1,5 +1,6 @@
import { ElementType } from '../dataset/enum/Element'
import { RowFlex } from '../dataset/enum/Row'
import { IControl } from './Control'
import { IColgroup } from './table/Colgroup'
import { ITr } from './table/Tr'
@@ -57,6 +58,7 @@ export type IElement = IElementBasic
& IHyperlinkElement
& ISuperscriptSubscript
& ISeparator
& { control?: IControl }
export interface IElementMetrics {
width: number;