Browse Source

fix(vben5-platform): Remove redundant interface requests

pull/1301/head
colin 1 year ago
parent
commit
8659467a4a
  1. 16
      apps/vben5/packages/@abp/platform/src/components/workbench/components/WorkbenchHeader.vue

16
apps/vben5/packages/@abp/platform/src/components/workbench/components/WorkbenchHeader.vue

@ -1,10 +1,6 @@
<script lang="ts" setup>
import { onMounted, ref } from 'vue';
import { VbenAvatar } from '@vben-core/shadcn-ui';
import { NotificationReadState, useMyNotifilersApi } from '@abp/notifications';
interface Props {
avatar?: string;
notifierCount?: number;
@ -20,18 +16,6 @@ withDefaults(defineProps<Props>(), {
text: '',
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>
<template>
<div class="card-box p-4 py-6 lg:flex">

Loading…
Cancel
Save