feat:add Text lineSpacing

This commit is contained in:
pengfei.zhou
2020-03-24 11:06:30 +08:00
committed by osborn
parent a25aedcc6f
commit 0cfbef67a2
12 changed files with 75 additions and 5 deletions

View File

@@ -11,6 +11,7 @@ export interface IText extends IView {
font?: string;
maxWidth?: number;
maxHeight?: number;
lineSpacing?: number;
}
export declare class Text extends View implements IText {
text?: string;
@@ -22,5 +23,6 @@ export declare class Text extends View implements IText {
font?: string;
maxWidth?: number;
maxHeight?: number;
lineSpacing?: number;
}
export declare function text(config: IText): Text;

View File

@@ -64,6 +64,10 @@ __decorate([
Property,
__metadata("design:type", Number)
], Text.prototype, "maxHeight", void 0);
__decorate([
Property,
__metadata("design:type", Number)
], Text.prototype, "lineSpacing", void 0);
export function text(config) {
const ret = new Text;
ret.layoutConfig = layoutConfig().fit();