hookehuyr

🎈 perf: δΌ˜εŒ–δ½œε“η•™θ¨€ε›žε€ι€»θΎ‘

......@@ -27,7 +27,7 @@
<van-col offset="4" span="20">
<div v-if="item.total" class="reply-wrapper">
<template v-for="(reply, index) in item.reply_list" :key="index">
<p v-if="reply.reply_to && index <= 3">
<p v-if="reply.reply_to && index <= reply_limit">
<span>{{ reply.name }}</span>
&nbsp;ε›žε€&nbsp;
<span>@{{ reply.reply_to }}: </span>
......@@ -271,8 +271,9 @@ const submitCommentBox = (note) => {
_.each(commentList.value, comment => {
if (comment.id === commentId.value) {
// εŽι’ζ–°ε’žδΈ€ζ‘οΌŒεˆ ι™€η¬¬δΈ€ζ‘οΌŒδΏε­˜εˆ—θ‘¨ζ•°ι‡δΈε˜
comment.reply_list.shift()
comment.reply_list.push(res.data.data)
// ε›žε€ζ•°ι‡ε€§δΊŽζŽ§εˆΆζ•°ι‡ζ—Άζ‰ζ‰§θ‘Œ
comment.reply_list.length > reply_limit.value ? comment.reply_list.shift() : '';
comment.total = comment.total + 1
}
})
......