feat(RadioGroup): add direction prop

This commit is contained in:
陈嘉涵
2020-02-10 19:02:30 +08:00
parent 3ad9950c2f
commit 4dd41b23de
8 changed files with 85 additions and 13 deletions
+2 -1
View File
@@ -9,6 +9,7 @@ export default createComponent({
props: {
value: null,
disabled: Boolean,
direction: String,
checkedColor: String,
iconSize: [Number, String],
},
@@ -21,7 +22,7 @@ export default createComponent({
render() {
return (
<div class={bem()} role="radiogroup">
<div class={bem([this.direction])} role="radiogroup">
{this.slots()}
</div>
);
+8
View File
@@ -0,0 +1,8 @@
@import '../style/var';
.van-radio-group {
&--horizontal {
display: flex;
flex-wrap: wrap;
}
}