diff --git a/examples/routers/radio.vue b/examples/routers/radio.vue index ffc7e2e4..4a447857 100644 --- a/examples/routers/radio.vue +++ b/examples/routers/radio.vue @@ -22,12 +22,18 @@ Windows - + + + + + + + diff --git a/src/components/radio/radio-group.vue b/src/components/radio/radio-group.vue index e665eb1b..f13afffe 100644 --- a/src/components/radio/radio-group.vue +++ b/src/components/radio/radio-group.vue @@ -41,6 +41,13 @@ name: { type: String, default: getUuid + }, + // 4.5.0 + buttonStyle: { + validator (value) { + return oneOf(value, ['default', 'solid']); + }, + default: 'default' } }, data () { @@ -57,6 +64,7 @@ [`${prefixCls}-${this.size}`]: !!this.size, [`ivu-radio-${this.size}`]: !!this.size, [`${prefixCls}-${this.type}`]: !!this.type, + [`${prefixCls}-button-${this.buttonStyle}`]: this.type === 'button' && this.buttonStyle !== 'default', [`${prefixCls}-vertical`]: this.vertical } ]; diff --git a/src/styles/components/radio.less b/src/styles/components/radio.less index f1b7778d..15623d99 100644 --- a/src/styles/components/radio.less +++ b/src/styles/components/radio.less @@ -338,6 +338,16 @@ span.@{radio-prefix-cls} + * { box-shadow: none!important; } } + &-solid .@{radio-prefix-cls}-wrapper{ + &-checked:not(.@{radio-prefix-cls}-wrapper-disabled){ + background: @primary-color; + color: #fff; + &:hover{ + background: tint(@primary-color, 20%); + color: #fff; + } + } + } } .@{radio-group-button-prefix-cls}.@{radio-group-prefix-cls}-large .@{radio-prefix-cls}-wrapper{