<template>
  <div class="no-data">
    <div class="no-data-box">
      <img :src="noData" alt="抱歉，没找到相关数据" />
      <div v-if="record">抱歉，您还未添加跟进动态</div>
      <template v-else>
        <div v-if="text">抱歉，您还未添加{{text}}项目</div>
        <div v-else>抱歉，没找到相关数据</div>
      </template>
      <span v-if="condition">建议调整关键词或筛选条件，重新搜索</span>
    </div>
  </div>
</template>

<script>
export default {
  name: "noData",
  props: {
    record: {
      type: Boolean,
      default: false
    },
    condition: {
      type: Boolean,
      default: false
    },
    text: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      noData: require("@/assets/images/detail/noData.png")
    };
  },
  methods: {

  }
}
</script>

<style lang="scss" scoped>
.no-data {
  font-size: 14px;
  color: #999999;
  width: 100%;
  height: 100%;
  min-height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ffffff;
  //border: 1px solid #eeeeee;
  .no-data-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    img {
      width: 108px;
      height: 109px;
      margin-bottom: 22px;
    }
    div {
      font-size: 16px;
      line-height: 1;
      color: #333333;
    }
    span {
      margin-top: 4px;
    }
  }
}
</style>
