|
|
|
<script setup lang="ts">
|
|
|
|
import "animate.css";
|
|
|
|
// 引入 src/components/ReIcon/src/offlineIcon.ts 文件中所有使用addIcon添加过的本地图标
|
|
|
|
import "@/components/ReIcon/src/offlineIcon";
|
|
|
|
import { setType } from "./types";
|
|
|
|
import { useAppStoreHook } from "@/store/modules/app";
|
|
|
|
import { useSettingStoreHook } from "@/store/modules/settings";
|
|
|
|
import { useGlobal } from "@pureadmin/utils";
|
|
|
|
import { useDataThemeChange } from "@/layout/hooks/useDataThemeChange";
|
|
|
|
import { ref, reactive, computed, onMounted, onBeforeMount } from "vue";
|
|
|
|
|
|
|
|
import AppHeader from "./components/appHeader/index.vue";
|
|
|
|
import appMain from "./components/appMain.vue";
|
|
|
|
|
|
|
|
const appWrapperRef = ref();
|
|
|
|
const pureSetting = useSettingStoreHook();
|
|
|
|
const { $storage } = useGlobal<GlobalPropertiesApi>();
|
|
|
|
|
|
|
|
const set: setType = reactive({
|
|
|
|
sidebar: computed(() => {
|
|
|
|
return useAppStoreHook().sidebar;
|
|
|
|
}),
|
|
|
|
|
|
|
|
device: computed(() => {
|
|
|
|
return useAppStoreHook().device;
|
|
|
|
}),
|
|
|
|
|
|
|
|
fixedHeader: computed(() => {
|
|
|
|
return pureSetting.fixedHeader;
|
|
|
|
}),
|
|
|
|
|
|
|
|
classes: computed(() => {
|
|
|
|
return {
|
|
|
|
hideSidebar: !set.sidebar.opened,
|
|
|
|
openSidebar: set.sidebar.opened,
|
|
|
|
withoutAnimation: set.sidebar.withoutAnimation,
|
|
|
|
mobile: set.device === "mobile"
|
|
|
|
};
|
|
|
|
}),
|
|
|
|
|
|
|
|
hideTabs: computed(() => {
|
|
|
|
return $storage?.configure.hideTabs;
|
|
|
|
})
|
|
|
|
});
|
|
|
|
|
|
|
|
onMounted(() => {});
|
|
|
|
|
|
|
|
onBeforeMount(() => {
|
|
|
|
useDataThemeChange().dataThemeChange();
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div ref="appWrapperRef" class="app-wrapper">
|
|
|
|
<div class="main-container">
|
|
|
|
<div>
|
|
|
|
<!-- 主体内容 -->
|
|
|
|
<AppHeader />
|
|
|
|
<app-main />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.app-wrapper {
|
|
|
|
position: relative;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
background-image: url("../assets/home/home_bg.png");
|
|
|
|
background-size: 100% 100%;
|
|
|
|
&::after {
|
|
|
|
display: table;
|
|
|
|
clear: both;
|
|
|
|
content: "";
|
|
|
|
}
|
|
|
|
|
|
|
|
&.mobile.openSidebar {
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.app-mask {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
z-index: 999;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
background: #000;
|
|
|
|
opacity: 0.3;
|
|
|
|
}
|
|
|
|
|
|
|
|
.re-screen {
|
|
|
|
margin-top: 12px;
|
|
|
|
}
|
|
|
|
</style>
|