refresh-box.uvue 874 字节
Newer Older
1 2 3
<template>
  <view>
    <view slot="refresher" class="refresh-box">
DCloud_JSON's avatar
DCloud_JSON 已提交
4
      <image v-if="state == 2" class="refresh-icon" src="/static/template/custom-refresher/refresh-box/run.gif" mode="widthFix"></image>
5 6 7 8 9 10 11 12 13
      <text class="tip-text">{{text[state]}}</text>
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
DCloud_JSON's avatar
DCloud_JSON 已提交
14
        text: ['继续下拉执行刷新', '释放立即刷新', '刷新中']
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
      }
    },
    props: {
      state: {
        type: Number,
        default: 0
      },
      methods: {

      }
    }
  }
</script>

<style>
  .refresh-box {
    justify-content: center;
DCloud_JSON's avatar
DCloud_JSON 已提交
32 33 34
    align-items: center;
    flex-direction: row;
    height: 30px;
35 36
  }

DCloud_JSON's avatar
DCloud_JSON 已提交
37 38 39 40
  .refresh-icon {
    width: 20px;
    height: 20px;
    margin: 5px;
41 42 43 44 45 46 47
  }

  .tip-text {
    color: #888;
    font-size: 12px;
  }
</style>