<!--
 * @Author: 雷佳斌 leijiabin@yunjinhz.com
 * @Date: 2025-03-30 14:30:28
 * @LastEditors: 雷佳斌 leijiabin@yunjinhz.com
 * @LastEditTime: 2025-03-30 20:04:03
 * @FilePath: \research_kyxt\src\components\basic-card\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div class="basic-card">
    <div v-if="title" class="basic-card__title">
      <span class="divider"></span>
      <span class="title">{{ title }}</span>
      <div class="actions">
        <slot name="actions"></slot>
      </div>
    </div>
    <div class="basic-card__content">
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: "BasicCard",
  props: {
    title: String,
  },
};
</script>

<style lang="scss" scoped>
.basic-card {
  background: #fff;
  border-radius: 3px;
  padding: 5px 20px 20px;
  box-sizing: border-box;
  &__title {
    padding-bottom: 5px;
    line-height: 40px;
    .divider {
      display: inline-block;
      width: 4px;
      height: 20px;
      background-color: rgb(64, 158, 255);
      margin-right: 10px;
      vertical-align: middle;
    }
    .title {
      display: inline-block;
      color: #333;
      font-weight: 600;
      vertical-align: middle;
      font-size: 16px;
      margin-bottom: 2px;
    }
    .actions {
      float: right;
    }
    border-bottom: 1px solid #eee;
  }
}
</style>