|
|
@ -10,9 +10,9 @@ |
|
|
|
<view class="username">{{ item.userName }}</view> |
|
|
|
<view class="comment-content" v-html="$utils.stringFormatHtml(item.userValue)"></view> |
|
|
|
<view class="comment-meta"> |
|
|
|
<text class="time">{{ item.createTime }}</text> |
|
|
|
<text class="location">贵州</text> |
|
|
|
<text class="reply-btn" @click.stop="handleReply">回复</text> |
|
|
|
<text class="time">{{ $timeUtils.formatTime(item.createTime) }}</text> |
|
|
|
<!-- <text class="location">贵州</text> --> |
|
|
|
<text class="reply-btn" @click.stop="handleReply(0)">回复</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -41,7 +41,8 @@ |
|
|
|
</view> |
|
|
|
<view class="sub-comment-content" v-html="$utils.stringFormatHtml(subComment.userValue)"></view> |
|
|
|
<view class="sub-comment-meta"> |
|
|
|
<text class="sub-time">{{ subComment.createTime }}</text> |
|
|
|
<text class="sub-time">{{ $timeUtils.formatTime(subComment.createTime) }}</text> |
|
|
|
<!-- <text class="location">贵州</text> --> |
|
|
|
<text class="sub-reply-btn" @click.stop="handleSubReply(subComment)">回复</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -111,12 +112,18 @@ |
|
|
|
|
|
|
|
// 处理回复 |
|
|
|
handleReply() { |
|
|
|
this.$emit('reply', this.item); |
|
|
|
this.$emit('reply', { |
|
|
|
item : this.item, |
|
|
|
level : 0, |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 处理子评论回复 |
|
|
|
handleSubReply(subComment) { |
|
|
|
this.$emit('reply', subComment); |
|
|
|
this.$emit('reply', { |
|
|
|
item : subComment, |
|
|
|
level : 1, |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -125,20 +132,20 @@ |
|
|
|
<style scoped lang="scss"> |
|
|
|
.comment { |
|
|
|
background-color: #fff; |
|
|
|
padding: 30rpx 40rpx; |
|
|
|
margin-bottom: 2rpx; |
|
|
|
border-bottom: 2rpx solid #f5f5f5; |
|
|
|
padding: 26.25rpx 35rpx; |
|
|
|
margin-bottom: 1.75rpx; |
|
|
|
border-bottom: 1.75rpx solid #f5f5f5; |
|
|
|
|
|
|
|
.comment-header { |
|
|
|
display: flex; |
|
|
|
align-items: flex-start; |
|
|
|
|
|
|
|
.avatar { |
|
|
|
width: 80rpx; |
|
|
|
height: 80rpx; |
|
|
|
width: 70rpx; |
|
|
|
height: 70rpx; |
|
|
|
border-radius: 50%; |
|
|
|
overflow: hidden; |
|
|
|
margin-right: 20rpx; |
|
|
|
margin-right: 17.5rpx; |
|
|
|
flex-shrink: 0; |
|
|
|
|
|
|
|
image { |
|
|
@ -151,40 +158,41 @@ |
|
|
|
flex: 1; |
|
|
|
|
|
|
|
.username { |
|
|
|
font-size: 28rpx; |
|
|
|
font-size: 24.5rpx; |
|
|
|
font-weight: 600; |
|
|
|
color: $uni-text-color; |
|
|
|
margin-bottom: 8rpx; |
|
|
|
margin-bottom: 7rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.comment-content { |
|
|
|
font-size: 30rpx; |
|
|
|
font-size: 26.25rpx; |
|
|
|
line-height: 1.5; |
|
|
|
color: $uni-text-color; |
|
|
|
margin-bottom: 12rpx; |
|
|
|
margin-bottom: 10.5rpx; |
|
|
|
word-break: break-all; |
|
|
|
} |
|
|
|
|
|
|
|
.comment-meta { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
font-size: 24rpx; |
|
|
|
font-size: 21rpx; |
|
|
|
color: $uni-text-color-grey; |
|
|
|
|
|
|
|
.time { |
|
|
|
margin-right: 20rpx; |
|
|
|
margin-right: 17.5rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.location { |
|
|
|
margin-right: 20rpx; |
|
|
|
margin-right: 17.5rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.reply-btn { |
|
|
|
color: $uni-text-color-grey; |
|
|
|
padding: 8rpx 16rpx; |
|
|
|
padding: 7rpx 14rpx; |
|
|
|
background-color: #f5f5f5; |
|
|
|
border-radius: 20rpx; |
|
|
|
font-size: 22rpx; |
|
|
|
border-radius: 17.5rpx; |
|
|
|
font-size: 19.25rpx; |
|
|
|
margin-left: auto; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -193,27 +201,27 @@ |
|
|
|
.images { |
|
|
|
display: flex; |
|
|
|
flex-wrap: wrap; |
|
|
|
margin-top: 20rpx; |
|
|
|
margin-left: 100rpx; |
|
|
|
margin-top: 17.5rpx; |
|
|
|
margin-left: 87.5rpx; |
|
|
|
|
|
|
|
.image { |
|
|
|
margin: 10rpx; |
|
|
|
margin: 8.75rpx; |
|
|
|
|
|
|
|
image { |
|
|
|
height: 120rpx; |
|
|
|
width: 120rpx; |
|
|
|
border-radius: 12rpx; |
|
|
|
height: 105rpx; |
|
|
|
width: 105rpx; |
|
|
|
border-radius: 10.5rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 子评论列表样式 |
|
|
|
.sub-comments-list { |
|
|
|
margin-top: 20rpx; |
|
|
|
margin-left: 100rpx; |
|
|
|
margin-top: 17.5rpx; |
|
|
|
margin-left: 87.5rpx; |
|
|
|
|
|
|
|
.sub-comment-item { |
|
|
|
margin-bottom: 30rpx; |
|
|
|
margin-bottom: 26.25rpx; |
|
|
|
|
|
|
|
&:last-child { |
|
|
|
margin-bottom: 0; |
|
|
@ -224,11 +232,11 @@ |
|
|
|
align-items: flex-start; |
|
|
|
|
|
|
|
.sub-avatar { |
|
|
|
width: 60rpx; |
|
|
|
height: 60rpx; |
|
|
|
width: 52.5rpx; |
|
|
|
height: 52.5rpx; |
|
|
|
border-radius: 50%; |
|
|
|
overflow: hidden; |
|
|
|
margin-right: 16rpx; |
|
|
|
margin-right: 14rpx; |
|
|
|
flex-shrink: 0; |
|
|
|
|
|
|
|
image { |
|
|
@ -241,47 +249,47 @@ |
|
|
|
flex: 1; |
|
|
|
|
|
|
|
.sub-username { |
|
|
|
font-size: 26rpx; |
|
|
|
font-size: 22.75rpx; |
|
|
|
font-weight: 600; |
|
|
|
color: $uni-text-color; |
|
|
|
margin-bottom: 6rpx; |
|
|
|
margin-bottom: 5.25rpx; |
|
|
|
|
|
|
|
.reply-to { |
|
|
|
font-size: 24rpx; |
|
|
|
font-size: 21rpx; |
|
|
|
color: $uni-color-primary; |
|
|
|
font-weight: 500; |
|
|
|
margin-left: 10rpx; |
|
|
|
margin-left: 8.75rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.sub-comment-content { |
|
|
|
font-size: 28rpx; |
|
|
|
font-size: 24.5rpx; |
|
|
|
line-height: 1.5; |
|
|
|
color: $uni-text-color; |
|
|
|
margin-bottom: 10rpx; |
|
|
|
margin-bottom: 8.75rpx; |
|
|
|
word-break: break-all; |
|
|
|
} |
|
|
|
|
|
|
|
.sub-comment-meta { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
font-size: 22rpx; |
|
|
|
font-size: 19.25rpx; |
|
|
|
color: $uni-text-color-grey; |
|
|
|
|
|
|
|
.sub-time { |
|
|
|
margin-right: 16rpx; |
|
|
|
margin-right: 14rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.sub-location { |
|
|
|
margin-right: 16rpx; |
|
|
|
margin-right: 14rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.sub-reply-btn { |
|
|
|
color: $uni-text-color-grey; |
|
|
|
padding: 6rpx 12rpx; |
|
|
|
padding: 5.25rpx 10.5rpx; |
|
|
|
background-color: #f5f5f5; |
|
|
|
border-radius: 16rpx; |
|
|
|
font-size: 20rpx; |
|
|
|
border-radius: 14rpx; |
|
|
|
font-size: 17.5rpx; |
|
|
|
margin-left: auto; |
|
|
|
} |
|
|
|
} |
|
|
@ -291,17 +299,17 @@ |
|
|
|
.sub-comment-images { |
|
|
|
display: flex; |
|
|
|
flex-wrap: wrap; |
|
|
|
margin-top: 12rpx; |
|
|
|
margin-left: 76rpx; |
|
|
|
margin-top: 10.5rpx; |
|
|
|
margin-left: 66.5rpx; |
|
|
|
|
|
|
|
.sub-image { |
|
|
|
margin-right: 8rpx; |
|
|
|
margin-bottom: 8rpx; |
|
|
|
margin-right: 7rpx; |
|
|
|
margin-bottom: 7rpx; |
|
|
|
|
|
|
|
image { |
|
|
|
width: 96rpx; |
|
|
|
height: 96rpx; |
|
|
|
border-radius: 8rpx; |
|
|
|
width: 84rpx; |
|
|
|
height: 84rpx; |
|
|
|
border-radius: 7rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -309,16 +317,15 @@ |
|
|
|
} |
|
|
|
|
|
|
|
.load-more-section { |
|
|
|
margin-top: 20rpx; |
|
|
|
margin-left: 100rpx; |
|
|
|
margin-left: 87.5rpx; |
|
|
|
|
|
|
|
.load-more-btn { |
|
|
|
display: inline-flex; |
|
|
|
align-items: center; |
|
|
|
padding: 8rpx 16rpx; |
|
|
|
padding: 7rpx 14rpx; |
|
|
|
background-color: #f5f5f5; |
|
|
|
border-radius: 20rpx; |
|
|
|
font-size: 24rpx; |
|
|
|
border-radius: 17.5rpx; |
|
|
|
font-size: 21rpx; |
|
|
|
color: $uni-text-color-grey; |
|
|
|
} |
|
|
|
} |
|
|
|