diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue
index a83837ee..15f3da8f 100644
--- a/src/layouts/MainLayout.vue
+++ b/src/layouts/MainLayout.vue
@@ -115,8 +115,13 @@ function doLogout() {
}
function readNoti(id: string) {
+ const notification = notificationData.value.find((n) => n.id === id);
+
state.notiDialog = true;
state.notiId = id;
+ if (notification) {
+ notification.read = true;
+ }
}
onMounted(async () => {
@@ -301,20 +306,19 @@ onMounted(async () => {
:offset="[0, 10]"
anchor="bottom middle"
self="top middle"
- style="max-height: 30vh; width: 300px"
@before-hide="
() => {
state.notiOpen = false;
}
"
>
-
+
-
+
{
@click="setActive(btn)"
/>
-
-
+
-
+
-
-
-
+
+
-
-
- {{ item.title }}
-
-
- {{ item.detail }}
-
-
-
- {{ moment(item.createdAt).fromNow() }}
-
-
+
+
{{ item.title }}
+
+
{{ item.detail }}
-
-
-
-
-
- {{ $t('general.noData') }}
+
+
+
+ {{ moment(item.createdAt).fromNow() }}
-
-
+
+ {{ item.title }}
+ {{ item.detail }}
+
+
+
+
+
+ {{ $t('general.noData') }}
+
+
n.id === id);
+
state.notiId = id;
state.notiDialog = true;
+ if (notification) {
+ notification.read = true;
+ }
}
onMounted(async () => {
@@ -203,10 +208,10 @@ onMounted(async () => {
class="q-py-sm q-px-md rounded row no-wrap items-center"
@click.stop="readNoti(n.id)"
>
-
+ />