hookehuyr

性别组件细节调整

......@@ -19,9 +19,11 @@
:disabled="item.component_props.disabled"
>
<template #input>
<van-radio-group v-model="item.value" direction="horizontal">
<van-radio name="男" :checked-color="themeVars.radioColor">男</van-radio>
<van-radio name="女" :checked-color="themeVars.radioColor">女</van-radio>
<van-radio-group v-model="item.value" :direction="item.component_props.direction" style="width: 100%">
<div v-for="x in item.component_props.options" :key="x.value" class="radio-wrapper">
<van-radio :name="x.value" icon-size="1rem" :checked-color="themeVars.radioColor"
style="margin-bottom: 0.25rem">{{ x.title }}</van-radio>
</div>
</van-radio-group>
</template>
</van-field>
......@@ -66,5 +68,11 @@ onMounted(() => {
padding-bottom: 0.5rem;
white-space: pre-wrap;
}
.radio-wrapper {
border: 1px solid #eaeaea;
border-radius: 0.25rem;
padding: 0.25rem 0.5rem;
margin-bottom: 0.25rem;
}
}
</style>
......