feat:Text add truncateAt

This commit is contained in:
pengfei.zhou
2020-04-27 18:46:39 +08:00
committed by osborn
parent a23aa8df0f
commit fdff5af3d9
11 changed files with 118 additions and 2 deletions

View File

@@ -18,6 +18,13 @@ import { Color } from "../util/color"
import { Gravity } from "../util/gravity"
import { layoutConfig } from "../util/layoutconfig"
export enum TruncateAt {
End = 0,
Middle = 1,
Start = 2,
Clip = 3,
}
export class Text extends View {
@Property
text?: string
@@ -57,6 +64,9 @@ export class Text extends View {
@Property
htmlText?: string
@Property
truncateAt?: TruncateAt
}
export function text(config: Partial<Text>) {