Skip to content
On this page

Radio

When To Use

  • Used to select a single state from multiple options.
  • The difference from Select is that Radio is visible to the user and can facilitate the comparison of choice, which means there shouldn't be too many of them.

TIP

This component fully supports Radio component attribute of ant design

Examples

<template>
    <h-radio  v-model:value="value1" :save-options="{autoSave:true,key:'value1'}" >
        <a-radio-button value="a">Hi</a-radio-button>
        <a-radio-button value="b">He3</a-radio-button>
    </h-radio>
</template>
  
<script setup lang="ts">
    import { ref } from 'vue';
  
    const value1 = ref('a');
</script>
  

API

Props

PropertyDescriptionTypedefault
saveOptionsAutomatically upload and initialize component data.
Note ⚠️: Multiple key values under the same tool need to be unique.
objectautoSave:false,key:""