feat: add radio element #494
Co-authored-by: jeffycai <caixiaobing@live.cn> Co-authored-by: Hufe921 <huangyunfeihufe@hotmail.com>
This commit is contained in:
co-authored by
jeffycai
Hufe921
parent
2e1403507f
commit
c6d9cffc27
@@ -10,5 +10,5 @@ export interface ICheckboxOption {
|
||||
gap?: number
|
||||
lineWidth?: number
|
||||
fillStyle?: string
|
||||
fontStyle?: string
|
||||
strokeStyle?: string
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ import { ControlType, ControlIndentation } from '../dataset/enum/Control'
|
||||
import { EditorZone } from '../dataset/enum/Editor'
|
||||
import { ICheckbox } from './Checkbox'
|
||||
import { IElement } from './Element'
|
||||
import { IRadio } from './Radio'
|
||||
import { IRange } from './Range'
|
||||
|
||||
export interface IValueSet {
|
||||
@@ -22,6 +23,12 @@ export interface IControlCheckbox {
|
||||
checkbox?: ICheckbox
|
||||
}
|
||||
|
||||
export interface IControlRadio {
|
||||
code: string | null
|
||||
valueSets: IValueSet[]
|
||||
radio?: IRadio
|
||||
}
|
||||
|
||||
export interface IControlHighlightRule {
|
||||
keyword: string
|
||||
alpha?: number
|
||||
@@ -65,6 +72,7 @@ export type IControl = IControlBasic &
|
||||
IControlRule &
|
||||
Partial<IControlSelect> &
|
||||
Partial<IControlCheckbox> &
|
||||
Partial<IControlRadio> &
|
||||
Partial<IControlStyle>
|
||||
|
||||
export interface IControlOption {
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
} from '../dataset/enum/Editor'
|
||||
import { IBackgroundOption } from './Background'
|
||||
import { ICheckboxOption } from './Checkbox'
|
||||
import { IRadioOption } from './Radio'
|
||||
import { IPadding } from './Common'
|
||||
import { IControlOption } from './Control'
|
||||
import { ICursorOption } from './Cursor'
|
||||
@@ -77,6 +78,7 @@ export interface IEditorOption {
|
||||
watermark?: IWatermark
|
||||
control?: IControlOption
|
||||
checkbox?: ICheckboxOption
|
||||
radio?: IRadioOption
|
||||
cursor?: ICursorOption
|
||||
title?: ITitleOption
|
||||
placeholder?: IPlaceholder
|
||||
|
||||
@@ -8,6 +8,7 @@ import { TableBorder } from '../dataset/enum/table/Table'
|
||||
import { IBlock } from './Block'
|
||||
import { ICheckbox } from './Checkbox'
|
||||
import { IControl } from './Control'
|
||||
import { IRadio } from './Radio'
|
||||
import { ITextDecoration } from './Text'
|
||||
import { IColgroup } from './table/Colgroup'
|
||||
import { ITr } from './table/Tr'
|
||||
@@ -94,6 +95,10 @@ export interface ICheckboxElement {
|
||||
checkbox?: ICheckbox
|
||||
}
|
||||
|
||||
export interface IRadioElement {
|
||||
radio?: IRadio
|
||||
}
|
||||
|
||||
export interface ILaTexElement {
|
||||
laTexSVG?: string
|
||||
}
|
||||
@@ -124,6 +129,7 @@ export type IElement = IElementBasic &
|
||||
ISeparator &
|
||||
IControlElement &
|
||||
ICheckboxElement &
|
||||
IRadioElement &
|
||||
ILaTexElement &
|
||||
IDateElement &
|
||||
IImageElement &
|
||||
|
||||
@@ -9,6 +9,7 @@ export interface ICurrentPosition {
|
||||
x?: number
|
||||
y?: number
|
||||
isCheckbox?: boolean
|
||||
isRadio?: boolean
|
||||
isControl?: boolean
|
||||
isImage?: boolean
|
||||
isTable?: boolean
|
||||
@@ -41,6 +42,7 @@ export type IGetFloatPositionByXYPayload = IGetPositionByXYPayload & {
|
||||
export interface IPositionContext {
|
||||
isTable: boolean
|
||||
isCheckbox?: boolean
|
||||
isRadio?: boolean
|
||||
isControl?: boolean
|
||||
index?: number
|
||||
trIndex?: number
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
export interface IRadio {
|
||||
value: boolean | null
|
||||
code?: string
|
||||
disabled?: boolean
|
||||
}
|
||||
|
||||
export interface IRadioOption {
|
||||
width?: number
|
||||
height?: number
|
||||
gap?: number
|
||||
lineWidth?: number
|
||||
fillStyle?: string
|
||||
strokeStyle?: string
|
||||
}
|
||||
Reference in New Issue
Block a user