From e042ce732e14f2c41df837eb3d810bbe1c1c48c9 Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Fri, 5 Aug 2022 11:22:37 +0800 Subject: [PATCH] Add more Layout test demo --- doric-demo/src/LayoutTestDemo.tsx | 75 +++++++++++++++++++++++++++++-- 1 file changed, 71 insertions(+), 4 deletions(-) diff --git a/doric-demo/src/LayoutTestDemo.tsx b/doric-demo/src/LayoutTestDemo.tsx index b8e68c23..3c315c38 100644 --- a/doric-demo/src/LayoutTestDemo.tsx +++ b/doric-demo/src/LayoutTestDemo.tsx @@ -19,12 +19,15 @@ function Grid(props: { title: string; innerElement: JSX.Element }) { text={props.title} backgroundColor={Color.parse("#3498db")} textColor={Color.WHITE} - textAlignment={Gravity.CenterX} - layoutConfig={layoutConfig().mostWidth().justHeight()} - height={30} + textAlignment={Gravity.CenterY.left()} + layoutConfig={layoutConfig() + .mostWidth() + .fitHeight() + .configMinHeight(30)} + maxLines={0} /> + VLayout(w=fit ,h=just&weight) +> > Text(w=fit, h=fit) +> > Stack(w=most, h=just) +> Stack(w=most, h=just) +`} + > + + + Content + + + + + + + VLayout(w=fit ,h=just&weight) +> > Text(w=fit, h=fit) +> > Stack(w=most, h=just) +> Stack(w=most, h=just) +`} + > + + + Content + + + + + +