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
陈剑华
2024-05-21 14:38:07 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f22619179b5888bddba2ff2d3d0246227ca98f8c
f2261917
1 parent
89f4fe23
feat: 17003 UI还原问题--搜索结果页-间距较大且视频时长字体与安卓不一致
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardMediaInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardMediaInfo.ets
View file @
f226191
...
...
@@ -2,6 +2,7 @@ import { ContentDTO, joinPeopleNum } from 'wdBean/Index'
import { DateTimeUtils } from 'wdKit/Index'
import { LottieView } from '../../components/lottie/LottieView';
import { LiveModel } from '../../viewmodel/LiveModel'
import font from '@ohos.font';
/**
* 这里是样式卡中,右下角显示的音视频信息
...
...
@@ -18,6 +19,11 @@ export struct CardMediaInfo {
aboutToAppear(): void {
this.getJoinPeopleNum();
font.registerFont({
familyName: 'BebasNeue',
familySrc: $rawfile('font/BebasNeue.ttf')
})
}
/**
...
...
@@ -66,7 +72,7 @@ export struct CardMediaInfo {
if (this.contentDTO.videoInfo != null) {
Text(DateTimeUtils.getFormattedDuration(this.contentDTO.videoInfo.videoDuration * 1000))
.mediaText()
.fontFamily('BebasNeue
Bold
')
.fontFamily('BebasNeue')
}
}
} else if (this.contentDTO.objectType === '2') {
...
...
@@ -133,7 +139,7 @@ export struct CardMediaInfo {
.mediaLogo()
Text(DateTimeUtils.getFormattedDuration(this.contentDTO.voiceInfo.voiceDuration * 1000))
.mediaText()
.fontFamily('BebasNeue
Bold
')
.fontFamily('BebasNeue')
}
} else if (this.contentDTO.objectType === '4') {//广告标签
Text($r('app.string.comp_advertisement'))
...
...
Please
register
or
login
to post a comment