uni-im-load-state.vue 997 字节
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
<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>

28
<style lang="scss" scoped>
DCloud_JSON's avatar
DCloud_JSON 已提交
29 30 31 32 33
  .refresh-box {
    height: 50px;
    justify-content: center;
    align-items: center;
    flex-direction: row;
DCloud_JSON's avatar
DCloud_JSON 已提交
34
    width: 100%;
DCloud_JSON's avatar
DCloud_JSON 已提交
35 36 37 38 39 40 41 42 43
  }
  .refresh-icon {
    width: 25px;
    height: 25px;
    margin: 5px;
  }

  .refresh-text {
    color: #bbb;
DCloud_JSON's avatar
DCloud_JSON 已提交
44
    font-size: 14px;
DCloud_JSON's avatar
DCloud_JSON 已提交
45 46
  }
</style>