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

@@ -7,6 +7,7 @@ export interface IText extends IView {
textSize?: number;
maxLines?: number;
textAlignment?: Gravity;
fontStyle?: "normal" | "bold" | "italic" | "bold_italic";
}
export declare class Text extends View implements IText {
text?: string;
@@ -14,5 +15,6 @@ export declare class Text extends View implements IText {
textSize?: number;
maxLines?: number;
textAlignment?: Gravity;
fontStyle?: "normal" | "bold" | "italic" | "bold_italic";
}
export declare function text(config: IText): Text;

View File

@@ -48,6 +48,10 @@ __decorate([
Property,
__metadata("design:type", Gravity)
], Text.prototype, "textAlignment", void 0);
__decorate([
Property,
__metadata("design:type", String)
], Text.prototype, "fontStyle", void 0);
export function text(config) {
const ret = new Text;
ret.layoutConfig = layoutConfig().fit();