xugenyuan

ref |> 增加评论长按手势识别

Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
@@ -494,10 +494,26 @@ struct ChildCommentItem { @@ -494,10 +494,26 @@ struct ChildCommentItem {
494 .onClick(() => { 494 .onClick(() => {
495 this.replyComment() 495 this.replyComment()
496 }) 496 })
  497 + .gesture(
  498 + LongPressGesture()
  499 + .onAction((event: GestureEvent|undefined)=>{
  500 + if (event) {
  501 + //TODO: 显示功能菜单
  502 + }
  503 + })
  504 + )
497 if (this.item.commentPics.length > 0) { 505 if (this.item.commentPics.length > 0) {
498 Image(this.item.commentPics) 506 Image(this.item.commentPics)
499 .width(88).height(88) 507 .width(88).height(88)
500 .margin({top: 6 + (this.item.commentContent.length > 0 ? 0 : 15), left: this.leftGap}) 508 .margin({top: 6 + (this.item.commentContent.length > 0 ? 0 : 15), left: this.leftGap})
  509 + .gesture(
  510 + LongPressGesture()
  511 + .onAction((event: GestureEvent|undefined)=>{
  512 + if (event) {
  513 + //TODO: 显示功能菜单
  514 + }
  515 + })
  516 + )
501 } 517 }
502 518
503 commentFooterView({ 519 commentFooterView({
@@ -718,11 +734,27 @@ struct commentHeaderView { @@ -718,11 +734,27 @@ struct commentHeaderView {
718 .onClick(() => { 734 .onClick(() => {
719 this.replyComment() 735 this.replyComment()
720 }) 736 })
  737 + .gesture(
  738 + LongPressGesture()
  739 + .onAction((event: GestureEvent|undefined)=>{
  740 + if (event) {
  741 + //TODO: 显示功能菜单
  742 + }
  743 + })
  744 + )
721 745
722 if (this.item.commentPics.length > 0) { 746 if (this.item.commentPics.length > 0) {
723 Image(this.item.commentPics) 747 Image(this.item.commentPics)
724 .width(88).height(88) 748 .width(88).height(88)
725 .margin({top: 6 + (this.item.commentContent.length > 0 ? 0 : 15), left: this.leftGap}) 749 .margin({top: 6 + (this.item.commentContent.length > 0 ? 0 : 15), left: this.leftGap})
  750 + .gesture(
  751 + LongPressGesture()
  752 + .onAction((event: GestureEvent|undefined)=>{
  753 + if (event) {
  754 + //TODO: 显示功能菜单
  755 + }
  756 + })
  757 + )
726 } 758 }
727 759
728 commentFooterView({ 760 commentFooterView({