diff --git a/src/components/radio/radio-group.vue b/src/components/radio/radio-group.vue index bcf638d1..12bfc20f 100644 --- a/src/components/radio/radio-group.vue +++ b/src/components/radio/radio-group.vue @@ -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 } ]; } diff --git a/src/styles/components/radio.less b/src/styles/components/radio.less index 9838d416..d5e9e8b2 100644 --- a/src/styles/components/radio.less +++ b/src/styles/components/radio.less @@ -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} { diff --git a/test/routers/radio.vue b/test/routers/radio.vue index 2c3f4d20..9375a795 100644 --- a/test/routers/radio.vue +++ b/test/routers/radio.vue @@ -1,7 +1,6 @@