refresh-box.uvue 848 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <list-item slot="refresher" class="refresh-box">
  3. <image v-if="state == 2" class="refresh-icon" src="https://web-ext-storage.dcloud.net.cn/hello-uni-app-x/refresh-box-run.gif" mode="widthFix"></image>
  4. <text class="tip-text">{{text[state]}}</text>
  5. </list-item>
  6. </template>
  7. <script>
  8. export default {
  9. data() {
  10. return {
  11. text: ['继续下拉执行刷新', '释放立即刷新', '刷新中', ""]
  12. }
  13. },
  14. props: {
  15. state: {
  16. type: Number,
  17. default: 0
  18. },
  19. methods: {
  20. }
  21. }
  22. }
  23. </script>
  24. <style>
  25. .refresh-box {
  26. justify-content: center;
  27. align-items: center;
  28. flex-direction: row;
  29. height: 30px;
  30. }
  31. .refresh-icon {
  32. width: 20px;
  33. height: 20px;
  34. margin: 5px;
  35. }
  36. .tip-text {
  37. color: #888;
  38. font-size: 12px;
  39. }
  40. </style>