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-27 18:03:06 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2e5da8d53b7f59278725880b5f71f5988e351b5a
2e5da8d5
1 parent
8fd8712b
feat: 18041 号主>文章、动态列表,不需要展示评论数元素
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardSourceInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardSourceInfo.ets
View file @
2e5da8d
...
...
@@ -9,6 +9,10 @@ export struct CardSourceInfo {
@State contentDTO: ContentDTO = new ContentDTO();
@ObjectLink compDTO: CompDTO
aboutToAppear(): void {
}
handleTimeStr() {
return DateTimeUtils.getCommentTime(
this.contentDTO.publishTime.includes(' ')
...
...
@@ -36,6 +40,11 @@ export struct CardSourceInfo {
return flag;
}
showCommentNum() {
const curRouter = router.getState().name;
return curRouter !== 'PeopleShipHomePage'
}
/**
* 全域数字显示规则
* 1、当数量为千位以內时,显示数字,不保留小数点,比如 4585
...
...
@@ -132,7 +141,7 @@ export struct CardSourceInfo {
.flexShrink(0)
.margin({right: 4})
}
if (this.getContentDtoBean()?.interactData?.commentNum) {
if (this.getContentDtoBean()?.interactData?.commentNum
&& this.showCommentNum()
) {
Text(`${this.handlerNum(this.getContentDtoBean()?.interactData?.commentNum.toString())}评`)
.fontSize($r("app.float.font_size_11"))
.fontColor($r("app.color.color_B0B0B0"))
...
...
Please
register
or
login
to post a comment