feat:完善我的站内信 100%(右上角)

This commit is contained in:
YunaiV
2025-04-21 19:04:03 +08:00
parent d3d250f16f
commit 7d00744a82
3 changed files with 99 additions and 44 deletions

View File

@@ -34,6 +34,7 @@ withDefaults(defineProps<Props>(), {
const emit = defineEmits<{
clear: [];
makeAll: [];
open: [boolean];
read: [NotificationItem];
viewAll: [];
}>();
@@ -60,6 +61,11 @@ function handleClear() {
function handleClick(item: NotificationItem) {
emit('read', item);
}
function handleOpen() {
toggle();
emit('open', open.value);
}
</script>
<template>
<VbenPopover
@@ -67,7 +73,7 @@ function handleClick(item: NotificationItem) {
content-class="relative right-2 w-[360px] p-0"
>
<template #trigger>
<div class="flex-center mr-2 h-full" @click.stop="toggle()">
<div class="flex-center mr-2 h-full" @click.stop="handleOpen">
<VbenIconButton class="bell-button text-foreground relative">
<span
v-if="dot"

View File

@@ -4,6 +4,7 @@ interface NotificationItem {
isRead?: boolean;
message: string;
title: string;
id?: number;
}
export type { NotificationItem };