增加设置按钮图标
This commit is contained in:
parent
0aa45d78da
commit
bb1275992f
@ -6,15 +6,15 @@ export struct EventButton {
|
|||||||
@Param strIcon:string='';
|
@Param strIcon:string='';
|
||||||
@Param strName:string='';
|
@Param strName:string='';
|
||||||
build() {
|
build() {
|
||||||
Column({ space: 0 }) {
|
Column({ space: 2 }) {
|
||||||
// 请将$r('app.media.loading')替换为实际资源文件
|
// 请将$r('app.media.loading')替换为实际资源文件
|
||||||
Image($r('app.media.' + this.strIcon))
|
Image($r('app.media.' + this.strIcon))
|
||||||
.width(50)
|
.width(45)
|
||||||
.height(40)
|
.height(35)
|
||||||
.objectFit(ImageFit.Contain)
|
.objectFit(ImageFit.Contain)
|
||||||
Text(this.strName)
|
Text(this.strName)
|
||||||
.fontSize(12)
|
.fontSize(10)
|
||||||
.width(50)
|
.width(45)
|
||||||
.height(10)
|
.height(10)
|
||||||
.textAlign(TextAlign.Center)
|
.textAlign(TextAlign.Center)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,16 +18,15 @@ export struct GroupTextEventMenu {
|
|||||||
build(){
|
build(){
|
||||||
Row(){
|
Row(){
|
||||||
//功能组名文本
|
//功能组名文本
|
||||||
|
Blank().width('10%')
|
||||||
Text(this.grpName)
|
Text(this.grpName)
|
||||||
.fontSize(8)
|
.fontSize(8)
|
||||||
.fontColor(Color.Gray)
|
.fontColor(Color.Gray)
|
||||||
Button('X')
|
Blank().width('11%')
|
||||||
.fontColor(Color.Gray)
|
Image($r('app.media.base_seetings'))
|
||||||
.fontSize(8)
|
.height(15)
|
||||||
.height(12)
|
.width(15)
|
||||||
.width(8)
|
|
||||||
.padding(1)
|
.padding(1)
|
||||||
.type(ButtonType.Normal)
|
|
||||||
.bindMenu(this.GroupMenu(this.grpMenus))
|
.bindMenu(this.GroupMenu(this.grpMenus))
|
||||||
.backgroundColor(Color.Transparent)
|
.backgroundColor(Color.Transparent)
|
||||||
}.align(Alignment.BottomEnd)
|
}.align(Alignment.BottomEnd)
|
||||||
|
|||||||
@ -22,7 +22,7 @@ export struct TitleTabContent {
|
|||||||
}else if(row_item instanceof Array<GroupEvent>){
|
}else if(row_item instanceof Array<GroupEvent>){
|
||||||
//功能组,迭代多个功能组
|
//功能组,迭代多个功能组
|
||||||
ForEach(row_item, (group_item: GroupEvent, index: number) =>{
|
ForEach(row_item, (group_item: GroupEvent, index: number) =>{
|
||||||
Column({ space: 2 }){
|
Column({ space: 5 }){
|
||||||
Row({ space: 1 }){
|
Row({ space: 1 }){
|
||||||
ForEach(group_item.grpBtn, (btn_item: BtnEvent|Array<BtnEvent>, index: number) =>{
|
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