<template>
  <LabelBox
    :label="formItems.attrs?.label"
    :need-star="formItems.attrs?.needStar"
    :width="formItems.attrs?.width"
  >
    <el-radio-group
      class="radio"
      size="mini"
      :value="value"
      @input="handleInputEvent"
    >
      <el-radio
        v-for="(options, i) in formItems.options"
        :key="i"
        :label="options.label"
      >
        {{ options.value }}
      </el-radio>
    </el-radio-group>
  </LabelBox>
</template>

<script>
import LabelBox from '../labelBox/index.vue';

export default {
  components: {
    LabelBox,
  },
  props: {
    formItems: {
      type: Object,
      default: () => {},
    },
    value: {
      type: String,
      default: '',
    },
  },
};
</script>
<style lang="scss" scoped>
.radio {
  min-height: 30px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
}
</style>

