mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 添加生产的主题配置缓存
This commit is contained in:
19
src/layouts/common/GlobalHeader/components/SettingButton.vue
Normal file
19
src/layouts/common/GlobalHeader/components/SettingButton.vue
Normal 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>
|
@ -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
|
||||
};
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user