Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
yangchenggong1_wd
2024-05-30 13:44:53 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
63fcc4b01f68aaccd85990e188f72e7c5c5c4dc3
63fcc4b0
1 parent
a1d11dd4
fix:我的页面 适配 折叠屏
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePagePersonFunctionUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/PagePersonFunction.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePagePersonFunctionUI.ets
View file @
63fcc4b
...
...
@@ -17,7 +17,7 @@ export default struct MinePagePersonFunctionUI {
Grid(){
ForEach(this.personalData,(item:MinePagePersonalFunctionsItem,index:number)=>{
GridItem(){
PagePersonFunction({ item: item, noDivider : (index % 5 < 4 && index != this.personalData.length-1) ? false : true})
PagePersonFunction({ item: item, noDivider : (index % 5 < 4 && index != this.personalData.length-1) ? false : true
,percent:$percent
})
}.onClick(()=>{
console.log(index+"")
switch (item.msg){
...
...
@@ -78,7 +78,7 @@ export default struct MinePagePersonFunctionUI {
break;
}
}
})
.width(`${this.calcHeight(142)}lpx`)
})
/*.width(`${this.calcHeight(142)}lpx`)*/
.height(`${this.calcHeight(117)}lpx`)
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/PagePersonFunction.ets
View file @
63fcc4b
...
...
@@ -4,6 +4,7 @@ import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunct
export struct PagePersonFunction{
@ObjectLink item: MinePagePersonalFunctionsItem
@State noDivider:boolean = false
@Link percent:number
build() {
Row(){
...
...
@@ -15,18 +16,18 @@ export struct PagePersonFunction{
if (this.item.isShowRedPoint) {
Button()
.type(ButtonType.Circle)
.width("12lpx")
.height("12lpx")
.width(`${this.calcHeight(12)}lpx`)
.height(`${this.calcHeight(12)}lpx`)
.backgroundColor($r('app.color.color_ED2800'))
}
}.width('46lpx')
.height('46lpx')
}.width(`${this.calcHeight(46)}lpx`)
.height(`${this.calcHeight(46)}lpx`)
Text(`${this.item.msg}`)
.margin({top:'8lpx'})
.height('23lpx')
.margin({top:`${this.calcHeight(8)}lpx`})
.height(`${this.calcHeight(23)}lpx`)
.fontColor($r('app.color.color_222222'))
.fontSize(
'23lpx'
)
.fontSize(
`${this.calcHeight(23)}lpx`
)
}
.alignItems(HorizontalAlign.Center)
.width('100%')
...
...
@@ -35,10 +36,13 @@ export struct PagePersonFunction{
if(!this.noDivider){
Text().backgroundColor($r('app.color.color_222222'))
.opacity(0.1)
.width('2lpx')
.height('29lpx')
.width(`${this.calcHeight(2)}lpx`)
.height(`${this.calcHeight(29)}lpx`)
}
}
}
calcHeight(value:number): number{
return value * this.percent
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment