Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
tswj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2022-06-09 19:13:57 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
677dd89bef2d6f3babb4cac761ac483f64403556
677dd89b
1 parent
6bb2bfd3
✨ feat: 留言列表回复逻辑调整,新增一条需要删除一条保持长度
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
src/views/client/videoDetailComment.vue
src/views/client/videoDetailComment.vue
View file @
677dd89
...
...
@@ -43,7 +43,7 @@
</template>
</van-list>
<van-empty v-if="emptyStatus" class="custom-image" :image="no_image" description="暂无留言" />
<div style="height: 5rem;"
></div
>
<div style="height: 5rem;"
/
>
<div class="reply-btn" @click="setComment('', 'comment')">
<div class="text">写下你友善的留言</div>
</div>
...
...
@@ -270,6 +270,8 @@ const submitCommentBox = (note) => {
// 处理方法只能是插入相应的一条数据,这样就需要后台新增完成后,返回完整数据
_.each(commentList.value, comment => {
if (comment.id === commentId.value) {
// 后面新增一条,删除第一条,保存列表数量不变
comment.reply_list.shift()
comment.reply_list.push(res.data.data)
comment.total = comment.total + 1
}
...
...
Please
register
or
login
to post a comment