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