<template>
  <div class="section" :style="{ height: height }">
    <Title :title="title" v-if="title"> </Title>
    <div :class="[title ? 'container' : 'notitle-container']">
      <slot />
    </div>
  </div>
</template>
<script>
export default {
  name: "Section",
  props: {
    title: {
      type: String,
      default: "",
    },
    height: {
      type: String,
      default: "400px",
    },
    type: {
      type: String,
    },
  },
};
</script>
<style lang="less" scoped>
.notitle-container {
  height: 100%;
}
.container {
  height: calc(100% - 34px);
}
</style>