欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

vue中使用@blur獲取input?val值

 更新時(shí)間:2022年08月10日 09:34:10   作者:niesiyuan000  
這篇文章主要介紹了vue中使用@blur獲取input?val值的實(shí)現(xiàn)方法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教

使用@blur獲取input val值

@blur="validScore($event)"
validScore(event){
    alert(event.target.value)
}

vue表單input 框使用@blur事件

input 框失去焦點(diǎn) ,便會(huì)觸發(fā)定義的方法

form表單代碼

  <el-form-item label="身份證號(hào)碼:" prop="idNumber">
       <el-input  @blur="onBsp($event)" v-model="laApplicationDetail.idNumber" placeholder="身份證號(hào)碼"  maxlength="18" show-word-limit
                            style="width: 240px;" ></el-input >
  </el-form-item>

methods方法,下面附代碼

methods方法代碼

onBsp(event) {
        let queryParam = {
          name:event.target.form[0].value,
          idcard: event.target.value
        }
        getinformation(queryParam).then(res => {
          let list = res.data;
          this.laApplicationDetail.migrantworker = list.migrantworker;
          this.laApplicationDetail.phone = list.phone;
        }).catch(error => {
          this.$message({
            message: error.response.data.message ? error.response.data.message : '網(wǎng)絡(luò)異常',
            type: 'warning'
          })
        });
      },

上圖的 方法的 queryParam參數(shù)怎么獲取的

以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論