diff --git a/src/router/index.ts b/src/router/index.ts index 7c94de4..dc46a8e 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -29,6 +29,11 @@ const router = createRouter({ component: () => import('@/views/setting/index.vue'), meta: { cache: true } }, + { + path: '/notifications', + name: 'notifications', + component: () => import('@/views/notifications/index.vue') + }, { path: '/:pathMatch(.*)', name: '404', diff --git a/src/views/main-header.vue b/src/views/main-header.vue index 54f3a83..42562c3 100644 --- a/src/views/main-header.vue +++ b/src/views/main-header.vue @@ -120,7 +120,7 @@ } const onNotifications = () => { hideProfilePopover() - console.log('notifications') + router.push('/notifications') } const onSettings = () => { hideProfilePopover() diff --git a/src/views/notifications/components/NotificationListItem.vue b/src/views/notifications/components/NotificationListItem.vue new file mode 100644 index 0000000..e52039a --- /dev/null +++ b/src/views/notifications/components/NotificationListItem.vue @@ -0,0 +1,136 @@ + + + + diff --git a/src/views/notifications/components/NotificationsList.vue b/src/views/notifications/components/NotificationsList.vue new file mode 100644 index 0000000..161d904 --- /dev/null +++ b/src/views/notifications/components/NotificationsList.vue @@ -0,0 +1,111 @@ + + + + diff --git a/src/views/notifications/index.vue b/src/views/notifications/index.vue new file mode 100644 index 0000000..c1e08a2 --- /dev/null +++ b/src/views/notifications/index.vue @@ -0,0 +1,166 @@ + + + + diff --git a/src/views/notifications/types.ts b/src/views/notifications/types.ts new file mode 100644 index 0000000..90fabf5 --- /dev/null +++ b/src/views/notifications/types.ts @@ -0,0 +1,8 @@ +export interface NotificationRecord { + id: string + title: string + date: string + content: string + isUnread: boolean + isExpanded: boolean +}