Skip to content

Commit 6a69ff1

Browse files
authored
Merge pull request #5104 from william-xue/fix/3967-text-icon-style-type
fix(types): use Partial<ITextGraphicAttribute> for TextIcon style
2 parents 29785a0 + 9abfac8 commit 6a69ff1

File tree

1 file changed

+6
-2
lines changed
  • packages/vtable/src/ts-types

1 file changed

+6
-2
lines changed

packages/vtable/src/ts-types/icon.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ****** Icon配置信息,header ,以及列Icon *******9
22

3-
import type { ITextAttribute } from '@src/vrender';
3+
import type { ITextAttribute, ITextGraphicAttribute } from '@src/vrender';
44
import type { Placement } from './table-engine';
55

66
export interface IIconBase {
@@ -79,7 +79,11 @@ export interface IIconBase {
7979
export interface TextIcon extends IIconBase {
8080
type: 'text';
8181
content: string;
82-
style?: ITextAttribute;
82+
/**
83+
* 文字图标的样式,支持 fill、fontSize、underline 等文字及图形属性
84+
* 使用 Partial 以允许只配置需要的属性
85+
*/
86+
style?: Partial<ITextGraphicAttribute>;
8387
}
8488
export interface ImageIcon extends IIconBase {
8589
type: 'image';

0 commit comments

Comments
 (0)