bayi 2 år sedan
förälder
incheckning
9f809c3b45

+ 8 - 0
components/comment/index.js

@@ -174,5 +174,13 @@ Component({
         url: `/pages/personal/index?uid=${currentTarget.dataset.uid}&type=user`,
       })
     },
+    onLongPress(e) {
+      wx.showActionSheet({
+        itemList: ['删除评论'],
+        success(res) {
+          console.log(res.tapIndex)
+        },
+      })
+    },
   }
 })

+ 3 - 0
components/comment/index.less

@@ -91,7 +91,10 @@
               letter-spacing: 2rpx;
               padding: 24rpx 0rpx;
               font-size: 30rpx;
+              word-break: break-all;
               color: rgba(0, 0, 0, 0.7);
+
+
             }
 
             .replyList {

+ 3 - 1
components/comment/index.wxml

@@ -17,7 +17,9 @@
             <view class="nickName">
               {{item.user.nickName||item.user.eid}}
             </view>
-            <view class="detailDesc">{{item.detailDesc}}</view>
+            <view class="detailDesc" data-item='{{item}}' bind:longpress="onLongPress">
+              {{item.detailDesc}}
+            </view>
             <view class="replyList" wx:if="{{item.replyVOList.length>0}}">
               <view class="reply" wx:for="{{item.replyVOList}}" wx:for-item="reply" wx:key='id'>
                 <text class="replyTitle">{{reply.user.nickName||reply.user.eid}}</text>

+ 1 - 0
components/comment/index.wxss

@@ -84,6 +84,7 @@
   letter-spacing: 2rpx;
   padding: 24rpx 0rpx;
   font-size: 30rpx;
+  word-break: break-all;
   color: rgba(0, 0, 0, 0.7);
 }
 .commentBox .comment .body .body-box .content .c-right .replyList {