app.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <!--
  2. * @Author: wjc
  3. * @Date: 2023-11-15 09:54:21
  4. * @LastEditors: LiZhiWei
  5. * @LastEditTime: 2026-01-22 17:38:42
  6. * @Description:
  7. -->
  8. <template>
  9. <div>
  10. <NuxtLoadingIndicator :height="3" color="#0F67F8" :throttle="0" />
  11. <NuxtLayout>
  12. <el-config-provider :size="elConfig.size" :z-index="elConfig.zIndex" :locale="zhCn">
  13. <NuxtPage />
  14. </el-config-provider>
  15. </NuxtLayout>
  16. </div>
  17. </template>
  18. <script setup lang="ts">
  19. import zhCn from 'element-plus/es/locale/lang/zh-cn'
  20. import { appName } from '~/constants'
  21. useHead({
  22. title: appName,
  23. })
  24. const elConfig = ref<{
  25. size: 'default' | 'small' | 'large'
  26. zIndex: number
  27. }>({
  28. size: 'default',
  29. zIndex: 300,
  30. })
  31. </script>
  32. <style lang="scss">
  33. html {
  34. /**
  35. 一般浏览器的默认字体大小为 16px,以10px 为基数计算rem,font-size: 1.4rem = 14px;
  36. 注意:此设置在媒体查询中无效,媒体查询中,基数还是16px
  37. */
  38. font-size: 62.5%;
  39. }
  40. html,
  41. body,
  42. #__nuxt {
  43. padding: 0;
  44. margin: 0;
  45. height: 100%;
  46. }
  47. </style>