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

@@ -1628,6 +1628,10 @@ var Text = /** @class */ (function (_super) {
Property,
__metadata$3("design:type", Number)
], Text.prototype, "maxHeight", void 0);
__decorate$3([
Property,
__metadata$3("design:type", Number)
], Text.prototype, "lineSpacing", void 0);
return Text;
}(View));
function text(config) {

View File

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

View File

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

2
doric-js/index.d.ts vendored
View File

@@ -474,6 +474,7 @@ declare module 'doric/lib/src/widget/text' {
font?: string;
maxWidth?: number;
maxHeight?: number;
lineSpacing?: number;
}
export class Text extends View implements IText {
text?: string;
@@ -485,6 +486,7 @@ declare module 'doric/lib/src/widget/text' {
font?: string;
maxWidth?: number;
maxHeight?: number;
lineSpacing?: number;
}
export function text(config: IText): Text;
}

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();

View File

@@ -28,6 +28,7 @@ export interface IText extends IView {
font?: string
maxWidth?: number
maxHeight?: number
lineSpacing?: number
}
export class Text extends View implements IText {
@@ -57,6 +58,9 @@ export class Text extends View implements IText {
@Property
maxHeight?: number
@Property
lineSpacing?: number
}
export function text(config: IText) {