<template>
  <div class="deviceStatistics card">
    <div class="card-head">
      <div class="title">内容数据</div>
      <SectionDate @change="api" />
    </div>
    <slot name="chart"></slot>
  </div>
</template>
<script setup>
import SectionDate from "@/components/sectionDate.vue";

const props = defineProps({
  api: {
    type: Function,
    required: true,
  },
});
</script>
<style scoped lang="less">
.card {
  height: 380px;
  height: 100%;
  background: #ffffff;
  padding: 16px 10px;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 5px;
  box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.12);
  margin-bottom: 20px;
  .card-head {
    color: #061451;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transform: translateX(-10px);
    .title {
      &::before {
        display: inline-block;
        margin-right: 10px;
        content: "";
        width: 2px;
        height: 14px;
        border-radius: 20px;
        background: #061451;
      }
    }
  }
}
</style>
