refresh-box.uvue 845 字节
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
<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
      }
    }
  }
</script>

<style>
  .refresh-box {
    justify-content: center;
    align-items: center;
    flex-direction: row;
雪洛's avatar
雪洛 已提交
29
    width: 100%;
30 31 32 33 34 35 36 37 38 39 40 41 42 43
    height: 30px;
  }

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

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