zhenghy

评论输入框背景色

... ... @@ -366,8 +366,8 @@ export struct MultiPictureDetailPageComponent {
publishCommentModel: this.publishCommentModel,
operationButtonList: this.operationButtonList,
styleType: 2,
componentType:5,
MultiPictureComponentType:1
componentType: 5,
pageComponentType: 3
})
}
.transition(TransitionEffect.OPACITY.animation({ duration: this.duration, curve: Curve.Ease }).combine(
... ...
... ... @@ -12,7 +12,6 @@ export struct CommentTabComponent {
@ObjectLink publishCommentModel: publishCommentModel
@Prop contentDetail: ContentDetailDTO
@Prop pageComponentType: number = -1 //1:视频详情页 2:竖屏直播页
@Prop MultiPictureComponentType?: number = -1 // 1:图集详情页
/*展示类型*/
@State type: number = 1
@State placeHolder: string = '说两句...'
... ... @@ -44,6 +43,17 @@ export struct CommentTabComponent {
}
getCommentInputBackImg() {
if (this.pageComponentType === 2) {
return $r('app.media.comment_img_input_black')
} else if (this.pageComponentType === 3) {
return $r('app.media.comment_img_input_hui1')
} else {
return $r('app.media.comment_img_input_hui')
}
}
build() {
Row() {
Stack({ alignContent: Alignment.Start }) {
... ... @@ -68,8 +78,7 @@ export struct CommentTabComponent {
})
.id("RowBg")
} else {
Image(this.pageComponentType === 2 || this.MultiPictureComponentType === 1 ? $r('app.media.comment_img_input_black') :
$r('app.media.comment_img_input_hui'))
Image(this.getCommentInputBackImg())
.objectFit(ImageFit.Fill)
.resizable({
slice: {
... ...
... ... @@ -62,8 +62,7 @@ export struct OperRowListView {
* 7:图集详情页
*/
@Prop componentType: number = 1 //1: 底部栏目样式 2: 新闻页中间位置样式 3:动态Tab内容下的互动入口
@Prop pageComponentType?: number = -1 //1:视频详情页 2竖屏直播页
@Prop MultiPictureComponentType?: number = -1 // 1:图集详情页
@Prop pageComponentType?: number = -1 //1:视频详情页 2:竖屏直播页 3:图集
@State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
@Prop operationButtonList?: string[] = ['comment', 'collect', 'share'] // 组件展示条件
@State needLike: boolean = true
... ... @@ -194,7 +193,6 @@ export struct OperRowListView {
contentDetail: this.contentDetailData,
onCommentFocus: this.onCommentFocus,
pageComponentType: this.pageComponentType,
MultiPictureComponentType: this.MultiPictureComponentType
})
}
}
... ...