Mloading.vue 880 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <view class="loading">
  3. <view class="loadingIcon">
  4. <uni-icons type="spinner-cycle" size="30"></uni-icons>
  5. </view>
  6. <view class="text">
  7. {{ text }}
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. props: {
  14. text: {
  15. type: String,
  16. default: '',
  17. },
  18. },
  19. data() {
  20. return {}
  21. },
  22. mounted() {},
  23. methods: {},
  24. }
  25. </script>
  26. <style scoped lang="scss">
  27. .loading {
  28. // width: 100%;
  29. // height: 100%;
  30. padding: 40rpx;
  31. display: flex;
  32. justify-content: center;
  33. align-items: center;
  34. flex-direction: column;
  35. }
  36. .text {
  37. display: inline-block;
  38. font-size: 24rpx;
  39. color: #9999;
  40. }
  41. .loadingIcon {
  42. display: inline-block;
  43. transform: rotate(45deg);
  44. animation: rotation 4s linear infinite;
  45. }
  46. @keyframes rotation {
  47. 0% {
  48. transform: rotate(0deg);
  49. }
  50. 100% {
  51. transform: rotate(360deg);
  52. }
  53. }
  54. </style>