Text add fontStype property

This commit is contained in:
pengfei.zhou
2020-01-14 19:50:32 +08:00
committed by osborn
parent e8a5c796bd
commit c92435f1e0
13 changed files with 133 additions and 1 deletions

View File

@@ -99,6 +99,7 @@ export class Gravity implements Modeling {
static Top = Gravity.origin.top()
static Bottom = Gravity.origin.bottom()
}
export function gravity() {
return new Gravity
}

View File

@@ -24,6 +24,7 @@ export interface IText extends IView {
textSize?: number
maxLines?: number
textAlignment?: Gravity
fontStyle?: "normal" | "bold" | "italic" | "bold_italic"
}
export class Text extends View implements IText {
@@ -41,6 +42,9 @@ export class Text extends View implements IText {
@Property
textAlignment?: Gravity
@Property
fontStyle?: "normal" | "bold" | "italic" | "bold_italic"
}
export function text(config: IText) {