Showing
1 changed file
with
11 additions
and
3 deletions
| ... | @@ -19,9 +19,11 @@ | ... | @@ -19,9 +19,11 @@ |
| 19 | :disabled="item.component_props.disabled" | 19 | :disabled="item.component_props.disabled" |
| 20 | > | 20 | > |
| 21 | <template #input> | 21 | <template #input> |
| 22 | - <van-radio-group v-model="item.value" direction="horizontal"> | 22 | + <van-radio-group v-model="item.value" :direction="item.component_props.direction" style="width: 100%"> |
| 23 | - <van-radio name="男" :checked-color="themeVars.radioColor">男</van-radio> | 23 | + <div v-for="x in item.component_props.options" :key="x.value" class="radio-wrapper"> |
| 24 | - <van-radio name="女" :checked-color="themeVars.radioColor">女</van-radio> | 24 | + <van-radio :name="x.value" icon-size="1rem" :checked-color="themeVars.radioColor" |
| 25 | + style="margin-bottom: 0.25rem">{{ x.title }}</van-radio> | ||
| 26 | + </div> | ||
| 25 | </van-radio-group> | 27 | </van-radio-group> |
| 26 | </template> | 28 | </template> |
| 27 | </van-field> | 29 | </van-field> |
| ... | @@ -66,5 +68,11 @@ onMounted(() => { | ... | @@ -66,5 +68,11 @@ onMounted(() => { |
| 66 | padding-bottom: 0.5rem; | 68 | padding-bottom: 0.5rem; |
| 67 | white-space: pre-wrap; | 69 | white-space: pre-wrap; |
| 68 | } | 70 | } |
| 71 | + .radio-wrapper { | ||
| 72 | + border: 1px solid #eaeaea; | ||
| 73 | + border-radius: 0.25rem; | ||
| 74 | + padding: 0.25rem 0.5rem; | ||
| 75 | + margin-bottom: 0.25rem; | ||
| 76 | + } | ||
| 69 | } | 77 | } |
| 70 | </style> | 78 | </style> | ... | ... |
-
Please register or login to post a comment