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
zhenghy
2024-05-07 15:07:18 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
6651aefcc19e72cfe6baa25ae6579815c92dd773
6651aefc
2 parents
6ec66abe
bed1390d
Merge remote-tracking branch 'origin/main'
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
6 deletions
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
sight_harmony/features/wdComponent/src/main/resources/base/media/icon_add_attention.webp
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
View file @
6651aef
...
...
@@ -142,14 +142,22 @@ export struct DynamicDetailComponent {
.margin({right: $r('app.float.margin_6')})
if(!StringUtils.isEmpty(this.followStatus)){
if (this.followStatus == '0') {
Text('+关注')
.width($r('app.float.margin_54'))
.height($r('app.float.margin_24'))
Row() {
Blank().layoutWeight(1)
Image($r('app.media.icon_add_attention'))
.width($r('app.float.vp_12'))
.height($r('app.float.vp_12'))
.margin({right:2})
Text('关注')
.textAlign(TextAlign.Center)
.fontSize($r('app.float.font_size_12'))
.fontColor($r('app.color.color_fff'))
Blank().layoutWeight(1)
}
.width($r('app.float.margin_54'))
.height($r('app.float.margin_24'))
.borderRadius($r('app.float.vp_3'))
.backgroundColor($r('app.color.color_ED2800'))
.fontColor($r('app.color.color_fff'))
.onClick(() => {
this.handleAccention()
})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
View file @
6651aef
...
...
@@ -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)
}
...
...
sight_harmony/features/wdComponent/src/main/resources/base/media/icon_add_attention.webp
0 → 100644
View file @
6651aef
No preview for this file type
Please
register
or
login
to post a comment