多租户商城-商户小程序端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

148 lines
2.5 KiB

2 years ago
2 years ago
2 years ago
2 years ago
  1. <!--
  2. * @FileDescription: 底部
  3. * @Author: kahu
  4. * @Date: 2023/3/7
  5. * @LastEditors: kahu
  6. * @LastEditTime: 2023/3/7
  7. -->
  8. <template>
  9. <view class="bottom_tips_content">
  10. <view :class="['line_inner_row',loading?'is_loading':'']">
  11. <view class="text_box">
  12. <view
  13. :class="['text_item', loading?'text_loading':'',`delay-${index % 10}`]"
  14. v-for="(item,index) in type===0?(onBottomText || $t('common.alldataloadfinish')):(loadingText || $t('common.load'))"
  15. :key="index"
  16. >
  17. {{ item }}
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. name: "ListBottomTips",
  26. data() {
  27. return {}
  28. },
  29. props: {
  30. loadingText: {
  31. type: String,
  32. default: ''
  33. },
  34. onBottomText:{
  35. type:String,
  36. default:''
  37. },
  38. type:{
  39. type:Number,
  40. default:0 // 0底部1加载
  41. },
  42. loading:{
  43. type:Boolean,
  44. default:true
  45. }
  46. },
  47. methods: {}
  48. }
  49. </script>
  50. <style
  51. lang="scss"
  52. scoped
  53. >
  54. .bottom_tips_content {
  55. padding: 20rpx 30rpx;
  56. box-sizing: border-box;
  57. .line_inner_row {
  58. width: 100%;
  59. position: relative;
  60. display: flex;
  61. align-items: center;
  62. justify-content: space-around;
  63. font-weight: bold;
  64. .text_box {
  65. display: flex;
  66. .text_item {
  67. animation-delay: calc(.1s * var(--jumpTime))
  68. }
  69. .delay-0{
  70. animation-delay: calc(0s )
  71. }
  72. .delay-1{
  73. animation-delay: calc(.1s )
  74. }
  75. .delay-2{
  76. animation-delay: calc(.2s )
  77. }
  78. .delay-3{
  79. animation-delay: calc(.3s )
  80. }
  81. .delay-4{
  82. animation-delay: calc(.4s )
  83. }
  84. .delay-5{
  85. animation-delay: calc(.5s )
  86. }
  87. .delay-6{
  88. animation-delay: calc(.6s )
  89. }
  90. .delay-7{
  91. animation-delay: calc(.7s )
  92. }
  93. .delay-8{
  94. animation-delay: calc(.8s )
  95. }
  96. .delay-9{
  97. animation-delay: calc(.9s )
  98. }
  99. }
  100. &:before, &:after {
  101. flex-shrink: 0;
  102. flex-grow: 0;
  103. content: '';
  104. width: 20%;
  105. height: 5rpx;
  106. border-radius: 8rpx;
  107. background-color: #898989;
  108. }
  109. }
  110. .is_loading {
  111. animation: breathe 1s ease-in-out 0s infinite alternate;
  112. }
  113. .text_loading{
  114. animation: jump 2s ease-in-out infinite;
  115. }
  116. }
  117. @keyframes breathe {
  118. from {
  119. opacity: 1;
  120. }
  121. to {
  122. opacity: .5;
  123. }
  124. }
  125. @keyframes jump {
  126. 30% {
  127. transform: translateY(-12rpx)
  128. }
  129. 60% {
  130. transform: translateY(12rpx)
  131. }
  132. 0%,100% {
  133. transform: translateY(0rpx)
  134. }
  135. }
  136. </style>