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
wangliang_wd
2024-06-20 16:38:44 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ae20f4d3653c85a4ce983d52d0192d7dc8327a1d
ae20f4d3
1 parent
c1a9b379
feat:优化我的头像
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageUserSimpleInfoUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageUserSimpleInfoUI.ets
View file @
ae20f4d
...
...
@@ -26,6 +26,7 @@ export default struct MinePageUserSimpleInfoUI {
}else{
this.headPhotoUrl = ""
this.levelHead = ""
this.userType = "1"
}
}
...
...
@@ -33,12 +34,20 @@ export default struct MinePageUserSimpleInfoUI {
Row(){
//头像
Stack(){
Image(this.headPhotoUrl)
.alt(this.userType === '1'?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon'))
.width(`${this.calcHeight(100)}lpx`)
.height(`${this.calcHeight(100)}lpx`)
.objectFit(ImageFit.Cover)
.borderRadius(50)
if (this.headPhotoUrl.length > 0){
Image(this.headPhotoUrl)
.alt(this.userType === "1"?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon'))
.width(`${this.calcHeight(100)}lpx`)
.height(`${this.calcHeight(100)}lpx`)
.objectFit(ImageFit.Cover)
.borderRadius(50)
}else {
Image(this.userType === "1"?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon'))
.width(`${this.calcHeight(100)}lpx`)
.height(`${this.calcHeight(100)}lpx`)
.objectFit(ImageFit.Cover)
.borderRadius(50)
}
if(StringUtils.isNotEmpty(this.levelHead)){
Image(this.levelHead)
...
...
Please
register
or
login
to post a comment