app.vue 978 B

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