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
chengen02
2024-06-03 10:40:16 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ba6d76aa5c477bab599571cf60fa232dd3dd41b2
ba6d76aa
1 parent
a703e545
-fix 评论展示bug修复
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
2 deletions
sight_harmony/features/wdComponent/src/main/ets/components/CommentDialogView.ets
sight_harmony/features/wdComponent/src/main/ets/components/SpacialTopicPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
sight_harmony/features/wdComponent/src/main/ets/components/CommentDialogView.ets
0 → 100644
View file @
ba6d76a
import { ContentDetailDTO, InteractDataDTO, PageInfoDTO } from 'wdBean/Index'
import { CommentListDialogView, publishCommentModel } from '../../../../Index'
@Component
export struct CommentDialogView {
@Link @Watch('showCommentListChange') showCommentList: boolean
@Link index: number
@Link currentIndex: number
@Link publishCommentModel: publishCommentModel
@Consume contentDetailData: ContentDetailDTO
@Link interactData: InteractDataDTO
@State fakePageInfo: PageInfoDTO = {} as PageInfoDTO
@State dialogOffsetY: number = 0 // (this.windowHeight - this.windowWidth * 9 / 16)
@State @Watch("innerShowCommentChange") innerShowComment: boolean = false
showCommentListChange(val: boolean) {
if (this.showCommentList && this.index === this.currentIndex) {
this.innerShowComment = true
} else {
this.innerShowComment = false
}
}
innerShowCommentChange() {
this.showCommentList = this.innerShowComment
}
build() {
CommentListDialogView({
showCommentList: this.innerShowComment,
contentDetailData: this.contentDetailData,
publishCommentModel: this.publishCommentModel,
pageInfo: this.fakePageInfo,
onClose: () => {
this.showCommentList = false
if (Number.parseInt(this.publishCommentModel.totalCommentNumer) > Number.parseInt(this.interactData.commentNum + "")) {
this.interactData.commentNum = Number.parseInt(this.publishCommentModel.totalCommentNumer)
}
}
})
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/SpacialTopicPageComponent.ets
View file @
ba6d76a
import { Action, H5ReceiveDetailBean, ContentDetailDTO } from 'wdBean';
import { Action, H5ReceiveDetailBean, ContentDetailDTO
, InteractDataDTO
} from 'wdBean';
import { WdWebComponent } from 'wdWebComponent';
import router from '@ohos.router';
import { CommonConstants } from 'wdConstant'
...
...
@@ -13,6 +13,7 @@ import { NetworkUtil, WindowModel } from 'wdKit';
import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare'
import { common } from '@kit.AbilityKit';
import { PageRepository } from '../repository/PageRepository';
import { CommentDialogView } from './CommentDialogView';
const TAG: string = 'SpacialTopicPageComponent'
...
...
@@ -23,7 +24,11 @@ export struct SpacialTopicPageComponent {
action: Action = {} as Action
@State webUrl: string = '';
@State subjectData: string = '';
@State index: number = 0
@State currentIndex: number = 0
@State isPageEnd: boolean = false
@State showCommentList: boolean = false
@State interactData: InteractDataDTO = {} as InteractDataDTO
@Prop reload: number = 0;
@Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
private h5ReceiveAppData: H5ReceiveDetailBean = { dataSource: '2' } as H5ReceiveDetailBean
...
...
@@ -185,6 +190,16 @@ export struct SpacialTopicPageComponent {
publishCommentModel: this.publishCommentModel,
operationButtonList: this.operationButtonList,
styleType: 1,
onCommentIconClick:()=>{
this.showCommentList = true
}
})
CommentDialogView({
index: $index,
currentIndex: $currentIndex,
showCommentList: $showCommentList,
publishCommentModel: $publishCommentModel,
interactData: $interactData,
})
}
}.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
View file @
ba6d76a
...
...
@@ -48,6 +48,7 @@ export struct OperRowListView {
private onCommentFocus: () => void = () => {
}
private onCommentIconClick: () => void = () => {
}
@Provide inDialog: boolean = false
...
...
@@ -252,6 +253,9 @@ export struct OperRowListView {
@Builder
builderComment() {
Column() {
// Text((this.contentDetailData.openComment == 1).toString())
// Text((this.contentDetailData.commentDisplay == 1).toString())
// Text(this.publishCommentModel?.targetId.toString())
if (this.contentDetailData.openComment == 1
&& this.contentDetailData.commentDisplay == 1
&& this.publishCommentModel?.targetId) {
...
...
@@ -284,9 +288,10 @@ export struct OperRowListView {
contentDetail: this.contentDetailData
})
.onClick(() => {
console.log('akdbakdbakdbaksjd')
this.onCommentIconClick()
console.log(JSON.stringify(this.dialogController?.open
))
// console.log('his.dialogController?.open',JSON.stringify(this.dialogController
))
// 评论弹框内部嵌入
!this.showBackIcon && this.dialogController?.open()
...
...
Please
register
or
login
to post a comment