feat(projects): 添加生产的主题配置缓存

This commit is contained in:
Soybean
2022-06-20 23:23:55 +08:00
parent 5c1b086cb4
commit 718c36263e
16 changed files with 137 additions and 48 deletions

View File

@ -0,0 +1,19 @@
<template>
<hover-container
class="w-40px h-full"
tooltip-content="主题配置"
:inverted="theme.header.inverted"
@click="app.toggleSettingDrawerVisible"
>
<icon-ant-design-setting-outlined class="text-20px" />
</hover-container>
</template>
<script setup lang="ts">
import { useAppStore, useThemeStore } from '@/store';
const app = useAppStore();
const theme = useThemeStore();
</script>
<style scoped></style>

View File

@ -6,5 +6,16 @@ import FullScreen from './FullScreen.vue';
import ThemeMode from './ThemeMode.vue';
import UserAvatar from './UserAvatar.vue';
import SystemMessage from './SystemMessage.vue';
import SettingButton from './SettingButton.vue';
export { MenuCollapse, GlobalBreadcrumb, HeaderMenu, GithubSite, FullScreen, ThemeMode, UserAvatar, SystemMessage };
export {
MenuCollapse,
GlobalBreadcrumb,
HeaderMenu,
GithubSite,
FullScreen,
ThemeMode,
UserAvatar,
SystemMessage,
SettingButton
};

View File

@ -12,6 +12,7 @@
<full-screen />
<theme-mode />
<system-message />
<setting-button v-if="isProd" />
<user-avatar />
</div>
</dark-mode-container>
@ -29,7 +30,8 @@ import {
FullScreen,
ThemeMode,
UserAvatar,
SystemMessage
SystemMessage,
SettingButton
} from './components';
interface Props {
@ -44,6 +46,8 @@ interface Props {
defineProps<Props>();
const theme = useThemeStore();
const isProd = import.meta.env.PROD;
</script>
<style scoped>