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/radioGroup-more.vue

47 lines
969 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<docs>
---
order: 4
title:
zh-CN: RadioGroup 垂直
en-US: Vertical RadioGroup
---
## zh-CN
垂直的 RadioGroup配合更多输入框选项
## en-US
Vertical RadioGroup, with more radios.
</docs>
<template>
<a-radio-group v-model:value="value">
<a-radio :style="radioStyle" :value="1">Option A</a-radio>
<a-radio :style="radioStyle" :value="2">Option B</a-radio>
<a-radio :style="radioStyle" :value="3">Option C</a-radio>
<a-radio :style="radioStyle" :value="4">
More...
<a-input v-if="value === 4" style="width: 100px; margin-left: 10px" />
</a-radio>
</a-radio-group>
</template>
<script lang="ts">
import { defineComponent, reactive, ref } from 'vue';
export default defineComponent({
setup() {
const value = ref<number>(1);
const radioStyle = reactive({
display: 'flex',
height: '30px',
lineHeight: '30px',
});
return {
value,
radioStyle,
};
},
});
</script>