优化
This commit is contained in:
@ -17,7 +17,7 @@
|
||||
<template v-if="item.meta" #title>
|
||||
<svg-icon :icon-class="item.meta ? item.meta.icon : ''" />
|
||||
<span class="menu-title" :title="hasTitle(item.meta?.title)">{{ item.meta?.title }}</span>
|
||||
<!-- <span class="bage" v-if="item.meta?.title == '我的任务' && total >= 0">{{ total }}</span> -->
|
||||
<span class="bage" v-if="item.meta?.title == '我的任务' && total > 0">{{ total }}</span>
|
||||
</template>
|
||||
|
||||
<sidebar-item
|
||||
@ -59,10 +59,10 @@ const props = defineProps({
|
||||
const total = ref(0);
|
||||
const totalChao = ref(0);
|
||||
onMounted(() => {
|
||||
if (onlyOneChild.value.meta?.title == '我的待办') {
|
||||
if (onlyOneChild.value.meta?.title == '我的待办' || props.item.meta?.title == '我的任务') {
|
||||
getWaitingList();
|
||||
}
|
||||
if (onlyOneChild.value.meta?.title == '我的抄送') {
|
||||
if (onlyOneChild.value.meta?.title == '我的抄送') {
|
||||
getChaoList();
|
||||
}
|
||||
});
|
||||
@ -130,9 +130,7 @@ const hasTitle = (title: string | undefined): string => {
|
||||
watch(
|
||||
() => noticeStore.state.value.notices,
|
||||
(newVal) => {
|
||||
if (onlyOneChild.value.meta?.title == '我的待办') {
|
||||
console.log(121212121);
|
||||
|
||||
if (onlyOneChild.value.meta?.title == '我的待办' || props.item.meta?.title == '我的任务') {
|
||||
let time = setTimeout(() => {
|
||||
getWaitingList();
|
||||
clearTimeout(time);
|
||||
|
Reference in New Issue
Block a user