App.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <template>
  2. <router-view />
  3. </template>
  4. <script setup>
  5. import { ref, computed, watch, onMounted } from "vue"
  6. import { useRoute, useRouter } from "vue-router"
  7. import { useStore } from "vuex"
  8. import {
  9. // checkLoginStatusAndProcess,
  10. // getUserFromStorageIfNeed
  11. } from '@/api.js'
  12. const route = useRoute()
  13. const router = useRouter()
  14. const store = useStore()
  15. // store.commit('getPageVisitRecordFromStorage')
  16. // checkLoginStatusAndProcess()
  17. // getUserFromStorageIfNeed()
  18. // if (store.state.loginStatus === store.getters.loginStatusEnum.notLogin && route.name !== 'LoginView') {
  19. // router.push({
  20. // name: 'LoginView',
  21. // query: {
  22. // redirect: encodeURI(route.fullPath)
  23. // }
  24. // })
  25. // }
  26. </script>
  27. <style lang="less">
  28. html, body {
  29. // overscroll-behavior: none;
  30. overflow: hidden;
  31. height: 100%;
  32. }
  33. * {
  34. user-select: none;
  35. -webkit-touch-callout: none;
  36. }
  37. // 360浏览器不支持not()
  38. input, textarea {
  39. user-select: initial;
  40. }
  41. #app {
  42. height: 100%;
  43. }
  44. // 字体
  45. @font-face {
  46. font-family: 'KingHwa_OldSong';
  47. src: url('@/assets/style/KingHwa_OldSong.TTF');
  48. }
  49. @font-face {
  50. font-family: 'KaiTi';
  51. src: url('@/assets/style/SIMKAI.TTF');
  52. }
  53. // i {
  54. // font-style: italic;
  55. // }
  56. // 滚动条,只设置某一项可能导致不生效。
  57. // ::-webkit-scrollbar { background: #dddecc; width: 6px; height: 6px; }
  58. // ::-webkit-scrollbar-thumb { background: #828a5b; border-radius: 3px; }
  59. // ::-webkit-scrollbar-corner { background: #dddecc; }
  60. // vue组件过渡效果
  61. .fade-out-leave-active {
  62. transition: opacity 2s;
  63. pointer-events: none;
  64. }
  65. .fade-out-leave-to {
  66. opacity: 0;
  67. }
  68. .fade-in-enter-active {
  69. transition: opacity 2s;
  70. }
  71. .fade-in-enter-from {
  72. opacity: 0;
  73. }
  74. .fade-in-out-enter-active {
  75. transition: opacity 1s;
  76. }
  77. .fade-in-out-leave-active {
  78. transition: opacity 1s;
  79. pointer-events: none;
  80. }
  81. .fade-in-out-enter-from {
  82. opacity: 0;
  83. }
  84. .fade-in-out-leave-to {
  85. opacity: 0;
  86. }
  87. // 不断渐变显隐 animation
  88. .animation-show-hide {
  89. animation: show-hide 1.5s infinite;
  90. }
  91. @keyframes show-hide {
  92. 0% {
  93. opacity: 0;
  94. }
  95. 50% {
  96. opacity: 1;
  97. }
  98. 100% {
  99. opacity: 0;
  100. }
  101. }
  102. // // vue-viewer
  103. // .viewer-container {
  104. // background-color: rgba(0, 0, 0, 80%) !important;
  105. // }
  106. // 或者
  107. // .viewer-backdrop {
  108. // background-color: rgba(0, 0, 0, 90%) !important;
  109. // }
  110. </style>