Mloading.vue 874 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. },
  23. mounted() {
  24. },
  25. methods: {
  26. }
  27. }
  28. </script>
  29. <style scoped lang="scss">
  30. .loading {
  31. // width: 100%;
  32. // height: 100%;
  33. padding: 20px;
  34. display: flex;
  35. justify-content: center;
  36. align-items: center;
  37. flex-direction: column;
  38. }
  39. .text {
  40. display: inline-block;
  41. font-size: 12px;
  42. color: #9999;
  43. }
  44. .loadingIcon {
  45. display: inline-block;
  46. transform: rotate(45deg);
  47. animation: rotation 4s linear infinite;
  48. }
  49. @keyframes rotation {
  50. 0% {
  51. transform: rotate(0deg);
  52. }
  53. 100% {
  54. transform: rotate(360deg);
  55. }
  56. }
  57. </style>