mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-12-21 15:00:28 +08:00
chore: update
This commit is contained in:
@@ -6,12 +6,9 @@ import NoticeList from "./components/NoticeList.vue";
|
|||||||
import BellIcon from "~icons/lucide/bell";
|
import BellIcon from "~icons/lucide/bell";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const noticesNum = ref(0);
|
|
||||||
const notices = ref(noticesData);
|
const notices = ref(noticesData);
|
||||||
const activeKey = ref(noticesData[0]?.key);
|
const activeKey = ref(noticesData[0]?.key);
|
||||||
|
|
||||||
notices.value.map(v => (noticesNum.value += v.list.length));
|
|
||||||
|
|
||||||
const getLabel = computed(
|
const getLabel = computed(
|
||||||
() => item =>
|
() => item =>
|
||||||
t(item.name) + (item.list.length > 0 ? `(${item.list.length})` : "")
|
t(item.name) + (item.list.length > 0 ? `(${item.list.length})` : "")
|
||||||
@@ -21,12 +18,7 @@ const getLabel = computed(
|
|||||||
<template>
|
<template>
|
||||||
<el-dropdown trigger="click" placement="bottom-end">
|
<el-dropdown trigger="click" placement="bottom-end">
|
||||||
<span
|
<span
|
||||||
:class="[
|
:class="['dropdown-badge', 'navbar-bg-hover', 'select-none', 'mr-[7px]']"
|
||||||
'dropdown-badge',
|
|
||||||
'navbar-bg-hover',
|
|
||||||
'select-none',
|
|
||||||
Number(noticesNum) !== 0 && 'mr-[7px]'
|
|
||||||
]"
|
|
||||||
>
|
>
|
||||||
<el-badge is-dot>
|
<el-badge is-dot>
|
||||||
<span class="header-notice-icon">
|
<span class="header-notice-icon">
|
||||||
|
|||||||
Reference in New Issue
Block a user