vux x-input 清除按钮不起作用


vux x-input 清除按钮不起作用,解决办法:

找到node_modues—vux—src–components—x-input --index.vue 组件,修改以下三处

   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)
      }

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM