37 lines
946 B
Vue
Raw Normal View History

2023-04-16 22:33:44 +08:00
<template>
2023-05-28 21:55:59 +08:00
2023-04-16 22:33:44 +08:00
<div class="center">
2023-04-23 09:41:12 +08:00
<Headers />
2023-05-05 16:32:31 +08:00
<navbar v-if="Route.path!=='/login'" @setLayout="setLayout" />
2023-04-16 22:33:44 +08:00
<router-view />
2023-05-05 16:32:31 +08:00
<settings ref="settingRef" />
2023-04-16 22:33:44 +08:00
</div>
2023-05-28 21:55:59 +08:00
2023-04-16 22:33:44 +08:00
</template>
<script setup>
import useSettingsStore from '@/store/modules/settings';
import { handleThemeStyle } from '@/utils/theme';
import VScaleScreen from 'v-scale-screen';
2023-04-23 09:41:12 +08:00
import Headers from '@/components/heades/index';
2023-05-05 16:32:31 +08:00
import { AppMain, Navbar, Settings, TagsView } from '@/layout/components'
import { useRoute } from 'vue-router';
const Route = useRoute();
2023-04-16 22:33:44 +08:00
onMounted(() => {
nextTick(() => {
// 初始化主题样式
handleThemeStyle(useSettingsStore().theme);
});
});
2023-05-05 16:32:31 +08:00
const settingRef = ref(null);
function setLayout() {
settingRef.value.openSetting();
}
2023-04-16 22:33:44 +08:00
</script>
<style lang="scss" scoped>
.center {
width: 100%;
height: 100%;
}
</style>