tui-loading.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <view class="tui-loading-init">
  3. <view class="tui-loading-center"></view>
  4. <view class="tui-loadmore-tips">{{text}}</view>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. name: "tuiLoading",
  10. props: {
  11. text: {
  12. type: String,
  13. default: "正在加载..."
  14. }
  15. }
  16. }
  17. </script>
  18. <style scoped>
  19. .tui-loading-init {
  20. min-width: 200rpx;
  21. min-height: 200rpx;
  22. max-width: 500rpx;
  23. display: flex;
  24. align-items: center;
  25. justify-content: center;
  26. flex-direction: column;
  27. position: fixed;
  28. top: 50%;
  29. left: 50%;
  30. transform: translate(-50%, -50%);
  31. z-index: 9999;
  32. font-size: 26rpx;
  33. color: #fff;
  34. background-color: rgba(0, 0, 0, 0.7);
  35. border-radius: 10rpx;
  36. }
  37. .tui-loading-center {
  38. width: 50rpx;
  39. height: 50rpx;
  40. border: 3px solid #fff;
  41. border-radius: 50%;
  42. margin: 0 6px;
  43. display: inline-block;
  44. vertical-align: middle;
  45. clip-path: polygon(0% 0%, 100% 0%, 100% 40%, 0% 40%);
  46. animation: rotate 1s linear infinite;
  47. margin-bottom: 36rpx;
  48. }
  49. .tui-loadmore-tips {
  50. text-align: center;
  51. padding: 0 20rpx;
  52. box-sizing: border-box;
  53. }
  54. @-webkit-keyframes rotate {
  55. from {
  56. transform: rotatez(0deg);
  57. }
  58. to {
  59. transform: rotatez(360deg);
  60. }
  61. }
  62. @keyframes rotate {
  63. from {
  64. transform: rotatez(0deg);
  65. }
  66. to {
  67. transform: rotatez(360deg);
  68. }
  69. }
  70. </style>