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-10-31 14:13:48 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
10759acf592f50b2b8e3217a5fbeaf119efb2b20
10759acf
1 parent
cdfaa913
feat:优化动态详情页图片展示
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
View file @
10759ac
...
...
@@ -1115,9 +1115,8 @@ struct createImg {
getPicHeight(picWidth: number, picHeight: number) {
//console.info(`cj2024 getPicType picWidth = ${picWidth} picHeight = ${picHeight} picWidth / picHeight = ${picWidth / picHeight}`)
if (picWidth && picHeight) {
let imageH = 305
let sizeH = this.compWidth * picHeight / picWidth
return
Math.max(sizeH,imageH
)
return
picWidth/picHeight === 1 ? 228:Math.min(sizeH,305
)
} else {
return 305; //普通图
}
...
...
@@ -1231,7 +1230,7 @@ struct createImg {
// .aspectRatio(this.onePicW > this.onePicH ? 343 / 198 : 228 / 305)
.width('100%')
.constraintSize({
maxHeight: this.getPicHeight(
this.onePicW,this.onePicH
)
maxHeight: this.getPicHeight(
item.width,item.height
)
})
.autoResize(true)
.borderRadius(this.caclImageRadius(index))
...
...
Please
register
or
login
to post a comment