<template>
	<view class="card-appraise-line" v-if="reply == false">
		<text class="commentator">{{reviewer}}：</text>
		<read-text :text="content" limit="30"></read-text>
	</view>
	<view class="card-appraise-line" v-else>
		<text class="commentator">{{reply}}</text>
		<text class="reply">回复</text>
		<text class="commentator">{{reviewer}}：</text>
		<read-text :text="content" limit="30"></read-text>
	</view>
</template>

<script>
	import readText from "../read-text/read-text"
	export default {
		props: {
			reviewer: {
				type: String,
				required: true
			},
			reply: {
				type: String,
				required: false
			},
			content: {
				type: String,
				required: true
			}
		},
		data() {
			return {}
		}
	}
</script>

<style scoped>
	.card-appraise-line {
		margin: 10rpx 0rpx;
	}

	.card-appraise-line .commentator {
		color: #275fb5;
	}

	.card-appraise .card-appraise-line .reply {
		margin: 0 10rpx;
		display: inline-block;
	}

	.reply {
		margin: 0 10rpx;
	}
</style>
