From ea2145da6940be88b4475360805ef0ba0e5c9bb8 Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Tue, 16 Jul 2019 16:51:52 +0800 Subject: [PATCH] add GroupView --- js-framework/view/view.ts | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/js-framework/view/view.ts b/js-framework/view/view.ts index 17d9258d..c390f6fd 100644 --- a/js-framework/view/view.ts +++ b/js-framework/view/view.ts @@ -83,6 +83,7 @@ export abstract class View implements IWatcher, Modeling { } export class Group extends View { + @Property children: View[] = [] add(v: View) { @@ -90,14 +91,37 @@ export class Group extends View { } } -export class Text extends View { +export class Stack extends Group { } -export class Image extends View { +export class VLayout extends Group { } +export class HLayout extends Group { + +} + +export class Text extends View { + @Property + text?: string + + @Property + textColor?: Color + + @Property + textSize?: number + + @Property + maxLines?: number +} + +export class Image extends View { + @Property + imageUrl?: string +} + export class List extends View { }