From 90634d19b3e845dc30530db15d788dc5cf06bdb4 Mon Sep 17 00:00:00 2001 From: tjz <415800467@qq.com> Date: Sun, 17 Jun 2018 17:22:26 +0800 Subject: [PATCH] fix: add radioGroup mouse event & radio name inherit radioGroup name --- components/radio/Group.jsx | 17 +++++++++++++++-- components/radio/Radio.jsx | 10 ++++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) 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 ( -