openHarmony的ets画哆啦A梦 原创
@Entry
@Component
struct Index {
build() {
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Stack({ alignContent: Alignment.TopStart }) {
Stack({ alignContent: Alignment.End }) {
Flex({direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Flex({direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }){
Circle().width(20).height(20)
}.width(70).padding({left:30,top:30})
.height(70)
.border({ width: 1, color: 0x000000, radius: 10, style: BorderStyle.Solid })
.borderRadius(36)
.margin({right:5})
.backgroundColor(0xffffff)
Flex({direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }){
Circle().width(20).height(20)
}.width(70).padding({right:30,top:30})
.height(70)
.border({ width: 1, color: 0x000000, radius: 10, style: BorderStyle.Solid })
.borderRadius(36)
.margin({left:5})
.backgroundColor(0xffffff)
}
}.margin({top:20})
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }){
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){
Text().width(25).height(25).backgroundColor(0xff0000).borderRadius(12)
Flex({direction: FlexDirection.Row,justifyContent: FlexAlign.SpaceAround}){
Column(){
Path().width(30).height(20).commands(‘M0 0 L120 30’).stroke(Color.Black).strokeWidth(3)
Path().width(30).height(20).commands(‘M0 0 L120 0’).stroke(Color.Black).strokeWidth(3)
Path().width(30).height(20).commands(‘M0 0 L120 -30’).stroke(Color.Black).strokeWidth(3)
}
Column(){
Path().width(30).height(20).commands(‘M47 0 L47 120’).stroke(Color.Black).strokeWidth(3)
}
Column(){
Path().width(30).height(20).commands(‘M-30 23 L90 -7’).stroke(Color.Black).strokeWidth(3)
Path().width(30).height(20).commands(‘M-30 0 L90 0’).stroke(Color.Black).strokeWidth(3)
Path().width(30).height(20).commands(‘M-30 -23 L90 7’).stroke(Color.Black).strokeWidth(3)
}
}.margin({top:10})
Stack(){
Text().width(100).height(40).backgroundColor(0xffffff)
.border({ width: 3, color: 0x000000, radius: 30, style: BorderStyle.Solid })
Text().width(100).height(40).backgroundColor(0xffffff).borderRadius(100).margin({bottom:10})
}.margin({top:-20})
}
}
.width(170)
.height(150)
.border({ width: 1, color: 0x000000, radius: 10, style: BorderStyle.Solid })
.borderRadius(75)
.margin({top:80,left:20})
.backgroundColor(0xffffff)
}.width(200).height(220).backgroundColor(‘#0093dd’).borderRadius(100)
}.width("100%").height("100%")
}
}