This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
<span class="text">
|
||||
<strong>{{ item.title }}</strong>
|
||||
<small>{{ item.body }}</small>
|
||||
<time>{{ item.created_at || '-' }}</time>
|
||||
<time>{{ formatDateTime(item.created_at) }}</time>
|
||||
</span>
|
||||
<span v-if="!isRead(item)" class="unread-dot" />
|
||||
</button>
|
||||
@@ -50,9 +50,6 @@
|
||||
<p>暂无通知</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-wrapper">
|
||||
<ElButton class="view-all" @click="handleViewAll">进入通知中心</ElButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -68,6 +65,7 @@
|
||||
import { useAuth } from '@/composables/useAuth'
|
||||
import { NOTIFICATION_PERMISSIONS } from '@/config/constants/notification'
|
||||
import { navigateNotificationTarget } from '@/utils/business/notificationNavigation'
|
||||
import { formatDateTime } from '@/utils/business/format'
|
||||
|
||||
const props = defineProps<{ modelValue: boolean }>()
|
||||
const emit = defineEmits<{ 'update:modelValue': [value: boolean] }>()
|
||||
@@ -108,11 +106,6 @@
|
||||
|
||||
const close = () => emit('update:modelValue', false)
|
||||
|
||||
const handleViewAll = () => {
|
||||
close()
|
||||
void router.push('/notifications')
|
||||
}
|
||||
|
||||
const handleMarkAllRead = async () => {
|
||||
try {
|
||||
const response = await notificationStore.markAllRead()
|
||||
|
||||
Reference in New Issue
Block a user