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-08-23 14:45:45 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f9a900d004445d60ac1dc6c48fa6d0118f91d7bb
f9a900d0
1 parent
32283731
fix: 18271 全域-规则_数字显示规则-展示交互问题
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentTabComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
View file @
f9a900d
...
...
@@ -275,6 +275,7 @@ export struct CommentComponent {
// 这里需要先赋值,否则下次UI刷新可能重复进入第1页两次
this.currentPage = pageIndex + 1
if (Number.parseInt(commentListModel.totalCommentNum) >
Number.parseInt(this.publishCommentModel.totalCommentNumer)) {
this.publishCommentModel.totalCommentNumer = commentListModel.totalCommentNum + ''
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentTabComponent.ets
View file @
f9a900d
import { DisplayUtils, EmitterEventId, EmitterUtils, ToastUtils } from 'wdKit/Index'
import { DisplayUtils, EmitterEventId, EmitterUtils, ToastUtils
, NumberFormatterUtils
} from 'wdKit/Index'
import { publishCommentModel } from '../model/PublishCommentModel'
import { CommentCustomDialog } from './CommentCustomDialog'
import measure from '@ohos.measure'
...
...
@@ -206,7 +206,7 @@ export struct CommentIconComponent {
// x:-6
// })
.id("Image")
Text(this.showMainText?'正文':
this.publishCommentModel.totalCommentNumer
)// Text("44444444")
Text(this.showMainText?'正文':
NumberFormatterUtils.formatNumberWithWan(this.publishCommentModel.totalCommentNumer)
)// Text("44444444")
.fontSize(8)
.fontColor(this.showMainText?'#222222':'#ffffff')// .backgroundColor('#ED2800')
.height(12)
...
...
@@ -217,7 +217,7 @@ export struct CommentIconComponent {
})// .margin({left: 4,right:4
// })
/*动态计算文字宽度*/
.width(this.getMeasureText(
this.publishCommentModel.totalCommentNumer
) +
.width(this.getMeasureText(
NumberFormatterUtils.formatNumberWithWan(this.publishCommentModel.totalCommentNumer)
) +
12)// .backgroundColor(Color.Green)
.id("Text")
.visibility(this.publishCommentModel.totalCommentNumer ? Visibility.Visible : Visibility.Hidden)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
View file @
f9a900d
...
...
@@ -542,16 +542,15 @@ export struct OperRowListView {
if (res.data) {
this.interactData.likeNum = NumberFormatterUtils.formatNumberWithWan(res.data[0]?.likeNum)
this.interactData.collectNum = NumberFormatterUtils.formatNumberWithWan(res.data[0]?.collectNum)
this.interactData.commentNum = NumberFormatterUtils.formatNumberWithWan(res.data[0]?.commentNum)
// this.interactData.commentNum = NumberFormatterUtils.formatNumberWithWan(res.data[0]?.commentNum)
this.interactData.commentNum = res.data[0]?.commentNum
// 评论组件需要数据
if (Number.parseInt(this.interactData.commentNum) >
if (Number.parseInt(this.interactData.commentNum
+ ''
) >
Number.parseInt(this.publishCommentModel.totalCommentNumer)) {
this.publishCommentModel.totalCommentNumer = this.interactData.commentNum + ''
}
}
// console.log(TAG, '获取互动点赞等数据===', JSON.stringify(res))
console.log(TAG, 'this.interactData44', JSON.stringify(this.interactData))
console.log(TAG, 'this.publishCommentModel', JSON.stringify(this.publishCommentModel))
})
}
}
...
...
Please
register
or
login
to post a comment