<template>
  <div class="deviceStatistics card">
    <div class="card-head">
      <div class="title">当前设备历史数据</div>
      <el-radio-group v-model="radio" @change="change">
        <el-radio-button label="心率" value="1" />
        <el-radio-button label="血氧" value="2" />
        <el-radio-button label="体表温度" value="3" />
      </el-radio-group>
    </div>
    <slot name="chart"></slot>
  </div>
</template>
<script setup lang="ts">
import { ref } from "vue";

const radio = ref("1");
const emit = defineEmits(["change"]);

const change = (e) => {
  emit("change", e);
};
</script>
<style scoped lang="less">
.card {
  height: 100%;
  background: #ffffff;
  padding: 16px 10px;
  box-sizing: border-box;

  .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;
      }
    }
    .search {
      display: flex;
      align-items: center;
    }
  }
}
</style>
