fix(radio): should focus on mousedown, not click

This commit is contained in:
07akioni 2020-03-01 15:49:13 +08:00
parent 0d3f5ee896
commit aed21e85ac

View File

@ -59,7 +59,6 @@ export default {
methods: {
toggle () {
if (this.syntheticDisabled) return
this.$refs.input.focus()
if (this.checkedValue !== this.value) {
this.emitChangeEvent()
}
@ -76,6 +75,10 @@ export default {
handleKeyUpEnter () {
this.toggle()
},
handleMouseDown () {
if (this.syntheticDisabled) return
this.$refs.input.focus()
},
handleClick (e) {
this.$emit('click', e)
this.toggle()