From 9abfac8bbe48c84cb918f2eefcf4f1c901cc6540 Mon Sep 17 00:00:00 2001 From: xueyuan Date: Fri, 10 Apr 2026 11:58:32 +0800 Subject: [PATCH] fix(types): use Partial for TextIcon style The TextIcon.style field was typed as ITextAttribute which: 1. Did not include fill and other graphic attributes from IGraphicAttribute 2. Required all properties to be specified (none were optional) Change to Partial which extends both IGraphicAttribute and ITextAttribute with all properties optional, allowing partial style definitions with fill support. Closes #3967 --- packages/vtable/src/ts-types/icon.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/vtable/src/ts-types/icon.ts b/packages/vtable/src/ts-types/icon.ts index 571e3f3cb..29033baf9 100644 --- a/packages/vtable/src/ts-types/icon.ts +++ b/packages/vtable/src/ts-types/icon.ts @@ -1,6 +1,6 @@ // ****** Icon配置信息,header ,以及列Icon *******9 -import type { ITextAttribute } from '@src/vrender'; +import type { ITextAttribute, ITextGraphicAttribute } from '@src/vrender'; import type { Placement } from './table-engine'; export interface IIconBase { @@ -79,7 +79,11 @@ export interface IIconBase { export interface TextIcon extends IIconBase { type: 'text'; content: string; - style?: ITextAttribute; + /** + * 文字图标的样式,支持 fill、fontSize、underline 等文字及图形属性 + * 使用 Partial 以允许只配置需要的属性 + */ + style?: Partial; } export interface ImageIcon extends IIconBase { type: 'image';