<template>

  <el-radio-group v-model="selected">
    <el-radio v-for="item in options" :key="item.id" :value="item.value">{{ item.label }}</el-radio>
  </el-radio-group>

</template>

<script lang='ts' setup>

import { getDictDataPage } from '@/api/system/dict/dict.data.ts'

const props = defineProps<{
  code: string
}>()

const options = ref([])
const selected = defineModel()

onBeforeMount(async () => {

  const { list } = await getDictDataPage({ dictType: props.code })
  options.value = list

})

</script>

<style lang='scss' scoped>

</style>