en-loading.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <template>
  2. <view>
  3. <view class="mine-dialog" :class="{'mine-dialog-black':isBlack}">
  4. <view class="loader-inner ball-spin-fade-loader">
  5. <view></view>
  6. <view></view>
  7. <view></view>
  8. <view></view>
  9. <view></view>
  10. <view></view>
  11. <view></view>
  12. <view></view>
  13. </view>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. export default {
  19. name: "en-loading",
  20. props: {
  21. 'isBlack':{
  22. default:false
  23. }
  24. },
  25. components: {},
  26. data() {
  27. return {}
  28. },
  29. mounted() {
  30. },
  31. methods: {}
  32. }
  33. </script>
  34. <style scoped lang="scss">
  35. .mine-dialog{
  36. position: fixed;
  37. left: 0;
  38. top: 0;
  39. right: 0;
  40. bottom: 0;
  41. z-index: 999;
  42. .loader-inner{ position: absolute; left: 0; top: 0; right: 0; bottom: 0; width: 50px; height: 50px; margin: auto;}
  43. }
  44. .mine-dialog-black{
  45. background: #17191D;
  46. }
  47. @-webkit-keyframes ball-spin-fade-loader {
  48. 50% {
  49. opacity: 0.3;
  50. -webkit-transform: scale(0.4);
  51. transform: scale(0.4); }
  52. 100% {
  53. opacity: 1;
  54. -webkit-transform: scale(1);
  55. transform: scale(1); } }
  56. @keyframes ball-spin-fade-loader {
  57. 50% {
  58. opacity: 0.3;
  59. -webkit-transform: scale(0.4);
  60. transform: scale(0.4); }
  61. 100% {
  62. opacity: 1;
  63. -webkit-transform: scale(1);
  64. transform: scale(1); } }
  65. .ball-spin-fade-loader {
  66. position: relative;
  67. }
  68. .ball-spin-fade-loader > view:nth-child(1) {
  69. top: 32px;
  70. left: 17px;
  71. -webkit-animation: ball-spin-fade-loader 1s 0s infinite linear;
  72. animation: ball-spin-fade-loader 1s 0s infinite linear;
  73. }
  74. .ball-spin-fade-loader > view:nth-child(2) {
  75. top: 28.04545px;
  76. left: 28.04545px;
  77. -webkit-animation: ball-spin-fade-loader 1s 0.12s infinite linear;
  78. animation: ball-spin-fade-loader 1s 0.12s infinite linear;
  79. }
  80. .ball-spin-fade-loader > view:nth-child(3) {
  81. top: 17px;
  82. left: 32px;
  83. -webkit-animation: ball-spin-fade-loader 1s 0.24s infinite linear;
  84. animation: ball-spin-fade-loader 1s 0.24s infinite linear;
  85. }
  86. .ball-spin-fade-loader > view:nth-child(4) {
  87. top: 6.04545px;
  88. left: 28.04545px;
  89. -webkit-animation: ball-spin-fade-loader 1s 0.36s infinite linear;
  90. animation: ball-spin-fade-loader 1s 0.36s infinite linear;
  91. }
  92. .ball-spin-fade-loader > view:nth-child(5) {
  93. top: 2px;
  94. left: 17px;
  95. -webkit-animation: ball-spin-fade-loader 1s 0.48s infinite linear;
  96. animation: ball-spin-fade-loader 1s 0.48s infinite linear;
  97. }
  98. .ball-spin-fade-loader > view:nth-child(6) {
  99. top: 6.04545px;
  100. left: 6.04545px;
  101. -webkit-animation: ball-spin-fade-loader 1s 0.6s infinite linear;
  102. animation: ball-spin-fade-loader 1s 0.6s infinite linear;
  103. }
  104. .ball-spin-fade-loader > view:nth-child(7) {
  105. top: 17px;
  106. left: 2px;
  107. -webkit-animation: ball-spin-fade-loader 1s 0.72s infinite linear;
  108. animation: ball-spin-fade-loader 1s 0.72s infinite linear;
  109. }
  110. .ball-spin-fade-loader > view:nth-child(8) {
  111. top: 28.04545px;
  112. left: 6.04545px;
  113. -webkit-animation: ball-spin-fade-loader 1s 0.84s infinite linear;
  114. animation: ball-spin-fade-loader 1s 0.84s infinite linear;
  115. }
  116. .ball-spin-fade-loader > view {
  117. background-color: #AAAAAA;
  118. width: 10px;
  119. height: 10px;
  120. border-radius: 100%;
  121. margin: 2px;
  122. -webkit-animation-fill-mode: both;
  123. animation-fill-mode: both;
  124. position: absolute;
  125. }
  126. </style>