
export default {
  name: 'my-select',
  render (h) {
    const data = this.obj
    const inputAttrs = {
      placeholder: data.fieldHint,
      required: data.required
    }
    const optionItem = this.obj.items.map((v) =>
      <el-option label={v.label} value={v.value}></el-option>
    )
    return (
      <el-form-item label={this.obj.fieldNm} required={this.obj.required == 1} style="width:100%;margin-bottom:10px!important">
        <el-select style="width:100%" v-model={data.value} attrs={inputAttrs}>
          {optionItem}
        </el-select>
      </el-form-item>
    );
  },
  props: {
    obj: {
      type: Object,
      default: {}
    }
  }
}
