<template>
  <a-radio-group
    v-bind="$attrs.item"
    v-model="modelList[name]"
    @change="(e)=>findEvent({e})"
  >
    <template v-if="$attrs.item.radioType && $attrs.item.radioType === 'button'">
      <a-radio-button
        :value="item.value"
        v-for="item in $attrs.item.radioOptions"
        :key="item.value"
      >
        {{ item.label }}
      </a-radio-button>
    </template>
    <template v-else>
      <a-radio
        :value="item.value"
        v-for="item in $attrs.item.radioOptions"
        :key="item.value"
      >
        {{ item.label }}
      </a-radio>
    </template>
  </a-radio-group>
</template>

<script>
import formMixin from "@/minxin/form.mixin.js";
import { Radio } from "ant-design-vue";
import Vue from 'vue'
Vue.use(Radio)
export default {
  mixins: [formMixin],
  props: {
    name: {},
    modelList: {},
    funcList: {},
  },
};
</script>
