App.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <script setup lang="ts">
  2. import { RouterView } from 'vue-router'
  3. import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
  4. </script>
  5. <template>
  6. <el-config-provider :locale="zhCn">
  7. <router-view v-slot="{ Component }">
  8. <transition name="slide">
  9. <component :is="Component" />
  10. </transition> </router-view
  11. ></el-config-provider>
  12. </template>
  13. <style>
  14. body {
  15. margin: 0;
  16. font-family:
  17. Noto Sans SC,
  18. SF Pro SC,
  19. SF Pro Text,
  20. SF Pro Icons,
  21. PingFang SC,
  22. Helvetica Neue,
  23. Helvetica,
  24. Arial,
  25. sans-serif;
  26. }
  27. .el-date-editor--datetime {
  28. width: 160px !important;
  29. }
  30. ::-webkit-scrollbar {
  31. --bar-width: 5px;
  32. width: 5px;
  33. height: 5px;
  34. }
  35. ::-webkit-scrollbar-track {
  36. background-color: transparent;
  37. }
  38. ::-webkit-scrollbar-thumb {
  39. background-color: rgba(0, 0, 0, 0.1);
  40. border-radius: 20px;
  41. background-clip: content-box;
  42. border: 1px solid transparent;
  43. }
  44. .slide-enter-active {
  45. transition: all 0.8s cubic-bezier(1, 0.5, 0.8, 1);
  46. }
  47. .slide-leave-active {
  48. transition: all 0.3s ease-out;
  49. }
  50. .slide-enter-from {
  51. transform: translateX(-100vw);
  52. opacity: 0;
  53. }
  54. .slide-enter-to {
  55. transform: translateX(0);
  56. opacity: 1;
  57. }
  58. .slide-leave-from {
  59. transform: translateX(0);
  60. opacity: 1;
  61. }
  62. .slide-leave-to {
  63. transform: translateX(100vw);
  64. opacity: 0;
  65. }
  66. </style>