Skip to content

Commit

Permalink
fix(taro-components): 修复RadioGroup返回给 onChange事件是undefined close #985
Browse files Browse the repository at this point in the history
  • Loading branch information
jinjinjin0731 committed Dec 3, 2018
1 parent 2a4cd35 commit 0823f59
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/taro-components/src/components/radio/radio-group.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Nerv from 'nervjs'

import _ from '../../../utils/parse-type'
class RadioGroup extends Nerv.Component {
constructor () {
super(...arguments)
Expand All @@ -14,7 +14,9 @@ class RadioGroup extends Nerv.Component {
toggleChange (e, i) {
let checkValue
let _value = this.radioValue.map((item, idx) => {
if (e.target.value === item.value) {
let curValue = item.value
if (_.isNumber(item.value)) curValue = item.value.toString()
if (e.target.value === curValue) {
checkValue = item.value
return {
name: item.name,
Expand Down

0 comments on commit 0823f59

Please sign in to comment.