<template>
  <div class="no-data" :class="clazz" v-if="isShow" >
    <van-icon name="orders-o" size="40px" color="#bbbec4" />
    <div>{{name}}</div>
  </div>
</template>
<script>
export default {
  props: {
    clazz: {
      type: 'String',
      default: ''
    },
    name: {
      type: 'String',
      default: '暂无数据'
    },
    options: {
      default: false
    }
  },
  computed: {
    isShow() {
      console.log(this.options, 'this.options');
      if(this.options == null) {
        return false;
      }
      if (typeof this.options === 'boolean') {
        return this.options;
      } else {
        return !(this.options && this.options.length > 0);
      }
    }
  }
};
</script>


<style>
.no-data {
  text-align: center;
  padding-top: 50rpx;
  color: #bbbec4;
  font-size: 30rpx;
}
</style>
