loading.vue 665 B

1234567891011121314151617181920212223242526272829303132333435
  1. <template>
  2. <view class="load" v-if="props.show">
  3. <uv-loading-icon :text="props.text" textSize="28rpx" timing-function="linear" :show="isLoad" color="#fff"
  4. textColor="#fff"></uv-loading-icon>
  5. </view>
  6. </template>
  7. <script setup>
  8. import {
  9. onMounted,
  10. ref
  11. } from 'vue';
  12. const props = defineProps({
  13. show: Boolean,
  14. text: String,
  15. })
  16. </script>
  17. <style lang="scss" scoped>
  18. .load {
  19. width: 300rpx;
  20. height: 180rpx;
  21. display: flex;
  22. justify-content: center;
  23. align-items: center;
  24. position: fixed;
  25. left: 50%;
  26. top: 50%;
  27. border-radius: 20rpx;
  28. background-color: rgba(0, 0, 0, 0.4);
  29. z-index: 999;
  30. transform: translate(-50%, -50%);
  31. }
  32. </style>