|
|
@@ -195,19 +195,22 @@
|
|
|
<div v-for="message in commentTree" :key="message.id" class="comment-body">
|
|
|
<div class="comment-main">
|
|
|
<el-row style="font-weight: bold; margin-bottom: 10px">
|
|
|
- <el-col>{{ message.mainMessage.sender.name }}</el-col>
|
|
|
- <el-col>{{ message.mainMessage.createdAt.substring(0, 16) }}</el-col>
|
|
|
+ <el-col>{{ message.messages[message.mainId].sender.name }}</el-col>
|
|
|
+ <el-col>{{ message.messages[message.mainId].createdAt.substring(0, 16) }}</el-col>
|
|
|
</el-row>
|
|
|
- <el-row>{{ message.mainMessage.content }}</el-row>
|
|
|
+ <el-row>{{ message.messages[message.mainId].content }}</el-row>
|
|
|
</div>
|
|
|
- <div v-for="child in message.children" :key="child.id" class="comment-child">
|
|
|
- <el-row style="font-weight: bold; margin-bottom: 10px">{{ child.sender.name }}</el-row>
|
|
|
- <el-row>@{{ child.target.sender.username }}:{{ child.content }}</el-row>
|
|
|
+ <div v-for="(key,child) in message.messages" :key="'message'+key" class="comment-child">
|
|
|
+ <el-row v-if="child.targetType==='COURSE'" style="font-weight: bold; margin-bottom: 10px">
|
|
|
+ {{ child.sender.name }}
|
|
|
+ </el-row>
|
|
|
+ <el-row v-if="child.targetType==='COURSE'">
|
|
|
+ @{{ message.messages[child.targetId].sender.name }}:{{ message.messages[child.targetId].content }}
|
|
|
+ </el-row>
|
|
|
</div>
|
|
|
<el-divider/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- commentTree: {{ commentTree }}-->
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-card>
|