<template>
<view class="comContainer">
<h4>评论:</h4>
<view class="readly" id="commentsBox">
<view class="readly-item" v-for="(item, index) in commentsList" :key="index">
<view class="nickName">{
{ item.nickName }}</view>
<view class="timeReply">
<view class="time">
<text>{
{ item.createTime }}</text>
</view>
<view class="reply" v-if="userId == replyId">
<!-- v-if="userId==replyId" -->
<text @tap="handleReply(index)">回复</text>
<text @tap="handleDelReply(item.commentId)">删除</text>
</view>
</view>
<view class="content">{
{ item.content }}</view>
<view v-if="item.replyContent || replyNum == index" class="replyBox">
<view class="replyCon" v-if="showReply">回复:{
{ item.replyContent }}</view>
<u--textarea class="replyInp" v-if="!showReply" v-model="replyVal" placeholder="回复..." autoHeight focus @confirm="keyReply(item.commentId)"></u--textarea>
</view>
</view>
</view>
<u--textarea v-model="inpVal" placeholder="请输入内容" height="140" count @confirm="handleConfirm"></u--textarea>
<view class="confirmBtn" @tap="handleConfirm">提交</view>
</view>
</template>
<script>
import config from '../..