feat: 右上角活动告警数

This commit is contained in:
TsMask
2023-10-19 16:10:37 +08:00
parent a746d14c48
commit 820eca7bbe
4 changed files with 70 additions and 40 deletions

View File

@@ -4,6 +4,7 @@ import { useRouter } from 'vue-router';
import { toggle, isFullscreen } from '@/utils/fullscreen-utils';
import useI18n from '@/hooks/useI18n';
import useUserStore from '@/store/modules/user';
import useAlarmStore from '@/store/modules/alarm';
const { t, changeLocale } = useI18n();
const userStore = useUserStore();
const router = useRouter();
@@ -31,45 +32,14 @@ function fnChangeLocale(e: any) {
<template>
<a-space :size="12" align="center">
<a-popover
overlayClassName="head-notice"
placement="bottomRight"
:trigger="['click']"
>
<a-button type="text">
<template #icon>
<a-badge :count="123" :overflow-count="99">
<BellOutlined :style="{ fontSize: '20px' }" />
</a-badge>
</template>
</a-button>
<template #content :style="{ padding: 0 }">
<a-tabs centered :tabBarStyle="{ width: '336px' }">
<a-tab-pane key="1" tab="通知41">
Content of Tab 通知
<a-button type="link" block>查看更多</a-button>
</a-tab-pane>
<a-tab-pane key="2" tab="消息231">
Content of Tab 消息
<a-button type="link" block>查看更多</a-button>
</a-tab-pane>
<a-tab-pane key="3" tab="待办1">
Content of Tab 待办
<a-button type="link" block>查看更多</a-button>
</a-tab-pane>
</a-tabs>
<a-button type="text">
<template #icon>
<a-badge :count="useAlarmStore().activeAlarmTotal" :overflow-count="99" status="warning">
<BellOutlined />
</a-badge>
</template>
</a-popover>
<!-- <a-tooltip>
<template #title>开源仓库</template>
<a-button type="text" href="https://gitee.com/TsMask" target="_blank">
<template #icon>
<GithubOutlined :style="{ fontSize: '20px' }" />
</template>
</a-button>
</a-tooltip> -->
</a-button>
<a-tooltip>
<template #title>全屏显示</template>
<a-button type="text" @click="toggle">