<template>
  <div style="text-align:center">
    <img
      src="~@/assets/img/data_m/nodata.png"
      alt=""
      :style="dynamicStyle"
    />
    <span>{{text}}</span>
  </div>
</template>

<script>
export default {
  computed: {
    dynamicStyle() {
      return this.size==='mini' 
        ? `display: block;
          width: auto;
          height: 150px;
          margin: 20px auto 10px;`
        : ` display: block;
            width: auto;
            height: 250px;
						margin: 0 auto;`
    }
  },
  props: {
    text: {
      type: String,
      default: '暂无数据'
    },
    size: {
      type: String,
      default: ''
    }
  }
}
</script>