<template>
  <view class="empty-content">
    <image src="https://img.lkbang.net/xcx/empty@2x.png" mode="aspectFit" />
    <text v-if="text">{{ text }}</text>
  </view>
</template>

<script>
export default {
  props: {
    src: {
      type: String,
      default: 'empty'
    },
    text: {
      type: String,
      default: '暂无订单～'
    }
  },

  data() {
    return {
      typeSrc: {
        empty: ''
      }
    };
  },
  computed: {
    setSrc() {
      return this.typeSrc[this.src];
    }
  }
};
</script>

<style lang="less">
.empty-content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin: 0 10px 10px;
  padding: 10px;
  height: 211px;
  background: @white;
  border-radius: 6px;
  image {
    margin-bottom: 10px;
    width: 150px;
    height: 150px;
  }
  text {
    font-size: 16px;
    color: #333333;
  }
}
</style>
