组件是构成页面的基本单元
组件名称(){}
声明式语法
Column()  
{}.height("100%").width("100%").background(Color.Red)
{}内部有些组件有{}有些没有
.：组件样式
Column或者Row组件默认的是交叉轴居中

Text


接口


PhonePC/2in1TabletTVWearable

Text(content?: string | Resource , value?: TextOptions)

图片

Image
 Text
 Button
build(){}下方只允许有一个根组件，组件树
尺寸单位
.height(200)：鸿蒙默认采用vp单元，虚拟像素
尽量避免ui布局相差过大，相较于px（物理像素）

背景属性 background
布局属性 padding margin borader