This commit is contained in:
iqudoo
2026-06-12 20:58:51 +08:00
parent c9a187bf9b
commit 239e2eeebd
9 changed files with 499 additions and 340 deletions

View File

@@ -71,6 +71,10 @@ export interface TemplateElement {
textColor?: string;
/** 内边距 (mm),所有元素类型均有效 */
padding?: number;
paddingTop?: number;
paddingRight?: number;
paddingBottom?: number;
paddingLeft?: number;
locked?: boolean;
/** 图片缩放方式,仅 type=image 时有效 */
imageFit?: 'contain' | 'cover' | 'fill';
@@ -78,10 +82,18 @@ export interface TemplateElement {
textFormat?: TextFormat;
/** 数值/百分比/货币的小数位数,默认 2 */
decimalPlaces?: number;
/** 边框宽度 (mm)0 为无边框 */
/** 边框宽度 (mm)0 为无边框;各边留空时沿用此值 */
borderWidth?: number;
borderColor?: string;
/** 指定哪些边显示边框,默认四边 */
borderWidthTop?: number;
borderWidthRight?: number;
borderWidthBottom?: number;
borderWidthLeft?: number;
borderColorTop?: string;
borderColorRight?: string;
borderColorBottom?: string;
borderColorLeft?: string;
/** @deprecated 使用各边 borderWidth*0 为不显示) */
borderSides?: Partial<Record<ElementSide, boolean>>;
/** 圆角半径 (mm),可被各角覆盖 */
borderRadius?: number;