<template>
  <el-radio-group v-model="radioVal" @change="radioGroupChange">
    <el-radio :label="item.customOptionId" v-for="item in radioOptions" :key="item.customOptionId">{{item.customOption}}</el-radio>
  </el-radio-group>
</template>

<script>
    export default {
        name: "Radio",
        components: {  },
        props: {
            radioOptions: {
                type: Array,
                default() {
                    return []
                }
            },
            radioValF: {
                type: Number,
                default:null,
            },
        },
        watch:{
            radioValF:{
                immediate:true,
                handler(val){
                    this.radioVal = val;
                }
            },
        },
        computed: {

        },
        data() {
            return {
              radioVal:'',
            }
        },
        created() {

        },
        methods: {
            radioGroupChange(node, instanceId){
                this.$emit('radioFn', this.radioVal);
            },
        }
    }
</script>

<style scoped>

</style>
