From bf663e40dbd49bef77d6bb5bdcbdaad98aed2adb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Mon, 15 Mar 2021 15:56:35 +0800 Subject: [PATCH] simple demo layout config to just mode --- doric-demo/src/SimpleDemo.ts | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/doric-demo/src/SimpleDemo.ts b/doric-demo/src/SimpleDemo.ts index 3826614d..d8dbceec 100644 --- a/doric-demo/src/SimpleDemo.ts +++ b/doric-demo/src/SimpleDemo.ts @@ -8,65 +8,78 @@ class LayoutDemo extends Panel { stack([], { width: 100, height: 100, - backgroundColor: Color.RED + backgroundColor: Color.RED, + layoutConfig: layoutConfig().just() }), stack([], { width: 100, height: 100, - backgroundColor: Color.GREEN + backgroundColor: Color.GREEN, + layoutConfig: layoutConfig().just() }), stack([], { width: 100, height: 100, - backgroundColor: Color.BLUE + backgroundColor: Color.BLUE, + layoutConfig: layoutConfig().just() }) ], { width: 100, height: 300, + layoutConfig: layoutConfig().just() }), vlayout([ stack([], { width: 100, height: 100, - backgroundColor: Color.GREEN + backgroundColor: Color.GREEN, + layoutConfig: layoutConfig().just() }), stack([], { width: 100, height: 100, - backgroundColor: Color.BLUE + backgroundColor: Color.BLUE, + layoutConfig: layoutConfig().just() }), stack([], { width: 100, height: 100, - backgroundColor: Color.RED + backgroundColor: Color.RED, + layoutConfig: layoutConfig().just() }) ], { width: 100, height: 300, + layoutConfig: layoutConfig().just() }), vlayout([ stack([], { width: 100, height: 100, - backgroundColor: Color.BLUE + backgroundColor: Color.BLUE, + layoutConfig: layoutConfig().just() }), stack([], { width: 100, height: 100, - backgroundColor: Color.RED + backgroundColor: Color.RED, + layoutConfig: layoutConfig().just() }), stack([], { width: 100, height: 100, - backgroundColor: Color.GREEN + backgroundColor: Color.GREEN, + layoutConfig: layoutConfig().just() }) ], { width: 100, height: 300, + layoutConfig: layoutConfig().just() }) ], { width: 400, height: 300, + layoutConfig: layoutConfig().just(), backgroundColor: Color.BLACK }).in(rootView) }