feat(CheckboxGroup): add direction prop

This commit is contained in:
陈嘉涵
2020-02-10 19:37:52 +08:00
parent 4dd41b23de
commit 15390241d8
12 changed files with 184 additions and 128 deletions

View File

@@ -9,6 +9,7 @@ export default createComponent({
props: {
max: [Number, String],
disabled: Boolean,
direction: String,
iconSize: [Number, String],
checkedColor: String,
value: {
@@ -42,6 +43,6 @@ export default createComponent({
},
render() {
return <div class={bem()}>{this.slots()}</div>;
return <div class={bem([this.direction])}>{this.slots()}</div>;
},
});

View File

@@ -0,0 +1,8 @@
@import '../style/var';
.van-checkbox-group {
&--horizontal {
display: flex;
flex-wrap: wrap;
}
}