<template>
  <div
    class="form-block"
    :style="{'width':direction == 'row'?'100%':'','height':direction != 'row'?'100%':''}"
  >
    <div class="form-block-title">
      {{ title }}
      <slot name="tool-bar"></slot>
    </div>
    <div :style="{'height':height,'overflow':'auto'}">
      <slot></slot>
    </div>
  </div>
</template>
<script>
export default {
  name: 'FormBlock',
  props: {
    title: {
      type: String,
      default() {
        return '';
      }
    },
    height: {
      type: String,
      default() {
        return '';
      }
    },
    direction: {
      type: String,
      default() {
        return 'row';
      }
    }
  }
};
</script>
<style lang="less">
@import "./index.less";
</style>
