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-09 16:21:09 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f254631c19d59421858655835fe505c92f24c34f
f254631c
1 parent
fe964b6d
fix: 评论底部栏bug修复
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
8 deletions
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/MultiPictureDetailPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentTabComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/LikeComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
View file @
f254631
...
...
@@ -176,6 +176,7 @@ export struct ImageAndTextPageComponent {
contentDetailData: this.contentDetailData[0],
publishCommentModel: this.publishCommentModel,
operationButtonList: this.operationButtonList,
styleType: 1,
})
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/MultiPictureDetailPageComponent.ets
View file @
f254631
...
...
@@ -364,6 +364,7 @@ export struct MultiPictureDetailPageComponent {
contentDetailData: this.contentDetailData,
publishCommentModel: this.publishCommentModel,
operationButtonList: this.operationButtonList,
styleType: 2,
})
}
.transition(TransitionEffect.OPACITY.animation({ duration: this.duration, curve: Curve.Ease }).combine(
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentTabComponent.ets
View file @
f254631
...
...
@@ -15,6 +15,7 @@ export struct CommentTabComponent {
@State type: number = 1
@State placeHolder: string = '说两句...'
@State dialogController: CustomDialogController | null = null;
styleType : number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏)
/*回调方法*/
dialogControllerConfirm: () => void = () => {
}
...
...
@@ -69,6 +70,7 @@ export struct CommentIconComponent {
@ObjectLink publishCommentModel: publishCommentModel
/*展示类型*/
@State type: number = 1
styleType : number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏)
// aboutToAppear(): void {
// setTimeout(() => {
// this.publishCommentModel.totalCommentNumer = '444'
...
...
@@ -87,7 +89,9 @@ export struct CommentIconComponent {
build() {
Row() {
Stack({ alignContent: Alignment.TopEnd }) {
Image($r('app.media.comment_icon')).width(24).height(24)
// Image($r('app.media.comment_icon')).width(24).height(24)
Image(this.styleType == 1 ? $r('app.media.comment_icon') :
$r('app.media.comment_icon_white')).width(24).height(24)
// Stack({alignContent:Alignment.Start}) {
if (Number.parseInt(this.publishCommentModel.totalCommentNumer) != 0) {
RelativeContainer() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/LikeComponent.ets
View file @
f254631
...
...
@@ -14,6 +14,7 @@ export struct LikeComponent {
@Prop data: Record<string, string>
enableBtn = true
componentType : number = 1 //1: 底部栏目样式 2: 新闻页中间位置样式
styleType : number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏)
@State likeCount: number = 0 //点赞数
//上层传值 样例
...
...
@@ -81,7 +82,9 @@ export struct LikeComponent {
}else {
//1: 底部栏目样式 默认样式
Column() {
Image(this.likeStatus ? $r('app.media.icon_like_select') : $r('app.media.icon_like_default'))
// Image(this.likeStatus ? $r('app.media.icon_like_select') : $r('app.media.icon_like_default'))
Image(this.likeStatus ? $r('app.media.icon_like_select') : this.styleType == 1 ? $r('app.media.icon_like_default') :
$r('app.media.icon_like_default_white'))
.width(24)
.height(24)
.onClick(() => {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
View file @
f254631
...
...
@@ -50,6 +50,7 @@ export struct OperRowListView {
@Prop @Watch('onDetailUpdated') contentDetailData: ContentDetailDTO // 稿件详情
@State operationButtonList: string[] = ['comment', 'collect', 'share'] // 组件展示条件
@ObjectLink publishCommentModel: publishCommentModel
@State styleType: number = 1
// @State contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
@State interactData: InteractDataDTO = {} as InteractDataDTO
@State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态
...
...
@@ -59,8 +60,14 @@ export struct OperRowListView {
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
needLike: boolean = true
// async aboutToAppear() {
async aboutToAppear() {
console.info(TAG, '22222----', this.styleType)
console.info(TAG, '3333----', this.needLike)
this.handleStyle()
}
async onDetailUpdated() {
console.info(TAG, '111111----', this.styleType)
this.handleStyle()
if (!this.contentDetailData) {
return
}
...
...
@@ -98,7 +105,8 @@ export struct OperRowListView {
// AudioDialog()
Row() {
Column() {
Image($r('app.media.icon_arrow_left'))
Image(this.styleType == 1 ? $r('app.media.icon_arrow_left') :
$r('app.media.icon_arrow_left_white'))
.width(24)
.height(24)
.aspectRatio(1)
...
...
@@ -160,7 +168,7 @@ export struct OperRowListView {
Column() {
if (this.publishCommentModel?.targetId) {
CommentIconComponent({ publishCommentModel: this.publishCommentModel })
CommentIconComponent({ publishCommentModel: this.publishCommentModel
, styleType: this.styleType
})
}
}
.width(46)
...
...
@@ -174,7 +182,8 @@ export struct OperRowListView {
Column() {
if (this.likeBean?.contentId) {
LikeComponent({
data: this.likeBean
data: this.likeBean,
styleType: this.styleType
})
}
}
...
...
@@ -189,7 +198,8 @@ export struct OperRowListView {
Column() {
Stack({ alignContent: Alignment.TopEnd }) {
Image(this.newsStatusOfUser?.collectStatus == 1 ? $r('app.media.ic_collect_check1') :
$r('app.media.iv_live_comment_collect_un'))
this.styleType == 1 ? $r('app.media.iv_live_comment_collect_un') :
$r('app.media.iv_live_comment_collect_un_white'))
.width(24)
.height(24)
.interpolation(ImageInterpolation.High)
...
...
@@ -235,7 +245,8 @@ export struct OperRowListView {
@Builder
builderShare() {
Column() {
Image($r('app.media.iv_live_comment_share'))
Image(this.styleType == 1 ? $r('app.media.iv_live_comment_share') :
$r('app.media.iv_live_comment_share_white'))
.width(24)
.height(24)
.aspectRatio(1)
...
...
@@ -248,6 +259,14 @@ export struct OperRowListView {
.width(42)
}
handleStyle() {
if (this.styleType == 1) {
this.bgColor = Color.White
} else if (this.styleType == 2) {
this.bgColor = Color.Black
}
}
share() {
WDShare.shareContent(this.contentDetailData)
}
...
...
Please
register
or
login
to post a comment