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
daijian_wd
2024-05-07 15:06:14 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bed1390dba2c35a76fa07ce810e48f852d1820f7
bed1390d
1 parent
2e4ae46a
fix: 解决收藏bug
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
View file @
bed1390
...
...
@@ -41,7 +41,7 @@ const TAG = 'OperRowListView';
@Preview
@Component
export struct OperRowListView {
@Prop contentDetailData: ContentDetailDTO // 稿件详情
@Prop
@Watch('onDetailUpdated')
contentDetailData: ContentDetailDTO // 稿件详情
@State operationButtonList: string[] = ['comment', 'collect', 'share'] // 组件展示条件
@ObjectLink publishCommentModel: publishCommentModel
// @State contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
...
...
@@ -52,7 +52,9 @@ export struct OperRowListView {
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
needLike: boolean = true
async aboutToAppear() {
// async aboutToAppear() {
async onDetailUpdated() {
if (!this.contentDetailData) return
const user_id = await SPHelper.default.get(SpConstants.USER_ID, '')
if (user_id) {
this.getInteractDataStatus()
...
...
@@ -99,6 +101,7 @@ export struct OperRowListView {
})
.width(42)
if (this.contentDetailData) {
ForEach(this.operationButtonList, (item: string, index: number) => {
if (item == 'comment') {
this.builderComment()
...
...
@@ -114,6 +117,7 @@ export struct OperRowListView {
}
})
}
}
.width('100%')
.justifyContent(FlexAlign.Start)
}
...
...
Please
register
or
login
to post a comment