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
caohuahui
2024-02-05 17:11:05 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
828bcf2c95dee2ae5eb4f3430d2c9118647253a8
828bcf2c
1 parent
d6ad61ae
头图卡宽高比例计算
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
PeopleDaily_Harmony/wdComponent/src/main/ets/components/view/HeadPictureCardComponent.ets
PeopleDaily_Harmony/wdComponent/src/main/ets/components/view/HeadPictureCardComponent.ets
View file @
828bcf2
...
...
@@ -39,7 +39,19 @@ export struct HeadPictureCardComponent {
}
.alignContent(Alignment.Bottom)
.width(CommonConstants.FULL_WIDTH)
.aspectRatio(imageSizeRatio(this.compDTO.operDataList[0].coverSize))
.height(200)
}
}
function imageSizeRatio(size: string): number {
if (size != null) {
let parts: string[] = size.split("*");
let f = Number(parts[0])
let s = Number(parts[1])
return f / s;
} else {
return 1.0
}
}
...
...
Please
register
or
login
to post a comment