chenquansheng

fix |> 图文评论昵称与评论内容间距调整及点击正文和评论数页面锚点修改

... ... @@ -248,34 +248,24 @@ export struct ImageAndTextPageComponent {
console.log(TAG, "点击滑动页面", JSON.stringify(info))
//评论区当前位置
// let currentCommonentOffSetY = this.info?.globalPosition.y as number
// let offSetY = 0
// if (currentCommonentOffSetY >= (this.screenHeight-this.bottomHeight) ) {
// offSetY = currentCommonentOffSetY-200
// this.showMainText = true
// }else {
// this.showMainText = false
// }
// this.scroller.scrollTo({
// yOffset: offSetY,
// xOffset: 0,
// animation: { duration: 1000, curve: Curve.Ease }
// })
if (!this.offsetY) {
this.offsetY = componentUtils.getRectangleById('comment').windowOffset.y
let currentCommonentOffSetY = this.info?.globalPosition.y as number
let offSetY = 0
if (currentCommonentOffSetY >= (this.screenHeight-this.bottomHeight) ) {
offSetY = currentCommonentOffSetY-200
}
// if (!this.offsetY) {
// this.offsetY = componentUtils.getRectangleById('comment').windowOffset.y
// }
// 定位到评论区域
if (this.isScrollTop) {
this.scroller.scrollTo({
xOffset: 0,
yOffset: this.offsetY,
yOffset: offSetY,
animation: { duration: 1000, curve: Curve.Ease }
})
// this.showMainText = true
} else {
this.scroller.scrollEdge(Edge.Top)
// this.showMainText = false
}
this.isScrollTop = !this.isScrollTop
}
... ...
... ... @@ -489,7 +489,7 @@ struct ChildCommentItem {
fontWeight: FontWeight.Regular,
marginWidth: (95 + 16)
})
.margin({ left: 95, right: 16, top: -12 })
.margin({ left: 95, right: 16, top: -15 })
.onClick(() => {
this.replyComment()
})
... ... @@ -702,7 +702,7 @@ struct commentHeaderView {
fontWeight: FontWeight.Regular,
marginWidth: (59 + 16)
})
.margin({ left: 60, right: 16,top:-12 })
.margin({ left: 60, right: 16,top:-15 })
.onClick(() => {
this.replyComment()
})
... ...