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
chenjun1_wd
2024-08-13 22:09:03 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e258ab0fed5bbcbe91bd44a0135b523652547913
e258ab0f
1 parent
2184d36b
19989 视频详情页:文本框弹出样式,缺少发布时间。
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/DetailDialog.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerTitleView.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/DetailDialog.ets
View file @
e258ab0
import { DateTimeUtils } from 'wdKit'
@Preview
@CustomDialog
export struct DetailDialog {
...
...
@@ -5,6 +7,7 @@ export struct DetailDialog {
@Prop name: string
@Prop title: string
@Prop summary: string
@Prop publishTime: string
@Link isOpenDetail: boolean
build() {
...
...
@@ -36,6 +39,16 @@ export struct DetailDialog {
.fontWeight(400)
.margin({ top: 8 })
.lineHeight(21)
Text(DateTimeUtils.formatDate(new Date(this.publishTime).getTime(),
DateTimeUtils.PATTERN_DATE_TIME_HYPHEN_MM))
.fontSize(12)
.fontColor(Color.White)
.opacity(0.7)
.lineHeight(16)
.fontWeight(400)
.fontFamily('PingFang SC-Regular')
.margin({ top: 8, bottom: 8 })
}
.alignItems(HorizontalAlign.Start)
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerTitleView.ets
View file @
e258ab0
...
...
@@ -24,6 +24,7 @@ export struct PlayerTitleView {
name: this.getName(),
title: this.getTitle(),
summary: this.getSummary(),
publishTime: this.getPublishTime(),
isOpenDetail: this.isOpenDetail
}),
...
...
@@ -55,6 +56,10 @@ export struct PlayerTitleView {
return this.contentDetailData?.newIntroduction || ''
}
getPublishTime(): string {
return this.contentDetailData?.publishTime || ''
}
/**
* 截断文本
* @param {string} str 要截断的文本 '啊啊啊啊啊'
...
...
Please
register
or
login
to post a comment