<template>
  <div class="box-main" :style="{ width: width || '1064px', height: height || '460px' }">
    <div class="box-head-box">
      <div class="box-head-left">
        <slot name="header-icon"></slot>
      </div>
      <div class="box-head-name one-line-ellipsis">{{ title }}</div>
      <div class="box-head-right">
        <slot name="header-right"></slot>
      </div>
    </div>
    <div class="box-down-box">
      <slot></slot>
    </div>
  </div>
</template>

<script setup>
import { ref, computed } from 'vue'

const props = defineProps({
  title: {
    type: String,
    default: ''
  },
  width: {
    type: String,
    default: ''
  },
  height: {
    type: String,
    default: ''
  }
})


</script>

<style lang="scss" scoped>
.box-main {
  border: 1px solid rgba(234, 236, 238, 1);
  border-radius: 10px;
  box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
  background: rgba(255, 255, 255, 1);
  display: flex;
  flex-direction: column;

  .box-head-box {
    padding: 0 22px;
    height: 48px;
    border-bottom: 1px solid rgba(240, 242, 244, 1);
    display: flex;
    align-items: center;
    width: 100%;
    .box-head-left {
      width: 24px;
      height: 24px;
      font-size: 0px;
      margin-right: 16px;
    }
    .box-head-name {
      color: var(--color-main-active);
      font-family: Source Han Sans CN;
      font-size: 20px;
      font-weight: bold;
      line-height: 20px;
      width: 20px;
      flex: auto;
    }
    .box-head-right {
      margin-left: 16px;
    }
  }

  .box-down-box {
    height: 20px;
    flex: auto;
    overflow: hidden;
  }
}
</style>
