
<template>
    <div>
      <div class="item_title" v-if="title !== ''">
        <span class="border-title"> &nbsp;&nbsp;{{ title }}&nbsp;&nbsp; </span>
      </div>
      <div
          :class="title !== '' ? 'item_title_content' : 'item_title_content_def'"
      >
        <slot></slot></div>
    </div>
</template>
<script setup lang="ts" name="item_wrap">
const props = withDefaults(
    defineProps<{
      // 标题
      title: number | string;
    }>(),
    {
      title: "",
    }
);
</script>
<style scoped lang="scss">
$item-title-height: 18px;
$item_title_content-height: calc(100% - $item-title-height + 10px);

.item_title {
  height: $item-title-height;
  line-height: $item-title-height;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  padding-bottom: 10px;
}

:deep(.dv-border-box-content)  {
  box-sizing: border-box;
  padding: 6px 16px 0px;
}

.item_title_content {
  height: $item_title_content-height;
}

.item_title_content_def {
  width: 100%;
  height: 100%;
}
</style>
