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