fix(StudyDetailPage): 修复评论头像未显示的问题
当评论头像不存在时,使用默认头像代替,确保页面显示一致性和用户体验
Showing
1 changed file
with
4 additions
and
2 deletions
| ... | @@ -64,8 +64,8 @@ | ... | @@ -64,8 +64,8 @@ |
| 64 | <div v-for="comment in commentList" :key="comment.id" | 64 | <div v-for="comment in commentList" :key="comment.id" |
| 65 | class="border-b border-gray-100 last:border-b-0 py-4"> | 65 | class="border-b border-gray-100 last:border-b-0 py-4"> |
| 66 | <div class="flex"> | 66 | <div class="flex"> |
| 67 | - <!-- <img :src="comment.avatar" class="w-10 h-10 rounded-full flex-shrink-0" | 67 | + <img :src="comment.avatar || 'https://cdn.ipadbiz.cn/mlaj/images/icon_1.jpeg'" class="w-10 h-10 rounded-full flex-shrink-0" |
| 68 | - style="margin-right: 0.5rem;" /> --> | 68 | + style="margin-right: 0.5rem;" /> |
| 69 | <div class="flex-1 ml-3"> | 69 | <div class="flex-1 ml-3"> |
| 70 | <div class="flex justify-between items-center mb-1"> | 70 | <div class="flex justify-between items-center mb-1"> |
| 71 | <span class="font-medium text-gray-900">{{ comment.name }}</span> | 71 | <span class="font-medium text-gray-900">{{ comment.name }}</span> |
| ... | @@ -101,6 +101,8 @@ | ... | @@ -101,6 +101,8 @@ |
| 101 | <div v-for="comment in popupCommentList" :key="comment.id" | 101 | <div v-for="comment in popupCommentList" :key="comment.id" |
| 102 | class="border-b border-gray-100 last:border-b-0 py-4"> | 102 | class="border-b border-gray-100 last:border-b-0 py-4"> |
| 103 | <div class="flex"> | 103 | <div class="flex"> |
| 104 | + <img :src="comment.avatar || 'https://cdn.ipadbiz.cn/mlaj/images/icon_1.jpeg'" class="w-10 h-10 rounded-full flex-shrink-0" | ||
| 105 | + style="margin-right: 0.5rem;" /> | ||
| 104 | <div class="flex-1 ml-3"> | 106 | <div class="flex-1 ml-3"> |
| 105 | <div class="flex justify-between items-center mb-1"> | 107 | <div class="flex justify-between items-center mb-1"> |
| 106 | <span class="font-medium text-gray-900">{{ comment.name }}</span> | 108 | <span class="font-medium text-gray-900">{{ comment.name }}</span> | ... | ... |
-
Please register or login to post a comment