feat: add list element

This commit is contained in:
Hufe921
2023-04-20 20:17:34 +08:00
committed by Hufe
parent 8202c1c67b
commit c2330a8c11
28 changed files with 538 additions and 125 deletions
+9
View File
@@ -1,5 +1,6 @@
import { ControlComponent, ImageDisplay } from '../dataset/enum/Control'
import { ElementType } from '../dataset/enum/Element'
import { ListStyle, ListType } from '../dataset/enum/List'
import { RowFlex } from '../dataset/enum/Row'
import { TitleLevel } from '../dataset/enum/Title'
import { TableBorder } from '../dataset/enum/table/Table'
@@ -37,6 +38,13 @@ export interface ITitleElement {
titleId?: string;
}
export interface IListElement {
valueList?: IElement[];
listType?: ListType;
listStyle?: ListStyle;
listId?: string;
}
export interface ITableAttr {
colgroup?: IColgroup[];
trList?: ITr[];
@@ -105,6 +113,7 @@ export type IElement = IElementBasic
& IImageElement
& IBlockElement
& ITitleElement
& IListElement
export interface IElementMetrics {
width: number;
+3 -1
View File
@@ -1,4 +1,4 @@
import { EditorZone, ElementType, PageMode, TitleLevel } from '..'
import { EditorZone, ElementType, ListStyle, ListType, PageMode, TitleLevel } from '..'
import { RowFlex } from '../dataset/enum/Row'
import { IControl } from './Control'
import { IEditorResult } from './Editor'
@@ -20,6 +20,8 @@ export interface IRangeStyle {
rowMargin: number;
dashArray: number[];
level: TitleLevel | null;
listType: ListType | null;
listStyle: ListStyle | null;
}
export type IRangeStyleChange = (payload: IRangeStyle) => void
+3
View File
@@ -13,5 +13,8 @@ export interface IRow {
rowFlex?: RowFlex;
startIndex: number;
isPageBreak?: boolean;
isList?: boolean;
listIndex?: number;
offsetX?: number;
elementList: IRowElement[];
}