64 lines
1.1 KiB
Vue
64 lines
1.1 KiB
Vue
<!-- Author: fruit.com.cn -->
|
|
|
|
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
import { useAppStore } from '@/store/modules/app'
|
|
import { ConfigGlobal } from '@/components/ConfigGlobal'
|
|
import { useDesign } from '@/hooks/web/useDesign'
|
|
|
|
const { getPrefixCls } = useDesign()
|
|
|
|
const prefixCls = getPrefixCls('app')
|
|
|
|
const appStore = useAppStore()
|
|
|
|
const currentSize = computed(() => appStore.getCurrentSize)
|
|
|
|
const greyMode = computed(() => appStore.getGreyMode)
|
|
|
|
appStore.initTheme()
|
|
</script>
|
|
|
|
<template>
|
|
<ConfigGlobal :size="currentSize">
|
|
<RouterView :class="greyMode ? `${prefixCls}-grey-mode` : ''" />
|
|
<footer class="app-copyright">© FruitShorts</footer>
|
|
</ConfigGlobal>
|
|
</template>
|
|
|
|
<style lang="less">
|
|
@prefix-cls: ~'@{namespace}-app';
|
|
|
|
.size {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
html,
|
|
body {
|
|
padding: 0 !important;
|
|
margin: 0;
|
|
overflow: hidden;
|
|
.size;
|
|
|
|
#app {
|
|
.size;
|
|
}
|
|
}
|
|
|
|
.@{prefix-cls}-grey-mode {
|
|
filter: grayscale(100%);
|
|
}
|
|
|
|
.app-copyright {
|
|
position: fixed;
|
|
right: 20px;
|
|
bottom: 10px;
|
|
z-index: 5;
|
|
font-size: 12px;
|
|
line-height: 1;
|
|
color: var(--el-text-color-secondary, #909399);
|
|
pointer-events: none;
|
|
}
|
|
</style>
|