feat: add title element
This commit is contained in:
@@ -7,6 +7,7 @@ import { IFooter } from './Footer'
|
||||
import { IHeader } from './Header'
|
||||
import { IMargin } from './Margin'
|
||||
import { IPageNumber } from './PageNumber'
|
||||
import { ITitleOption } from './Title'
|
||||
import { IWatermark } from './Watermark'
|
||||
|
||||
export interface IEditorData {
|
||||
@@ -56,6 +57,7 @@ export interface IEditorOption {
|
||||
control?: IControlOption;
|
||||
checkbox?: ICheckboxOption;
|
||||
cursor?: ICursorOption;
|
||||
title?: ITitleOption;
|
||||
}
|
||||
|
||||
export interface IEditorResult {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { ControlComponent, ImageDisplay } from '../dataset/enum/Control'
|
||||
import { ElementType } from '../dataset/enum/Element'
|
||||
import { RowFlex } from '../dataset/enum/Row'
|
||||
import { TitleLevel } from '../dataset/enum/Title'
|
||||
import { TableBorder } from '../dataset/enum/table/Table'
|
||||
import { IBlock } from './Block'
|
||||
import { ICheckbox } from './Checkbox'
|
||||
@@ -30,6 +31,12 @@ export interface IElementStyle {
|
||||
letterSpacing?: number;
|
||||
}
|
||||
|
||||
export interface ITitleElement {
|
||||
valueList?: IElement[];
|
||||
level?: TitleLevel;
|
||||
titleId?: string;
|
||||
}
|
||||
|
||||
export interface ITableAttr {
|
||||
colgroup?: IColgroup[];
|
||||
trList?: ITr[];
|
||||
@@ -97,6 +104,7 @@ export type IElement = IElementBasic
|
||||
& IDateElement
|
||||
& IImageElement
|
||||
& IBlockElement
|
||||
& ITitleElement
|
||||
|
||||
export interface IElementMetrics {
|
||||
width: number;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { EditorZone, ElementType, PageMode } from '..'
|
||||
import { EditorZone, ElementType, PageMode, TitleLevel } from '..'
|
||||
import { RowFlex } from '../dataset/enum/Row'
|
||||
import { IControl } from './Control'
|
||||
import { IEditorResult } from './Editor'
|
||||
@@ -19,6 +19,7 @@ export interface IRangeStyle {
|
||||
rowFlex: RowFlex | null;
|
||||
rowMargin: number;
|
||||
dashArray: number[];
|
||||
level: TitleLevel | null;
|
||||
}
|
||||
|
||||
export type IRangeStyleChange = (payload: IRangeStyle) => void
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
export interface ITitleSizeOption {
|
||||
defaultFirstSize?: number;
|
||||
defaultSecondSize?: number;
|
||||
defaultThirdSize?: number;
|
||||
defaultFourthSize?: number;
|
||||
defaultFifthSize?: number;
|
||||
defaultSixthSize?: number;
|
||||
}
|
||||
|
||||
export type ITitleOption = ITitleSizeOption & {}
|
||||
Reference in New Issue
Block a user