ปรับ กล่องข้อความ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-01-19 11:35:44 +07:00
parent e8d1b5eaaf
commit f0d8f9d7e0
2 changed files with 9 additions and 18 deletions

View file

@ -124,11 +124,11 @@ const scrollTargetRef = ref<any>(null);
const totalInbox = ref<number>(0); const totalInbox = ref<number>(0);
function onLoad(index: number, done: any) { function onLoad(index: number, done: any) {
const num = index === 1 ? 0 : index++; const num = index === 1 ? 0 : index++;
if (inboxList.value.length < totalInbox.value) { if (inboxList.value.length < totalInbox.value && isLoadInbox) {
// setTimeout(() => { setTimeout(() => {
getData(num); getData(num);
done(); done();
// }, ); }, 3000);
} }
} }
const thaiOptions: Intl.DateTimeFormatOptions = { const thaiOptions: Intl.DateTimeFormatOptions = {
@ -228,10 +228,7 @@ const thaiOptions: Intl.DateTimeFormatOptions = {
/> />
</q-list> </q-list>
<template <template v-slot:loading v-if="inboxList.length < totalInbox">
:v-slot:isLoadInbox?loading:null
v-if="inboxList.length < totalInbox"
>
<div class="row justify-center q-my-md"> <div class="row justify-center q-my-md">
<q-spinner-dots color="primary" size="40px" /> <q-spinner-dots color="primary" size="40px" />
</div> </div>

View file

@ -453,11 +453,11 @@ const totalNoti = ref<number>(0);
const round = ref<number>(0); const round = ref<number>(0);
function onLoad(index: any, done: any) { function onLoad(index: any, done: any) {
if (notiList.value.length < totalInbox.value) { if (notiList.value.length < totalInbox.value && isLoad) {
setTimeout(() => { setTimeout(() => {
done(); done();
getDataNotification(index + 1, "NOMAL"); getDataNotification(index + 1, "NOMAL");
}, 1000); }, 3000);
} }
} }
@ -584,13 +584,7 @@ watch(
</q-item> </q-item>
<q-separator color="grey-2" /> <q-separator color="grey-2" />
</q-list> </q-list>
<template <template v-if="notiList.length < totalInbox">
:v-slot:isLoad?
loading
:
null,
v-if="notiList.length < totalInbox"
>
<div class="row justify-center q-my-md"> <div class="row justify-center q-my-md">
<q-spinner-dots color="primary" size="40px" /> <q-spinner-dots color="primary" size="40px" />
</div> </div>