fix: radio bug

pull/165/head
tjz 2018-05-05 17:46:04 +08:00
parent e76a41f9a8
commit 0028a10722
1 changed files with 2 additions and 2 deletions

View File

@ -54,14 +54,14 @@ export default {
handleChange (event) {
const targetChecked = event.target.checked
this.$emit('input', targetChecked)
const { name, value, radioGroupContext, stateChecked } = this
const { name, value, radioGroupContext } = this
if ((!hasProp(this, 'checked') && !radioGroupContext) || (radioGroupContext && radioGroupContext.value === undefined)) {
this.stateChecked = targetChecked
}
const target = {
name,
value,
checked: !stateChecked,
checked: targetChecked,
}
if (this.radioGroupContext) {
this.radioGroupContext.handleChange({ target })