From 4ab03e9c4b094d0ed4f12dfcd86d9ee666fee578 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 19 Jan 2024 15:24:40 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B9=81=E0=B8=88?= =?UTF-8?q?=E0=B9=89=E0=B8=87=E0=B9=80=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/Dashboard.vue | 2 +- src/views/MainLayout.vue | 51 +++++++++++++++++----------------------- 2 files changed, 23 insertions(+), 30 deletions(-) diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index 212404cf1..ce5834086 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -157,7 +157,7 @@ const thaiOptions: Intl.DateTimeFormatOptions = {
กล่องข้อความ
-
ทั้งหมด {{ totalInbox }} ข้อความ
+
ทั้งหมด {{ totalInbox }} ข้อความ
diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 83a56c48b..d43318725 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -451,14 +451,14 @@ const clickDelete = async (id: string, index: number) => { const totalInbox = ref(0); const totalNoti = ref(0); const round = ref(0); +const page = ref(0); function onLoad(index: any, done: any) { - if (notiList.value.length < totalInbox.value && isLoad) { - setTimeout(() => { - done(); - getDataNotification(index + 1, "NOMAL"); - }, 3000); - } + page.value++; + setTimeout(() => { + done(); + getDataNotification(page.value, "NOMAL"); + }, 1500); } watch( @@ -471,9 +471,6 @@ watch( })); notiList.value = updatedNotifications; fetchmsgNoread(); - } else { - round.value++; - round.value === 1 && getDataNotification(round.value, "NOMAL"); } } ); @@ -534,27 +531,21 @@ watch( v-if="totalNoti !== 0" >{{ totalNoti }} - -
+ +
การแจ้งเตือน
-
ทั้งหมด {{ totalInbox }} ข้อความ
+
+ ทั้งหมด {{ totalInbox }} ข้อความ +
- - + +
@@ -582,9 +573,11 @@ watch( @click="clickDelete(n.id, index)" > - - -