From a5e476e49aa5db0eb6fe35d5feabc354da64593b Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 22 Jan 2024 10:31:29 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=AA=E0=B8=94=E0=B8=87=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 | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 11937eb..5de1a24 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -51,6 +51,7 @@ async function fetchTotolNotificate() { }); } +const statusLoad = ref(false); const fetchlistNotification = async (index: number, type: string) => { await http .get(config.API.msgNotificate + `?page=${index}&pageSize=${15}`) @@ -75,8 +76,7 @@ const fetchlistNotification = async (index: number, type: string) => { }); }); notiList.value.push(...list); - - totalInbox.value = res.data.result.total; + statusLoad.value = totalInbox.value === 0 ? true : false; }) .catch((err) => { console.log(err); @@ -238,7 +238,11 @@ const thaiOptions: Intl.DateTimeFormatOptions = { ทั้งหมด {{ totalInbox }} ข้อความ - +
+
+ +
+ + ไมมีข้อมูล +
+
+