App.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <template>
  2. <router-view />
  3. <teleport to="body">
  4. <ToastComp v-if="isShowToast" />
  5. </teleport>
  6. </template>
  7. <script setup>
  8. // import { onClickOutside } from '@vueuse/core'
  9. import { computed, inject, ref } from 'vue'
  10. import ToastComp from "@/components/ToastComp.vue"
  11. import { isShowToast } from "@/store/index.js"
  12. const {
  13. windowSizeInCssForRef,
  14. windowSizeWhenDesignForRef,
  15. } = useSizeAdapt()
  16. inject('$uaInfo')
  17. inject('$env')
  18. </script>
  19. <style lang="less">
  20. // html, body {
  21. // overscroll-behavior: none;
  22. // overflow: hidden;
  23. // }
  24. * {
  25. user-select: none;
  26. -webkit-touch-callout: none;
  27. }
  28. #app {
  29. height: 100%;
  30. }
  31. // 360浏览器不支持not()
  32. input, textarea {
  33. user-select: initial;
  34. }
  35. // 字体
  36. // @font-face {
  37. // font-family: 'Source Han Serif CN';
  38. // src: url('@/assets/style/SourceHanSerifCN-Regular.otf');
  39. // }
  40. // @font-face {
  41. // font-family: 'Source Han Serif CN-Bold';
  42. // src: url('@/assets/style/SourceHanSerifCN-Bold.otf');
  43. // }
  44. // i {
  45. // font-style: italic;
  46. // }
  47. // 滚动条
  48. // ::-webkit-scrollbar { background: #dddecc; width: 0.3rem; height: 0.3rem; } /*宽度是对垂直滚动条而言,高度是对水平滚动条而言*/
  49. // ::-webkit-scrollbar-thumb { background: #828a5b; border-radius: 0.15rem; }
  50. // ::-webkit-scrollbar-corner { background: #dddecc; }
  51. // vue组件过渡效果
  52. .fade-out-leave-active {
  53. transition: opacity 1s;
  54. }
  55. .fade-out-leave-to {
  56. opacity: 0;
  57. }
  58. // 不断渐变显隐 animation
  59. .animation-show-hide {
  60. animation: show-hide 1.8s infinite;
  61. }
  62. @keyframes show-hide {
  63. 0% {
  64. opacity: 0;
  65. }
  66. 50% {
  67. opacity: 1;
  68. }
  69. 100% {
  70. opacity: 0;
  71. }
  72. }
  73. // // vue-viewer
  74. // .viewer-container {
  75. // background-color: rgba(0, 0, 0, 80%) !important;
  76. // }
  77. // 或者
  78. // .viewer-backdrop {
  79. // background-color: rgba(0, 0, 0, 90%) !important;
  80. // }
  81. </style>