You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
paopao-ce/web/src/App.vue

63 lines
2.0 KiB

<template>
<n-config-provider :theme="theme">
<n-message-provider>
<n-dialog-provider>
<div
class="app-container"
:class="{ dark: theme?.name === 'dark' }"
>
<div has-sider class="main-wrap" position="static">
<!-- -->
<sidebar />
<div class="content-wrap">
<router-view
class="app-wrap"
v-slot="{ Component }"
>
<keep-alive>
<component
v-if="$route.meta.keepAlive"
:is="Component"
/>
</keep-alive>
<component
v-if="!$route.meta.keepAlive"
:is="Component"
/>
</router-view>
</div>
<!-- -->
<rightbar />
</div>
<!-- / -->
<auth />
</div>
</n-dialog-provider>
</n-message-provider>
<n-global-style />
</n-config-provider>
</template>
<script setup lang="ts">
import { computed } from 'vue';
import { useStore } from 'vuex';
import { darkTheme } from 'naive-ui';
import { version, buildTime } from '../build/info.json';
const store = useStore();
const theme = computed(() => (store.state.theme === 'dark' ? darkTheme : null));
console.log(
`%c Release Build Info
%cVersion v${version}
BuildTime ${buildTime}`,
'background:#000;color:#FFF;font-weight:bold;',
'background:#FFF;color:#000;'
);
</script>
<style lang="less">
@import '@/assets/css/main.less';
</style>