loading.vue 742 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <transition name="fade">
  3. <div class="mod-loading" v-show="show">
  4. <i class="icon loading-icon"></i>
  5. </div>
  6. </transition>
  7. </template>
  8. <style lang="scss">
  9. .mod-loading{
  10. position: fixed;
  11. z-index: 5000;
  12. width: 80px;
  13. height: 80px;
  14. top: 50%;
  15. left: 50%;
  16. transform: translate(-50%, -50%);
  17. border-radius: 10px;
  18. display: flex;
  19. justify-content: center;
  20. align-items: center;
  21. background-color: rgba($color: #000000, $alpha: .6);
  22. .loading-icon{
  23. background: url('img/loading.png') center center no-repeat;
  24. background-size: 100%;
  25. width: 50px;
  26. height: 50px;
  27. animation: rotate 1.7s linear infinite;
  28. }
  29. }
  30. @keyframes rotate {
  31. from {
  32. transform: rotate(0deg);
  33. }
  34. to {
  35. transform: rotate(360deg);
  36. }
  37. }
  38. </style>