App.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <template>
  2. <router-view />
  3. </template>
  4. <script>
  5. import { mapMutations } from "vuex"
  6. // import { onClickOutside } from '@vueuse/core'
  7. export default {
  8. inject: ['$uaInfo', '$env'],
  9. mounted() {
  10. api.getData().then((res) => {
  11. console.log('res: ', res)
  12. this.setData(res)
  13. })
  14. },
  15. methods: {
  16. ...mapMutations([
  17. 'setData',
  18. ])
  19. },
  20. }
  21. </script>
  22. <style lang="less">
  23. // html, body {
  24. // overscroll-behavior: none;
  25. // overflow: hidden;
  26. // }
  27. // * {
  28. // user-select: none;
  29. // -webkit-touch-callout: none;
  30. // }
  31. #app {
  32. height: 100%;
  33. }
  34. // // 360浏览器不支持not()
  35. // input, textarea {
  36. // user-select: initial;
  37. // }
  38. // 字体
  39. @font-face {
  40. font-family: 'KingHwa_OldSong-Regular';
  41. src: url('@/assets/jinghua-old-song.ttf');
  42. }
  43. // @font-face {
  44. // font-family: 'Source Han Serif CN-Bold';
  45. // src: url('@/assets/style/SourceHanSerifCN-Bold.otf');
  46. // }
  47. // i {
  48. // font-style: italic;
  49. // }
  50. // 滚动条,注意头两项要同时设置,只写二者中某一项则不会达到目的。
  51. // ::-webkit-scrollbar { background: #dddecc; width: 6px; height: 6px; } /*宽度是对垂直滚动条而言,高度是对水平滚动条而言*/
  52. // ::-webkit-scrollbar-thumb { background: #828a5b; border-radius: 3px; }
  53. // ::-webkit-scrollbar-corner { background: #dddecc; }
  54. // vue组件过渡效果
  55. .fade-out-leave-active {
  56. transition: opacity 1s;
  57. }
  58. .fade-out-leave-to {
  59. opacity: 0;
  60. }
  61. // vue组件过渡效果
  62. .fade-in-enter-active {
  63. transition: opacity 1s;
  64. }
  65. .fade-in-enter-from {
  66. opacity: 0;
  67. }
  68. .fade-out-leave-active {
  69. transition: opacity 1s;
  70. }
  71. .fade-out-leave-to {
  72. opacity: 0;
  73. }
  74. .fade-in-out-enter-active {
  75. transition: opacity 2s;
  76. }
  77. .fade-in-out-leave-active {
  78. transition: opacity 2s;
  79. }
  80. .fade-in-out-enter-from {
  81. opacity: 0;
  82. }
  83. .fade-in-out-leave-to {
  84. opacity: 0;
  85. }
  86. // 不断渐变显隐 animation
  87. .animation-show-hide {
  88. animation: show-hide 1.8s infinite;
  89. }
  90. @keyframes show-hide {
  91. 0% {
  92. opacity: 0;
  93. }
  94. 50% {
  95. opacity: 1;
  96. }
  97. 100% {
  98. opacity: 0;
  99. }
  100. }
  101. // // vue-viewer
  102. // .viewer-container {
  103. // background-color: rgba(0, 0, 0, 80%) !important;
  104. // }
  105. // 或者
  106. // .viewer-backdrop {
  107. // background-color: rgba(0, 0, 0, 90%) !important;
  108. // }
  109. </style>