feat: 添加消息通知图标隐藏功能

This commit is contained in:
pany
2022-10-31 15:35:51 +08:00
parent d8f47cf91e
commit 4e2ffa38f5
4 changed files with 13 additions and 2 deletions

View File

@@ -19,6 +19,9 @@ const userStore = useUserStore()
const sidebar = computed(() => {
return appStore.sidebar
})
const showNotify = computed(() => {
return settingsStore.showNotify
})
const showThemeSwitch = computed(() => {
return settingsStore.showThemeSwitch
})
@@ -42,7 +45,7 @@ const logout = () => {
<div class="right-menu">
<Screenfull v-if="showScreenfull" class="right-menu-item" />
<ThemeSwitch v-if="showThemeSwitch" class="right-menu-item" />
<Notify class="right-menu-item" />
<Notify v-if="showNotify" class="right-menu-item" />
<el-dropdown class="right-menu-item">
<el-avatar :icon="UserFilled" :size="34" />
<template #dropdown>

View File

@@ -20,6 +20,10 @@ const settingsStore = useSettingsStore()
<span>固定 Header</span>
<el-switch v-model="settingsStore.fixedHeader" class="drawer-switch" />
</div>
<div class="drawer-item">
<span>显示消息通知</span>
<el-switch v-model="settingsStore.showNotify" class="drawer-switch" />
</div>
<div class="drawer-item">
<span>显示切换主题按钮</span>
<el-switch v-model="settingsStore.showThemeSwitch" class="drawer-switch" />