You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/components/radio/demo/radioButton.vue

53 lines
1.4 KiB

<docs>
---
order: 2
title:
zh-CN: 按钮样式
en-US: radio style
---
## zh-CN
按钮样式的单选组合
## en-US
The combination of radio button style.
</docs>
<template>
<div>
<div>
<a-radio-group v-model:value="value1">
<a-radio-button value="a">Hangzhou</a-radio-button>
<a-radio-button value="b">Shanghai</a-radio-button>
<a-radio-button value="c">Beijing</a-radio-button>
<a-radio-button value="d">Chengdu</a-radio-button>
</a-radio-group>
</div>
<div :style="{ marginTop: '16px' }">
<a-radio-group v-model:value="value2">
<a-radio-button value="a">Hangzhou</a-radio-button>
<a-radio-button value="b" disabled>Shanghai</a-radio-button>
<a-radio-button value="c">Beijing</a-radio-button>
<a-radio-button value="d">Chengdu</a-radio-button>
</a-radio-group>
</div>
<div :style="{ marginTop: '16px' }">
<a-radio-group v-model:value="value3" disabled>
<a-radio-button value="a">Hangzhou</a-radio-button>
<a-radio-button value="b">Shanghai</a-radio-button>
<a-radio-button value="c">Beijing</a-radio-button>
<a-radio-button value="d">Chengdu</a-radio-button>
</a-radio-group>
</div>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
const value1 = ref<string>('a');
const value2 = ref<string>('a');
const value3 = ref<string>('a');
</script>