xugenyuan

ref |> 调整评论弹框滑动评论时,固定全部评论标题栏

Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
... ... @@ -23,6 +23,7 @@ const testString = '因为读书的人\n是低ç€å¤´å‘上看的人\n身处一éš
export struct CommentComponent {
private onCloseClick = () => {
}
showTitleComponent: boolean = true
@Prop showCloseIcon?: boolean = false
@State hasMore: boolean = true;
@State currentPage: number = 1;
... ... @@ -168,7 +169,9 @@ export struct CommentComponent {
build() {
Column() {
List({ scroller: this.listScroller }) {
if (this.showTitleComponent) {
ListItemGroup({ header: this.titleHeader() })
}
if (!this.isComments) {
EmptyComponent({ emptyType: 17 })
... ...
... ... @@ -88,17 +88,13 @@ struct CommentListDialog {
build() {
Column() {
this.titleHeaderView()
CommentComponent({
publishCommentModel: this.publishCommentModel,
showCloseIcon: true,
fixedHeightMode: true,
onCloseClick: () => {
this.controller!.close()
if (this.onClose) {
this.onClose()
}
},
inDialog: true
inDialog: true,
showTitleComponent: false
}).layoutWeight(1)
OperRowListView({
... ... @@ -119,4 +115,33 @@ struct CommentListDialog {
.height(this.windowHeight - this.windowWidth * 9 / 16 + 'px')
.backgroundColor(Color.White)
}
@Builder titleHeaderView() {
Row() {
Row() {
Image($r('app.media.redLine'))
.height(16)
.width(3)
Text('全部评论')
.fontSize(18)// .fontColor('#222222')
.fontColor($r('app.color.color_222222'))
.fontWeight(FontWeight.Medium)
.margin({ left: 5 })
}
.margin({ left: 16 })
Image($r('app.media.close_button'))
.height(16)
.width(16)
.margin({ right: 16 })// .visibility(this.showCloseIcon ? Visibility.Visible : Visibility.Hidden)
.onClick(() => {
if (this.onClose) {
this.onClose()
}
})
}
.height(44)
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
}
}
\ No newline at end of file
... ...