diff --git a/components/radio/Group.jsx b/components/radio/Group.jsx
index 822932c59..133b324c1 100644
--- a/components/radio/Group.jsx
+++ b/components/radio/Group.jsx
@@ -63,6 +63,12 @@ export default {
this.$emit('input', targetValue)
this.$emit('change', event)
},
+ onMouseEnter (e) {
+ this.$emit('mouseenter', e)
+ },
+ onMouseLeave (e) {
+ this.$emit('mouseleave', e)
+ },
},
watch: {
value (val) {
@@ -70,9 +76,16 @@ export default {
},
},
render () {
- const { radioOptions, classes, $slots, name } = this
+ const { radioOptions, classes, $slots, name,
+ onMouseEnter,
+ onMouseLeave,
+ } = this
return (
-
+
{radioOptions.map(({ value, disabled, label }) =>
{label})}
{ radioOptions.length === 0 && ($slots.default || []).filter(c => c.tag || c.text.trim() !== '')}
diff --git a/components/radio/Radio.jsx b/components/radio/Radio.jsx
index 1108412cd..154fc2ea5 100644
--- a/components/radio/Radio.jsx
+++ b/components/radio/Radio.jsx
@@ -114,13 +114,19 @@ export default {
},
},
render () {
- const { id, classes, checkboxClass, disabled, prefixCls,
- stateChecked, handleChange, name, $slots,
+ const { id, classes, checkboxClass, prefixCls,
+ stateChecked, handleChange, $slots,
onFocus,
onBlur,
onMouseEnter,
onMouseLeave,
+ radioGroupContext,
} = this
+ let { name, disabled } = this
+ if (radioGroupContext) {
+ name = radioGroupContext.name
+ disabled = disabled || radioGroupContext.disabled
+ }
return (