index.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <view v-if="loadingFlag" class="loading-content" @touchmove.stop.prevent="moveHandle" @click.stop.prevent="moveHandle">
  3. <!-- 遮罩 -->
  4. <view v-if="false" catchtouchmove="true" class="full-mask" />
  5. <!-- loading -->
  6. <view class="loading-gif">
  7. <view class="flex mask">
  8. <image src="../../static/images/origin/loading.gif" />
  9. <!-- <p> {{ loadingInfo }} </p> -->
  10. </view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. import { mapGetters } from 'vuex'
  16. export default {
  17. name: 'GloableLoading',
  18. data() {
  19. return {
  20. flag: true
  21. }
  22. },
  23. mounted() {
  24. },
  25. methods: {
  26. moveHandle() {
  27. }
  28. },
  29. computed: {
  30. ...mapGetters(['loadingFlag', 'loadingInfo'])
  31. }
  32. }
  33. </script>
  34. <style lang="scss" scoped>
  35. .loading-content {
  36. position: fixed;
  37. top: 0;
  38. left: 0;
  39. width: 100vw;
  40. height: 100vh;
  41. z-index: 9999;
  42. //pointer-events: none;
  43. .mask {
  44. //background-color: rgba(75, 53, 53, 0.52);
  45. }
  46. .full-mask {
  47. position: absolute;
  48. width: 100vw;
  49. height: 100vh;
  50. background-color: rgba(0, 0, 0, 0.52);
  51. z-index: 9998;
  52. pointer-events: none;
  53. }
  54. .loading-gif {
  55. z-index: 9999;
  56. position: relative;
  57. width: 100%;
  58. height: 100%;
  59. .flex {
  60. width: 200rpx;
  61. height: 200rpx;
  62. position: absolute;
  63. border-radius: 15rpx;
  64. top: 50%;
  65. left: 50%;
  66. transform: translate(-50%, -50%);
  67. display: flex;
  68. align-items: center;
  69. justify-content: center;
  70. flex-direction: column;
  71. image {
  72. width: 150rpx;
  73. height: 150rpx;
  74. }
  75. p {
  76. color: #fff;
  77. }
  78. }
  79. }
  80. }
  81. </style>