|
@@ -1,19 +1,20 @@
|
|
|
+<template>
|
|
|
+ <ConfigGlobal :size="currentSize">
|
|
|
+ <RouterView :class="greyMode ? `${prefixCls}-grey-mode` : ''" />
|
|
|
+ </ConfigGlobal>
|
|
|
+</template>
|
|
|
<script setup lang="ts">
|
|
|
import { computed } from 'vue'
|
|
|
-import { useAppStore } from '@/store/modules/app'
|
|
|
-import { ConfigGlobal } from '@/components/ConfigGlobal'
|
|
|
+import Cookies from 'js-cookie'
|
|
|
import { isDark } from '@/utils/is'
|
|
|
+import { useAppStore } from '@/store/modules/app'
|
|
|
import { useDesign } from '@/hooks/web/useDesign'
|
|
|
-import Cookies from 'js-cookie'
|
|
|
+import { ConfigGlobal } from '@/components/ConfigGlobal'
|
|
|
|
|
|
const { getPrefixCls } = useDesign()
|
|
|
-
|
|
|
const prefixCls = getPrefixCls('app')
|
|
|
-
|
|
|
const appStore = useAppStore()
|
|
|
-
|
|
|
const currentSize = computed(() => appStore.getCurrentSize)
|
|
|
-
|
|
|
const greyMode = computed(() => appStore.getGreyMode)
|
|
|
|
|
|
// 根据浏览器当前主题设置系统主题色
|
|
@@ -32,12 +33,6 @@ const setDefaultTheme = () => {
|
|
|
setDefaultTheme()
|
|
|
</script>
|
|
|
|
|
|
-<template>
|
|
|
- <ConfigGlobal :size="currentSize">
|
|
|
- <RouterView :class="greyMode ? `${prefixCls}-grey-mode` : ''" />
|
|
|
- </ConfigGlobal>
|
|
|
-</template>
|
|
|
-
|
|
|
<style lang="less">
|
|
|
@prefix-cls: ~'@{namespace}-app';
|
|
|
|