uni-im-load-state.vue 1.1 KB
Newer Older
DCloud_JSON's avatar
DCloud_JSON 已提交
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 34 35 36 37 38 39 40 41 42
<template>
  <view class="refresh-box">
    <image v-if="status == 'loading'" class="refresh-icon" src="/uni_modules/uni-im/static/run.gif" mode="widthFix"></image>
    <text class="refresh-text">{{status == 'loading'?contentText.contentrefresh:contentText.contentnomore}}</text>
  </view>
</template>

<script>
  export default {
    props: {
      status: {
        type: String,
        default: "loading"
      },
      contentText: {
        type: Object,
        default () {
          return {
            "contentrefresh": "加载中...",
            "contentnomore": "- 没有相关数据 -"
          }
        }
      }
    }
  }
</script>

<style>
  /* #ifndef APP-NVUE */
  view {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }
  /* #endif */
  .refresh-box {
    height: 50px;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    /* #ifdef APP-NVUE */
    width: 750rpx;
DCloud_JSON's avatar
DCloud_JSON 已提交
43 44
    /* #endif */
    flex: 1;
DCloud_JSON's avatar
DCloud_JSON 已提交
45 46 47 48 49 50 51 52 53 54 55 56
  }
  .refresh-icon {
    width: 25px;
    height: 25px;
    margin: 5px;
  }

  .refresh-text {
    color: #bbb;
    font-size: 14px;
  }
</style>