RadioGroup add vertical props

RadioGroup add vertical props
This commit is contained in:
梁灏 2017-01-05 14:37:24 +08:00
parent a404bbaed3
commit 5722a6fb91
4 changed files with 20 additions and 10 deletions

View file

@ -24,6 +24,10 @@
validator (value) {
return oneOf(value, ['button']);
}
},
vertical: {
type: Boolean,
default: false
}
},
computed: {
@ -32,7 +36,8 @@
`${prefixCls}`,
{
[`${prefixCls}-${this.size}`]: !!this.size,
[`${prefixCls}-${this.type}`]: !!this.type
[`${prefixCls}-${this.type}`]: !!this.type,
[`${prefixCls}-vertical`]: this.vertical
}
];
}

View file

@ -6,6 +6,13 @@
.@{radio-group-prefix-cls} {
display: inline-block;
font-size: @font-size-small;
&-vertical{
.@{radio-prefix-cls}-wrapper {
display: block;
height: 30px;
line-height: 30px;
}
}
}
// 普通状态
@ -16,6 +23,10 @@
position: relative;
white-space: nowrap;
margin-right: 8px;
cursor: pointer;
&-disabled{
cursor: @cursor-disabled;
}
}
.@{radio-prefix-cls} {