RadioGroup.vue 347 B

1234567891011121314151617
  1. <template>
  2. <div class="ptc-radio-group"><slot /></div>
  3. </template>
  4. <script setup lang="ts">
  5. import { provide, toRef } from 'vue'
  6. const props = defineProps<{ modelValue: any }>()
  7. const emit = defineEmits<{
  8. (e: 'update:modelValue', value: any): void
  9. }>()
  10. provide('RadioGroup', {
  11. modelValue: toRef(props, 'modelValue'),
  12. emit,
  13. })
  14. </script>