From b410367dee261faa14784a4315c5fbbbfb82d3f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9B=AE=E6=A3=83?= Date: Sat, 31 Aug 2024 14:06:50 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20=E5=B0=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/postReply/tpr-main.vue | 14 +++++++------- src/components/postReply/tpr-reply.vue | 3 +++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/components/postReply/tpr-main.vue b/src/components/postReply/tpr-main.vue index bd6415b2..5d895ebe 100644 --- a/src/components/postReply/tpr-main.vue +++ b/src/components/postReply/tpr-main.vue @@ -53,17 +53,11 @@ const loading = ref(false); async function showReply(): Promise { if (reply.value.length > 0) return; + if (isLast.value) return; await loadReply(); } async function loadReply(): Promise { - if (isLast.value) { - showSnackbar({ - text: "没有更多了", - color: "info", - }); - return; - } loading.value = true; const resp = await Mys.Post.reply(props.postId, props.gid, true, lastId.value); if ("retcode" in resp) { @@ -77,6 +71,12 @@ async function loadReply(): Promise { lastId.value = resp.last_id; reply.value = reply.value.concat(resp.list); loading.value = false; + if (isLast.value) { + showSnackbar({ + text: "没有更多了", + color: "info", + }); + } } async function handleSubReply(item: TGApp.Plugins.Mys.Reply.ReplyFull): Promise { diff --git a/src/components/postReply/tpr-reply.vue b/src/components/postReply/tpr-reply.vue index 49ea9753..9aeb66ae 100644 --- a/src/components/postReply/tpr-reply.vue +++ b/src/components/postReply/tpr-reply.vue @@ -4,6 +4,9 @@ class="tpr-bubble" v-if="props.modelValue.user.reply_bubble !== null" :title="props.modelValue.user.reply_bubble.name" + :style="{ + backgroundColor: props.modelValue.user.reply_bubble.bg_color, + }" > bubble