<template>
  <div class="card">
    <div class="title">
      <div class="title-left">
        <i :class="iconName"></i>
        <div style="margin-left: 5px">{{ title }}</div>
      </div>
      <div v-if="More" class="more">查看更多></div>
    </div>
    <div class="content">
      <slot name="content"></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: "chiCard",
  props: {
    title: {
      type: String,
      required: "",
    },
    iconName: {
      type: String,
      required: "",
    },
    More: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {};
  },
  methods: {},
};
</script>

<style scoped lang="scss">
.card {
  border-radius: 4px;
  border: 1px solid #e6ebf5;
  background-color: #ffffff;
  overflow: hidden;
  color: #303133;
  -webkit-transition: 0.3s;
  transition: 0.3s;
  box-shadow: 0 2px 12px 0 #ddd8d8;
  margin-bottom: 10px;
  .title {
    color: #000;
    display: flex;
    border-bottom: 1px solid #e6ebf5;
    padding: 14px 15px 7px 10px;
    min-height: 40px;
    justify-content: space-between;
    .title-left {
      display: flex;
      i {
        align-self: center;
        font-size: 24px;
      }
      div {
        align-self: center;
        font-size: 16px;
      }
    }
    .more{
       color: #409eff;
       align-self: flex-end;
       font-size: 12px;
    }
  }
  .content {
    min-height: 50px;
  }
}
</style>
