update notice

This commit is contained in:
不做码农 2022-06-05 21:03:59 +08:00
parent d1cc6bf15f
commit b055189b45
2 changed files with 8 additions and 4 deletions

View File

@ -1,8 +1,8 @@
<template>
<div>
<el-popover placement="bottom" trigger="hover" width="400" popper-class="el-popover-pupop-user-news">
<el-popover placement="bottom" trigger="hover" width="300px" popper-class="el-popover-pupop-user-news">
<template #reference>
<el-badge :is-dot="newsDot" style="line-height: 18px">
<el-badge :is-dot="noticeDot" style="line-height: 18px">
<el-icon><bell /></el-icon>
</el-badge>
</template>
@ -35,15 +35,18 @@
<script setup name="noticeIndex">
const { proxy } = getCurrentInstance()
//
const newsDot = ref(true)
const newsDot = ref(false)
const noticeList = computed(() => {
return proxy.$store.getters.noticeList
})
const noticeDot = computed(() => {
return proxy.$store.getters.noticeDot
})
//
function onAllReadClick() {
newsDot.value = false
proxy.$modal.msg('敬请期待')
proxy.$modal.msg('请自行实现')
}
//
function onGoToGiteeClick() {

View File

@ -19,6 +19,7 @@ const getters = {
sidebarRouters: state => state.permission.sidebarRouters,
onlineUserNum: state => state.socket.onlineNum,
noticeList: state => state.socket.noticeList,
noticeDot: state => state.socket.noticeList.length > 0,
onlineUsers: state => state.socket.onlineUsers
}
export default getters