From eac3a52a81a0373cc9f9ffb30846a38288e6fc26 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 19 Jan 2024 16:10:58 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=94=E0=B8=B1=E0=B8=81=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B9=82=E0=B8=AB=E0=B8=A5=E0=B8=94=20=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B9=81=E0=B8=88=E0=B9=89=E0=B8=87=E0=B9=80?= =?UTF-8?q?=E0=B8=95=E0=B8=B7=E0=B8=AD=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/MainLayout.vue | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 2b01d56d4..f73b5be60 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -454,11 +454,16 @@ const round = ref(0); const page = ref(0); function onLoad(index: any, done: any) { - page.value++; - setTimeout(() => { - done(); - getDataNotification(page.value, "NOMAL"); - }, 1500); + if ( + notiList.value.length < totalInbox.value || + (notiList.value.length === 0 && totalInbox.value === 0) + ) { + page.value++; + setTimeout(() => { + done(); + getDataNotification(page.value, "NOMAL"); + }, 1500); + } } watch( @@ -545,10 +550,16 @@ watch( -
+
@@ -581,7 +592,13 @@ watch( -