commentCard.vue 1.6 KB
<template>
	<view class="comment_card" :class="{isPadding: isPadding}">
		<CommentRate></CommentRate>
		<view class="comment_content u-line-2">
			不错不错,这个地方环境非常好,水饮料种类也很多,非常推荐过来,尤其是附近的小伙伴一定要过来看看
		</view>
		<!-- 评价图片 -->
		<u-album :urls="urls2" :rowCount="4"></u-album>
	</view>
</template>

<script>
	import CommentRate from './commentRate.vue'
	export default{
		components: { CommentRate },
		props: {
			isPadding: {
				type: Boolean,
				default: false
			}
		},
		data(){
			return {
				urls2: [
					'https://cdn.uviewui.com/uview/album/1.jpg',
					'https://cdn.uviewui.com/uview/album/2.jpg',
					'https://cdn.uviewui.com/uview/album/3.jpg',
					'https://cdn.uviewui.com/uview/album/4.jpg',
					'https://cdn.uviewui.com/uview/album/5.jpg',
					'https://cdn.uviewui.com/uview/album/6.jpg',
					'https://cdn.uviewui.com/uview/album/7.jpg',
					'https://cdn.uviewui.com/uview/album/8.jpg',
					'https://cdn.uviewui.com/uview/album/9.jpg',
					'https://cdn.uviewui.com/uview/album/10.jpg'
				]
			}
		}
	}
</script>

<style scoped lang="scss">
	.comment_card{
		margin-bottom: 40rpx;
		background-color: #fff;
	}
	.isPadding{
		border-radius: 16rpx;
		padding: 30rpx 24rpx 40rpx;
	}
	.comment_content{
		color: #333;
		font-size: 24rpx;
		line-height: 40rpx;
		margin: 24rpx 0 18rpx 0;
	}
	.album {
		@include flex;
		align-items: flex-start;
	
		&__avatar {
		 background-color: $u-bg-color;
		 padding: 5px;
		 border-radius: 3px;
		}
	
		&__content {
			 margin-left: 10px;
			 flex: 1;
		}
	}
</style>