deming/components/mine/comment/index.vue
2020-07-29 19:01:10 +08:00

68 lines
1.3 KiB
Vue

<template>
<view class="comment">
<view class="user-info">
<image :src="info.member_avatar" class="user-avatar"></image>
<view class="user-name">{{ info.member_nickname }}</view>
</view>
<view class="user-comment">
<view class="text u-line-2">{{ info.comment }}</view>
<view class="image">
<image v-for="(src, index) in info.images" :key="index" :src="src" mode="aspectFit"></image>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {}
},
props: {
info: Object,
}
};
</script>
<style lang="scss" scoped>
.comment {
padding: 30rpx;
width: 750rpx;
background: rgba(255,255,255,1);
.user-info {
display: flex;
align-items: center;
margin-bottom: 19rpx;
.user-avatar {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
margin-right: 20rpx;
}
.user-name {
font-size: 26rpx;
color: rgba(153,153,153,1);
}
}
.user-comment {
.text {
font-size: 26rpx;
color: rgba(51,51,51,1);
line-height: 40rpx;
margin-bottom: 19rpx;
}
.image {
display: flex;
flex-wrap: wrap;
> image {
width: 210rpx;
height: 210rpx;
border-radius: 10rpx;
margin-bottom: 20rpx;
flex-shrink: 0;
&:not(:nth-child(3n)) {
margin-right: 30rpx;
}
}
}
}
}
</style>