refresh-box.uvue 879 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
<template>

    <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>

</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;
雪洛's avatar
雪洛 已提交
34
    width: 100%;
35 36 37 38 39 40 41 42 43 44 45 46 47 48
    height: 30px;
  }

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

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