mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-12 09:18:14 +08:00
🎨 小优化
This commit is contained in:
@@ -53,17 +53,11 @@ const loading = ref<boolean>(false);
|
||||
|
||||
async function showReply(): Promise<void> {
|
||||
if (reply.value.length > 0) return;
|
||||
if (isLast.value) return;
|
||||
await loadReply();
|
||||
}
|
||||
|
||||
async function loadReply(): Promise<void> {
|
||||
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<void> {
|
||||
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<void> {
|
||||
|
||||
@@ -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,
|
||||
}"
|
||||
>
|
||||
<img :src="props.modelValue.user.reply_bubble.url" alt="bubble" />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user