2018-04-11 05:32:18 +00:00
|
|
|
|
<cn>
|
|
|
|
|
#### RadioGroup 垂直
|
|
|
|
|
垂直的 RadioGroup,配合更多输入框选项。
|
|
|
|
|
</cn>
|
|
|
|
|
|
|
|
|
|
<us>
|
|
|
|
|
#### Vertical RadioGroup
|
|
|
|
|
Vertical RadioGroup, with more radios.
|
|
|
|
|
</us>
|
|
|
|
|
|
2019-10-09 10:32:23 +00:00
|
|
|
|
```tpl
|
2018-04-11 05:32:18 +00:00
|
|
|
|
<template>
|
|
|
|
|
<a-radio-group @change="onChange" v-model="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: 100, marginLeft: 10 }" />
|
|
|
|
|
</a-radio>
|
|
|
|
|
</a-radio-group>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
2019-09-28 12:45:07 +00:00
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
value: 1,
|
|
|
|
|
radioStyle: {
|
|
|
|
|
display: 'block',
|
|
|
|
|
height: '30px',
|
|
|
|
|
lineHeight: '30px',
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
onChange(e) {
|
|
|
|
|
console.log('radio checked', e.target.value);
|
2018-04-11 05:32:18 +00:00
|
|
|
|
},
|
|
|
|
|
},
|
2019-09-28 12:45:07 +00:00
|
|
|
|
};
|
2018-04-11 05:32:18 +00:00
|
|
|
|
</script>
|
|
|
|
|
```
|