效果图:
代码如下:
<template>
<view>
<view class="comments">
<view class="comments-items" v-for="(item, index) in commentContents" :key="index">
<image :src="item.face" class="comments-face"></image>
<view class="comments-body">
<view class="comments-header">{
{
item.name}}</view>
<view class="comments-content">
{
{
item.content}}
</view>
<view class="comments-info">
<text class="grey" style="font-size: 24rpx;">昨天 19:30</text>
<text class="comments-replay-btn" @click="replay()">回复</text>
</view>
<view class="comments-reply">
<view class="reply">
<view class="comments-items " v-for="(item2, index2) in item.reply" :key="index2">
<image :src="item2.face" class="comments-face"></image>
<view class="comments-body">
<view class="comments-header">
{
{
item2.name}}
<template v-if="item2.reply_name">
<svg t="1600674701420" class="icon reply-more-icon-rotate" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/200