แก้โหลดข้อมความเก่าไม่ได้

This commit is contained in:
Net 2024-02-16 16:21:19 +07:00
parent 8de2743eb1
commit 33d5dd4d30

View file

@ -18,7 +18,6 @@ const iconAvatar = ref<string>(
);
const { scrollContainer } = storeToRefs(store);
function dateIssue(timestamp: string): string {
const parsedTimestamp = moment(timestamp);
const diff = moment().diff(parsedTimestamp);
@ -63,8 +62,8 @@ const onLoad = (async (_: any, done: any) => {
const totalPages = Math.ceil((store.currentTotalMessage || 1) / 30);
if (store.currentPage && totalPages > store.currentPage) {
await store.loadMessage(store.currentPage + 1);
done();
}
done();
}) satisfies QInfiniteScrollProps["onLoad"];
</script>
@ -246,7 +245,12 @@ const onLoad = (async (_: any, done: any) => {
style="width: 100%; height: 100%"
v-if="store.message?.result.message.length || 0 > 0"
>
<q-infinite-scroll @load="onLoad" :offset="250" reverse>
<q-infinite-scroll
@load="onLoad"
:offset="250"
reverse
:key="store.currentIssue"
>
<div
v-for="(item, index) in store.message?.result.message"
:key="index"