Bläddra i källkod

Merge branch 'xqc_question_comment'

jwyu 2 år sedan
förälder
incheckning
1a4600cee0
1 ändrade filer med 30 tillägg och 1 borttagningar
  1. 30 1
      src/components/QuestionComment.vue

+ 30 - 1
src/components/QuestionComment.vue

@@ -160,7 +160,13 @@ const delCommentHandle = ({community_question_comment_id},index) => {
             <text style="min-width:50px;">{{dataInfo.like_total || ''}}</text>
         </view>
     </div>
-
+    <!-- 精选留言模块 -->
+    <div class="hot-comment-wrap" v-if="dataInfo.commentInfo&&!dataInfo.commentInfo.show&&dataInfo.comment_list.length>0">
+        <template v-for="(item,index) in dataInfo.comment_list" :key="index">
+            <img class="avatar" :src="item.qa_avatar_url" alt="">
+            <span>{{item.comment}}</span>
+        </template>
+    </div>
     <!-- 评论区域 -->
     <div class="comment-list-wrapper" v-if="dataInfo.commentInfo &&dataInfo.commentInfo.show">
         <div class="write-cont">
@@ -304,4 +310,27 @@ const delCommentHandle = ({community_question_comment_id},index) => {
     bottom: 0;
     cursor: pointer;
 }
+
+.hot-comment-wrap{
+    background-color: #F9F9F9;
+    width: calc(100% + 60px);
+    position: relative;
+    left: -30px;
+    padding: 20px 30px;
+    line-height: 40px;
+    .avatar{
+        width: 28px;
+        height: 28px;
+        object-fit: cover;
+        margin-right: 8px;
+        vertical-align: middle;
+        border-radius: 50%;
+    }
+    span{
+        font-size: 16px;
+        color: #6666;
+        margin-right: 30px;
+        vertical-align: middle;
+    }
+}
 </style>