<template>
  <div class="view-title" :style="{height:props.height}">
    <div class="title-row">
      <div class="row-bg"></div>
      <div class="row-text">{{ title }}</div>
    </div>
    <div class="data-panel">
    <slot></slot>
    </div>
  </div>
</template>

<script setup>
const props = defineProps({

  // 数量限制
  title: {
    type: String,
    default: '默认标题',
  },
  height: {
    type: String,
    default: '50%',
  },
});
</script>

<style scoped>
.view-title{
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.title-row{
  position: relative;
  .row-bg{
    height: 35px;
    width: 74px;
    background: url("@/assets/images/view-title.png") ;
    background-size: 100% 100%;
  }
  .row-text{
    position: absolute;
    top: 50%;
    left: 28px;
    font-size: 17px;
    color: #FFFFFF;
    transform: translateY(-50%);
    font-family: "Alibaba-PuHuiTi-Regular.otf";
  }
}
.data-panel{
  flex: 1;
}
</style>
