diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index b87b51092..0dc4838a2 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -32,7 +32,9 @@ onMounted(async () => { await getData(1); }); +const isLoadInbox = ref(false); const getData = async (index: number) => { + isLoadInbox.value = false; index === 1 && showLoader(); index != 0 && (await http @@ -67,6 +69,7 @@ const getData = async (index: number) => { messageError($q, e); }) .finally(() => { + isLoadInbox.value = true; hideLoader(); })); }; @@ -122,10 +125,10 @@ const totalInbox = ref(0); function onLoad(index: number, done: any) { const num = index === 1 ? 0 : index++; if (inboxList.value.length < totalInbox.value) { - setTimeout(() => { - getData(num); - done(); - }, 1000); + // setTimeout(() => { + getData(num); + done(); + // }, ); } } const thaiOptions: Intl.DateTimeFormatOptions = { @@ -225,7 +228,10 @@ const thaiOptions: Intl.DateTimeFormatOptions = { /> -