页面布局练习代码
@Entry
@Component
struct Index{
build() {
Column(){
Text('猜你喜欢')
.fontColor('#ffff')
.width('100%')
.margin({bottom:10})
List(){
ListItem(){
Row(){
//图
Image($r('app.media.startIcon'))
.width(80)
.border({radius:10})
.margin({right:10})
//字
Column(){
Text('歌曲01')
.fontColor('#ffff')
.width('100%')
.fontWeight(700)
.margin({bottom:15})
Row(){
Text('VIP')
.fontColor('#9A8E28')
.border({width:1,color:'#9A8E28',radius:12})
.padding({left:5,right:5,top:3,bottom:3})
.margin({right:10})
Text('凤凰传奇')
.fontColor('#696969')
}
.width('100%')
}
.layoutWeight(1)
//更多
Column(){
Image($r('app.media.bytedance'))
.width(24)
.height(24)
.fillColor('#ffff')
}
}
.width('100%')
.height(80)
// .backgroundColor(Color.Pink)
.margin({bottom:10})
}
}
.scrollBar(BarState.Off)
}
.width('100%')
.height('100%')
.backgroundColor('#131313')
.padding({left:10,right:10})
.expandSafeArea([SafeAreaType.SYSTEM],[SafeAreaEdge.TOP,SafeAreaEdge.BOTTOM])
}
}
软件图标修改
icon:对应软件图标 label:对应软件名称

项目功能
推荐-发现-我的

987

被折叠的 条评论
为什么被折叠?



