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
wangyong_wd
2024-04-17 13:07:20 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
40888cd0e5b0756afaee090fed374ea0dd55c373
40888cd0
1 parent
d9dd5a4c
样式卡bug修复
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
14 deletions
sight_harmony/features/wdBean/src/main/ets/bean/content/ContentDTO.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardSourceInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card10Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card9Component.ets
sight_harmony/features/wdBean/src/main/ets/bean/content/ContentDTO.ets
View file @
40888cd
...
...
@@ -72,5 +72,6 @@ export interface ContentDTO {
corner: string;
rmhPlatform: number;
newTags: string;
titleShow?: number;
isSearch?: boolean; // 是否是搜索的结果,区分搜索和主页的数据
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardSourceInfo.ets
View file @
40888cd
...
...
@@ -20,12 +20,18 @@ export struct CardSourceInfo {
.fontColor($r("app.color.color_B0B0B0"))
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
Image($r("app.media.point"))
.width(16)
.height(16)
} else if (this.contentDTO.source) {
Text(`${this.contentDTO.source}`)
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
Image($r("app.media.point"))
.width(16)
.height(16)
}
// 新闻tab下的卡片,2天之前的不显示时间。但是如果是搜索情况下展示的卡片,显示时间
if (this.contentDTO.isSearch || !this.contentDTO.isSearch && DateTimeUtils.getCommentTime
...
...
@@ -34,9 +40,6 @@ export struct CardSourceInfo {
.contentDTO.publishTime))
.indexOf
('-') === -1) {
Image($r("app.media.point"))
.width(16)
.height(16)
Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)))
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card10Component.ets
View file @
40888cd
...
...
@@ -17,7 +17,7 @@ export struct Card10Component {
build() {
Column() {
// 顶部标题,最多两行
if (this.contentDTO.newsTitle) {
if (this.contentDTO.
titleShow === 1 && this.contentDTO.
newsTitle) {
Text(this.contentDTO.newsTitle)
.width(CommonConstants.FULL_WIDTH)
.fontSize($r('app.float.font_size_17'))
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
View file @
40888cd
...
...
@@ -42,16 +42,15 @@ export struct Card6Component {
.alignItems(HorizontalAlign.Start)
.justifyContent(FlexAlign.Start)
.width('58%')
if (this.contentDTO.coverUrl) {
Stack() {
Image(this.contentDTO.coverUrl)
.borderRadius(5)
.aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4)
.height(this.contentDTO.appStyle === CompStyle.Card_13 ? 90 : 180)
CardMediaInfo({ contentDTO: this.contentDTO })
}
.alignContent(Alignment.BottomEnd)
Stack() {
Image(this.contentDTO.coverUrl)
.backgroundColor($r('app.color.color_B0B0B0'))
.borderRadius(5)
.aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4)
.height(this.contentDTO.appStyle === CompStyle.Card_13 ? 90 : 180)
CardMediaInfo({ contentDTO: this.contentDTO })
}
.alignContent(Alignment.BottomEnd)
}
.onClick((event: ClickEvent) => {
ProcessUtils.processPage(this.contentDTO)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card9Component.ets
View file @
40888cd
...
...
@@ -15,7 +15,7 @@ export struct Card9Component {
build() {
Column() {
// 顶部标题,最多两行
if (this.contentDTO.newsTitle) {
if (this.contentDTO.
titleShow === 1 && this.contentDTO.
newsTitle) {
Text(this.contentDTO.newsTitle)
.width(CommonConstants.FULL_WIDTH)
.fontSize($r('app.float.font_size_17'))
...
...
Please
register
or
login
to post a comment