<template>
  <el-radio-group v-model="localCheckList" :disabled="readonly" @change="val => $emit('change', val)">
    <el-radio
      v-for="item in dict.type[DictType.platform_activity_base_field]"
      :key="item.value"
      :value="item.value"
      :label="item.value"
    >
      {{ item.label }}
    </el-radio>
  </el-radio-group>
</template>

<script>
import DictType from '@/utils/dict/DictType'

export default {
  name: 'CheckSubArea',
  dicts: [DictType.platform_activity_base_field],
  model: {
    prop: 'value',
    event: 'update:value'
  },
  props: {
    value: {
      type: String,
      default: ''
    },
    readonly: {
      type: Boolean,
      default: () => false
    }
  },
  data() {
    return {
      DictType
    }
  },
  computed: {
    localCheckList: {
      get() {
        return this.value
      },
      set(val) {
        this.$emit('update:value', val)
      }
    }
  }
}
</script>

<style scoped>

</style>
