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 }} ข้อความ - +
+
+ +
+ + ไมมีข้อมูล +
+
+