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
chenjun
2024-08-09 16:10:05 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
86fc2fce5065f73c41f34b97a4f28eff2a504057
86fc2fce
1 parent
d54bc0d5
title两行情况下summary微调
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerTitleView.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerTitleView.ets
View file @
86fc2fc
...
...
@@ -148,6 +148,7 @@ export struct PlayerTitleView {
private updateSummaryLines() {
this.summaryLines = Math.max(1, 4 - this.titleLines)
// console.info(`cj2024 titleLines = ${this.titleLines}`)
this.isOverLines = this.summary.length > this.clipText(this.summary, 14, this.summaryLines, this.windowWidth - 150 - vp2px(50)).length
}
...
...
@@ -306,7 +307,9 @@ export struct PlayerTitleView {
}
}
.onAreaChange((oldArea: Area, newArea: Area) => {
this.titleLines = Math.ceil((newArea.height as number) / 20) // 20是行高
//console.info(`cj2024 titleLines = ${newArea.height as number} line = ${(newArea.height as number) / 20}`)
this.titleLines = Math.floor((newArea.height as number) / 20)// 20是行高
//console.info(`cj2024 titleLines = ${this.titleLines}`)
this.updateSummaryLines()
})
.padding({
...
...
Please
register
or
login
to post a comment