<template>
  <div :class="_class">
    <!-- @slot  input组件-->
    <slot />
  </div>
</template>

<script>
const name = 'hive-input-group';
export default {
  name,
  props: {
    /**
     * 是否合并input框
     */
    collapse: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      curCollapse: this.collapse
    };
  },
  computed: {
    _class() {
      return [
        name,
        {
          [`${name}__collapse`]: this.curCollapse
        }
      ];
    }
  }
};
</script>
