Browse Source
Merge pull request #1301 from colinin/vben5-refactor-workbench
fix(vben5-platform): Remove redundant interface requests
pull/1312/head
yx lin
8 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
0 additions and
16 deletions
-
apps/vben5/packages/@abp/platform/src/components/workbench/components/WorkbenchHeader.vue
|
|
@ -1,10 +1,6 @@ |
|
|
<script lang="ts" setup> |
|
|
<script lang="ts" setup> |
|
|
import { onMounted, ref } from 'vue'; |
|
|
|
|
|
|
|
|
|
|
|
import { VbenAvatar } from '@vben-core/shadcn-ui'; |
|
|
import { VbenAvatar } from '@vben-core/shadcn-ui'; |
|
|
|
|
|
|
|
|
import { NotificationReadState, useMyNotifilersApi } from '@abp/notifications'; |
|
|
|
|
|
|
|
|
|
|
|
interface Props { |
|
|
interface Props { |
|
|
avatar?: string; |
|
|
avatar?: string; |
|
|
notifierCount?: number; |
|
|
notifierCount?: number; |
|
|
@ -20,18 +16,6 @@ withDefaults(defineProps<Props>(), { |
|
|
text: '', |
|
|
text: '', |
|
|
notifierCount: 0, |
|
|
notifierCount: 0, |
|
|
}); |
|
|
}); |
|
|
const unReadNotifilerCount = ref(0); |
|
|
|
|
|
const { getMyNotifilersApi } = useMyNotifilersApi(); |
|
|
|
|
|
|
|
|
|
|
|
async function onInit() { |
|
|
|
|
|
const { totalCount } = await getMyNotifilersApi({ |
|
|
|
|
|
maxResultCount: 1, |
|
|
|
|
|
readState: NotificationReadState.UnRead, |
|
|
|
|
|
}); |
|
|
|
|
|
unReadNotifilerCount.value = totalCount; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
onMounted(onInit); |
|
|
|
|
|
</script> |
|
|
</script> |
|
|
<template> |
|
|
<template> |
|
|
<div class="card-box p-4 py-6 lg:flex"> |
|
|
<div class="card-box p-4 py-6 lg:flex"> |
|
|
|