feat:add maxWidth and maxHeight for text

This commit is contained in:
pengfei.zhou
2020-03-23 16:23:41 +08:00
committed by osborn
parent 7f16aa23ae
commit fe33a18213
11 changed files with 89 additions and 2 deletions

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

@@ -472,6 +472,8 @@ declare module 'doric/lib/src/widget/text' {
textAlignment?: Gravity;
fontStyle?: "normal" | "bold" | "italic" | "bold_italic";
font?: string;
maxWidth?: number;
maxHeight?: number;
}
export class Text extends View implements IText {
text?: string;
@@ -481,6 +483,8 @@ declare module 'doric/lib/src/widget/text' {
textAlignment?: Gravity;
fontStyle?: "normal" | "bold" | "italic" | "bold_italic";
font?: string;
maxWidth?: number;
maxHeight?: number;
}
export function text(config: IText): Text;
}