<template>
  <div id="radio">
    <pl-data-radio-box v-if="bindProps.radioType === 'sysData'" v-model='spcpFormData[fieldId]' v-bind="bindProps">
    </pl-data-radio-box>

    <el-radio-group v-else-if="bindProps.radioType === 'radio'" v-model='spcpFormData[fieldId]'
                    size="small"
                    :style="{'width': width, 'height': height}">
      <el-radio v-for="(item, index) in bindProps.optionSetting"
               :key="index"
               :label="item.value || item.label"
               :disabled="disabled"
               :size="size"
      >
        {{item.label}}
      </el-radio>
    </el-radio-group>
  </div>
</template>
<script>
import proto from '../spcp-proto.vue';
import PlDataRadioBox from "../../tableviewRenderComp/plDataRadioBox";
export default {
    name: "spcp-radio",
    components: {PlDataRadioBox},
    extends: proto,
    props:{
      radioType:{type:String, default:'sysData'},
      value:{type:String},
      field:{type:String},
      size:{type:String,default:"small"},
      height:{type:String,default:""},
      disabled:{type:Boolean,default:false},
      typeId:{type:String,required:false},
      parentId:{type:String,default:""},
      showText:{type:Boolean,default:false},
      rememberSysDataObj:{type:Function},
      optionSetting:{type:Array},
    },
    data(){
        return {

        }
    },
    created() {
    },
}
</script>
<style scoped>

</style>
