feat:add control interface

pr675
黄云飞 4 years ago
parent fdb9295488
commit 6b1336fc1a

@ -0,0 +1,3 @@
export class Control {
}

@ -0,0 +1,3 @@
export class SelectControl {
}

@ -0,0 +1,3 @@
export class TextControl {
}

@ -0,0 +1,4 @@
export enum ControlType {
TEXT = 'text',
SELECT = 'select'
}

@ -6,5 +6,6 @@ export enum ElementType {
SUPERSCRIPT = 'superscript',
SUBSCRIPT = 'subscript',
SEPARATOR = 'separator',
PAGE_BREAK = 'pageBreak'
PAGE_BREAK = 'pageBreak',
CONTROL = 'control'
}

@ -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[]
}

@ -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;

Loading…
Cancel
Save