<template>
  <view>
    <view slot="refresher" class="refresh-box">
      <image v-if="state == 2" class="refresh-icon" src="/static/template/custom-refresher/refresh-box/run.gif" mode="widthFix"></image>
      <text class="tip-text">{{text[state]}}</text>
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        text: ['继续下拉执行刷新', '释放立即刷新', '刷新中', ""]
      }
    },
    props: {
      state: {
        type: Number,
        default: 0
      },
      methods: {

      }
    }
  }
</script>

<style>
  .refresh-box {
    justify-content: center;
    align-items: center;
    flex-direction: row;
    height: 30px;
  }

  .refresh-icon {
    width: 20px;
    height: 20px;
    margin: 5px;
  }

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