mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 10:44:59 +00:00
feat(RadioGroup): add direction prop
This commit is contained in:
@@ -7,6 +7,17 @@
|
||||
</van-radio-group>
|
||||
</demo-block>
|
||||
|
||||
<demo-block v-if="!isWeapp" :title="$t('horizontal')">
|
||||
<van-radio-group
|
||||
v-model="radioHorizontal"
|
||||
class="demo-radio-group"
|
||||
direction="horizontal"
|
||||
>
|
||||
<van-radio name="1">{{ $t('radio') }} 1</van-radio>
|
||||
<van-radio name="2">{{ $t('radio') }} 2</van-radio>
|
||||
</van-radio-group>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="$t('disabled')">
|
||||
<van-radio-group v-model="radio2" class="demo-radio-group" disabled>
|
||||
<van-radio name="1">{{ $t('radio') }} 1</van-radio>
|
||||
@@ -89,22 +100,24 @@ export default {
|
||||
radio: '单选框',
|
||||
text1: '未选中禁用',
|
||||
text2: '选中且禁用',
|
||||
withCell: '与 Cell 组件一起使用',
|
||||
horizontal: '水平排列',
|
||||
customIcon: '自定义图标',
|
||||
customIconSize: '自定义大小',
|
||||
customColor: '自定义颜色',
|
||||
customShape: '自定义形状',
|
||||
withCell: '与 Cell 组件一起使用',
|
||||
customIconSize: '自定义大小',
|
||||
disabledLabelClick: '禁用文本点击',
|
||||
},
|
||||
'en-US': {
|
||||
radio: 'Radio',
|
||||
text1: 'Disabled',
|
||||
text2: 'Disabled and checked',
|
||||
withCell: 'Inside a Cell',
|
||||
horizontal: 'Hrizontal',
|
||||
customIcon: 'Custom Icon',
|
||||
customIconSize: 'Custom Icon Size',
|
||||
customColor: 'Custom Color',
|
||||
customShape: 'Custom Shape',
|
||||
withCell: 'Inside a Cell',
|
||||
customIconSize: 'Custom Icon Size',
|
||||
disabledLabelClick: 'Disable the click event of label',
|
||||
},
|
||||
},
|
||||
@@ -117,8 +130,9 @@ export default {
|
||||
radio4: '1',
|
||||
radio5: '1',
|
||||
radioLabel: '1',
|
||||
radioIconSize: '1',
|
||||
radioShape: '1',
|
||||
radioIconSize: '1',
|
||||
radioHorizontal: '1',
|
||||
icon: {
|
||||
active: 'https://img.yzcdn.cn/vant/user-active.png',
|
||||
inactive: 'https://img.yzcdn.cn/vant/user-inactive.png',
|
||||
@@ -135,15 +149,19 @@ export default {
|
||||
background: @white;
|
||||
|
||||
&-group {
|
||||
padding: 0 17px;
|
||||
padding: 0 16px;
|
||||
|
||||
.van-radio:not(:last-child) {
|
||||
margin-bottom: 10px;
|
||||
.van-radio {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.van-doc-demo-block__title {
|
||||
margin-top: -8px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user