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

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

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

<style lang="scss">
.empty-content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin: 0 20rpx 20rpx;
  padding: 20rpx;
  height: 422rpx;
  border-radius: 12rpx;
  image {
    margin-bottom: 20rpx;
    width: 300rpx;
    height: 300rpx;
  }
  text {
    font-size: 32rpx;
    color: #666666;
  }
}
</style>
