1.vux 目前是2.6版本以上才出现这个问题,可以选择版本回退
- 修改源码 但是注意每次运行install 是 都需要重新修改回来 步骤如下(我是在vue-cli中使用的)
① 找到你的node_modues—vux—src–components—x-input --index.vue 组件
② 修改一下三处 methods 中的 focus 、 onBlur、 onKeyUp
focus () {
// 优化添加
setTimeout(() => {
this.$refs.input.focus()
}, 0)
},
onBlur ($event) {
this.setTouched()
this.validate()
// 优化添加
setTimeout(() => {
this.isFocus = false
}, 0)
this.$emit('on-blur', this.currentValue, $event)
},
onKeyUp (e) {
if (e.key === 'Enter') {
e.target.blur()
this.isFocus = true //优化添加
this.$emit('on-enter', this.currentValue, e)
}
},
来源:CSDN
作者:qq_30119705
链接:https://blog.csdn.net/qq_30119705/article/details/103462961