增加设置按钮图标
This commit is contained in:
parent
0aa45d78da
commit
bb1275992f
@ -6,15 +6,15 @@ export struct EventButton {
|
||||
@Param strIcon:string='';
|
||||
@Param strName:string='';
|
||||
build() {
|
||||
Column({ space: 0 }) {
|
||||
Column({ space: 2 }) {
|
||||
// 请将$r('app.media.loading')替换为实际资源文件
|
||||
Image($r('app.media.' + this.strIcon))
|
||||
.width(50)
|
||||
.height(40)
|
||||
.width(45)
|
||||
.height(35)
|
||||
.objectFit(ImageFit.Contain)
|
||||
Text(this.strName)
|
||||
.fontSize(12)
|
||||
.width(50)
|
||||
.fontSize(10)
|
||||
.width(45)
|
||||
.height(10)
|
||||
.textAlign(TextAlign.Center)
|
||||
}
|
||||
|
||||
@ -18,16 +18,15 @@ export struct GroupTextEventMenu {
|
||||
build(){
|
||||
Row(){
|
||||
//功能组名文本
|
||||
Blank().width('10%')
|
||||
Text(this.grpName)
|
||||
.fontSize(8)
|
||||
.fontColor(Color.Gray)
|
||||
Button('X')
|
||||
.fontColor(Color.Gray)
|
||||
.fontSize(8)
|
||||
.height(12)
|
||||
.width(8)
|
||||
Blank().width('11%')
|
||||
Image($r('app.media.base_seetings'))
|
||||
.height(15)
|
||||
.width(15)
|
||||
.padding(1)
|
||||
.type(ButtonType.Normal)
|
||||
.bindMenu(this.GroupMenu(this.grpMenus))
|
||||
.backgroundColor(Color.Transparent)
|
||||
}.align(Alignment.BottomEnd)
|
||||
|
||||
@ -22,7 +22,7 @@ export struct TitleTabContent {
|
||||
}else if(row_item instanceof Array<GroupEvent>){
|
||||
//功能组,迭代多个功能组
|
||||
ForEach(row_item, (group_item: GroupEvent, index: number) =>{
|
||||
Column({ space: 2 }){
|
||||
Column({ space: 5 }){
|
||||
Row({ space: 1 }){
|
||||
ForEach(group_item.grpBtn, (btn_item: BtnEvent|Array<BtnEvent>, index: number) =>{
|
||||
//如果是数组则为菜单按钮否则为单功能按钮
|
||||
|
||||
BIN
entry/src/main/resources/base/media/base_seetings.bmp
Normal file
BIN
entry/src/main/resources/base/media/base_seetings.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
Loading…
Reference in New Issue
Block a user