diff --git a/src/label/labelStyle.ts b/src/label/labelStyle.ts index cd5f8c4a69..3d6740a372 100644 --- a/src/label/labelStyle.ts +++ b/src/label/labelStyle.ts @@ -460,7 +460,7 @@ const TEXT_PROPS_WITH_GLOBAL = [ 'textShadowColor', 'textShadowBlur', 'textShadowOffsetX', 'textShadowOffsetY' ] as const; const TEXT_PROPS_SELF = [ - 'align', 'lineHeight', 'width', 'height', 'tag', 'verticalAlign' + 'align', 'lineHeight', 'width', 'height', 'tag', 'verticalAlign', 'ellipsis' ] as const; const TEXT_PROPS_BOX = [ 'padding', 'borderWidth', 'borderRadius', 'borderDashOffset', diff --git a/src/util/types.ts b/src/util/types.ts index 6f135e83a1..4459570436 100644 --- a/src/util/types.ts +++ b/src/util/types.ts @@ -1056,6 +1056,8 @@ export interface LabelOption extends TextCommonOption { minMargin?: number overflow?: TextStyleProps['overflow'] + ellipsis?: TextStyleProps['ellipsis'] + silent?: boolean precision?: number | 'auto' valueAnimation?: boolean diff --git a/test/label-ellipsis.html b/test/label-ellipsis.html new file mode 100644 index 0000000000..04b3b15dad --- /dev/null +++ b/test/label-ellipsis.html @@ -0,0 +1,110 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +