<!--
 * @Author: 曹捷
 * @Date: 2021-01-25 10:30:31
 * @LastEditors: 曹捷
 * @LastEditTime: 2021-10-21 16:34:54
 * @Description: fileContent
-->
<template>
  <div style="padding-top: 12px">
    <div :class="{ paddingSpec: !needPadding ,'h100':full }" class="fromTitle">
      <div class="title_box">
        <span>{{ fromtitle.title1 }}</span>
        <span>{{ fromtitle.title2 }}</span>
      </div>
      <slot />
    </div>
  </div>
</template>

<script>
export default {
  name: 'ZlContentForm',
  props: {
    full: {
      type: Boolean,
      default: false
    },
    fromtitle: {
      type: Object,
      default () {
        return {
          title1: '模块标题',
          title2: '模块信息说明'
        }
      }
    },
    needPadding: {
      type: Boolean,
      default: true
    }
  }
}
</script>
<style scoped lang="less">
//页面中的from盒子
.fromTitle {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid @border;
  padding: 25px;
  position: relative;
  font-size: 14px;
  transition: all 0.8s;
  border-radius: 4px;
  &.paddingSpec {
    padding: 10px;
  }
  .title_box {
    height: 25px;
    position: absolute;
    top: -12px;
    left: 10px;
    span:nth-child(1) {
      display: inline-block;
      min-width: 80px;
      padding: 0 10px;
      height: 25px;
      line-height: 25px;
      text-align: center;
      background-color: #eaebe5;
      border-radius: 13px;
      font-weight: bold;
      color: #606842;
      margin-right: 15px;
    }
    span:nth-child(2) {
      color: #999;
      margin-right: 10px;
      background: @bodyBackColor;
      padding: 0 10px;
    }
  }
}
</style>
