vux中x-input在安卓手機輸入框的刪除按鈕(@on-click-clear-icon)點擊沒反應


首先看你自己的的版本好,如果在2.6.9以上,我是在git上找到的解決辦法,記錄一下,希望可以幫到有需要的小伙伴。

在項目中找 node_modules > vux > x-input > index.vue >找到下面Code 代碼進行修改即可

VUX version

2.9.4

OS/Browsers version

安卓手機

Vue version

2.6.10

Code

在x-input.vue
onBlur ($event) {
      this.setTouched()
      this.validate()
      // this.isFocus = false
      this.$emit('on-blur', this.currentValue, $event)
    }
改為
onBlur ($event) {
      setTimeout(() => {
        this.setTouched()
        this.validate()
        this.isFocus = false
        this.$emit('on-blur', this.currentValue, $event)
      }, 0)
    }

focus () {
        this.$refs.input.focus()
    }
改為
focus () {
      setTimeout(() => {
        this.$refs.input.focus()
      }, 0)
    }
就能解決

Steps to reproduce

在安卓手機微信操作輸入框,點擊清空圖標

What is Expected?

正常使用

What is actually happening?

點擊清空沒反應

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM