Przeglądaj źródła

问答显示评论总条数

Karsa 2 lat temu
rodzic
commit
cf088835e4
1 zmienionych plików z 5 dodań i 3 usunięć
  1. 5 3
      src/components/QuestionComment.vue

+ 5 - 3
src/components/QuestionComment.vue

@@ -145,8 +145,10 @@ const delCommentHandle = ({community_question_comment_id},index) => {
                 v-if="dataInfo.commentInfo &&dataInfo.commentInfo.show"
                 style="cursor:pointer;color:#F3A52F"
             >收起评论 <el-icon><ArrowUp /></el-icon></span>
-            <img src="@/assets/question/comment.png" alt="" class="icon" v-else @click="openCommentHandle">
-            <!-- <text v-if="dataInfo.comment_total">{{dataInfo.comment_total}}</text> -->
+            <template v-else>
+                <img src="@/assets/question/comment.png" alt="" class="icon"  @click="openCommentHandle">
+                <text style="min-width:50px;">{{dataInfo.comment_total || ''}}</text>
+            </template>
         </view>
         <view class="commetn-item-wrap" @click="setLikeHandle(1)">
             <img src="@/assets/question/like_act.png" alt="" v-if="dataInfo.op_type===1" class="icon">
@@ -215,7 +217,7 @@ const delCommentHandle = ({community_question_comment_id},index) => {
 		.icon {
 			width: 22px;
 			height: 22px;
-			margin-right: 10px;
+			margin-right: 6px;
             cursor: pointer;
 		}
 	}