| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <template>
- <el-config-provider :size="globalComSize" :locale="zhCn">
- <router-view v-if="isRouterAlive"></router-view>
- </el-config-provider>
- </template>
- <script lang="ts" setup>
- import { computed, provide, nextTick } from 'vue'
- import { useSettingStore } from '@/store/modules/setting'
- // 配置element中文
- import zhCn from 'element-plus/es/locale/lang/zh-cn'
- let isRouterAlive = true
- const SettingStore = useSettingStore()
- // 配置全局组件大小
- const globalComSize = computed((): string => SettingStore.themeConfig.globalComSize)
- const reload = () => {
- isRouterAlive = false
- nextTick(function () {
- isRouterAlive = true
- })
- }
- provide('reload', reload)
- </script>
- <style lang="scss">
- #app {
- position: relative;
- width: 100%;
- height: 100%;
- font-family: Avenir, sans-serif;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- color: #2c3e50;
- }
- .el-pager li:focus {
- border: none;
- }
- .el-dropdown:focus {
- border: none;
- }
- .svg-icon:focus {
- border: none;
- }
- </style>
|