App.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <template>
  2. <div class="app-view">
  3. <h1>{{ title }}</h1>
  4. <progress-comp
  5. class="progress"
  6. :cur-idx="curStep"
  7. />
  8. <div class="test" />
  9. <router-view />
  10. </div>
  11. </template>
  12. <script setup>
  13. // import { onClickOutside } from '@vueuse/core'
  14. import ProgressComp from "@/components/ProgressComp.vue"
  15. import { computed, inject, ref } from 'vue'
  16. const {
  17. windowSizeInCssForRef,
  18. windowSizeWhenDesignForRef,
  19. } = useSizeAdapt()
  20. inject('$uaInfo')
  21. inject('$env')
  22. const curStep = ref(0)
  23. const title = computed(() => {
  24. return config.stepList[curStep.value].name
  25. })
  26. </script>
  27. <style lang="less">
  28. // html, body {
  29. // overscroll-behavior: none;
  30. // overflow: hidden;
  31. // }
  32. * {
  33. user-select: none;
  34. -webkit-touch-callout: none;
  35. }
  36. #app {
  37. height: 100%;
  38. }
  39. // 360浏览器不支持not()
  40. input, textarea {
  41. user-select: initial;
  42. }
  43. // 字体
  44. // @font-face {
  45. // font-family: 'Source Han Serif CN';
  46. // src: url('@/assets/style/SourceHanSerifCN-Regular.otf');
  47. // }
  48. // @font-face {
  49. // font-family: 'Source Han Serif CN-Bold';
  50. // src: url('@/assets/style/SourceHanSerifCN-Bold.otf');
  51. // }
  52. // i {
  53. // font-style: italic;
  54. // }
  55. // 滚动条
  56. ::-webkit-scrollbar { background: #dddecc; width: 0.3rem; height: 0.3rem; } /*宽度是对垂直滚动条而言,高度是对水平滚动条而言*/
  57. ::-webkit-scrollbar-thumb { background: #828a5b; border-radius: 0.15rem; }
  58. ::-webkit-scrollbar-corner { background: #dddecc; }
  59. // vue组件过渡效果
  60. .fade-out-leave-active {
  61. transition: opacity 1s;
  62. }
  63. .fade-out-leave-to {
  64. opacity: 0;
  65. }
  66. // 不断渐变显隐 animation
  67. .animation-show-hide {
  68. animation: show-hide 1.8s infinite;
  69. }
  70. @keyframes show-hide {
  71. 0% {
  72. opacity: 0;
  73. }
  74. 50% {
  75. opacity: 1;
  76. }
  77. 100% {
  78. opacity: 0;
  79. }
  80. }
  81. // // vue-viewer
  82. // .viewer-container {
  83. // background-color: rgba(0, 0, 0, 80%) !important;
  84. // }
  85. // 或者
  86. // .viewer-backdrop {
  87. // background-color: rgba(0, 0, 0, 90%) !important;
  88. // }
  89. </style>
  90. <style lang="less" scoped>
  91. .app-view{
  92. position: absolute;
  93. left: 0;
  94. top: 0;
  95. width: 100%;
  96. height: 100%;
  97. background-image: url(/src/assets/images/bg.jpg);
  98. background-size: cover;
  99. background-repeat: no-repeat;
  100. background-position: center center;
  101. >h1{
  102. position: absolute;
  103. top: calc(22 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));;
  104. left: 50%;
  105. transform: translateX(-50%);
  106. font-size: calc(16 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  107. font-family: Source Han Serif CN-Bold, Source Han Serif CN;
  108. font-weight: bold;
  109. color: #FFFFFF;
  110. line-height: calc(19 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  111. }
  112. >.progress{
  113. position: absolute;
  114. left: 50%;
  115. top: calc(64 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  116. width: calc(328 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));;
  117. transform: translateX(-50%);
  118. }
  119. >.test{
  120. position: absolute;
  121. left: 50%;
  122. top: calc(314 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  123. transform: translate(-50%, -50%);
  124. width: calc(328 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  125. height: calc(438 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));;
  126. background-color: #fff;
  127. }
  128. }
  129. </style>