基质喷涂
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
948 B

5 months ago
5 months ago
5 months ago
  1. <script setup lang="ts">
  2. // socket.init(() => {})
  3. // 获取屏幕宽度
  4. // import { ElMessage } from 'element-plus'
  5. //
  6. // const screenWidth = window.screen.width
  7. //
  8. // // 获取屏幕高度
  9. // const screenHeight = window.screen.height
  10. //
  11. // // 获取文档区宽度
  12. // const docWidth = document.documentElement.clientWidth
  13. //
  14. // // 获取文档区高度
  15. // const docHeight = document.documentElement.clientHeight
  16. //
  17. // // alert(`${screenWidth}-${screenHeight}`)
  18. // ElMessage.success(`${screenWidth}-${screenHeight}`)
  19. // ElMessage.success(`${docWidth}-${docHeight}`)
  20. </script>
  21. <template>
  22. <router-view v-slot="{ Component }" class="main-content">
  23. <transition>
  24. <component :is="Component" />
  25. </transition>
  26. </router-view>
  27. </template>
  28. <style scoped lang="scss">
  29. .main-content {
  30. width: 100%;
  31. height: 100%;
  32. background: url("assets/images/background.jpg") no-repeat center;
  33. background-size: cover;
  34. overflow: hidden;
  35. }
  36. </style>