鍍金池/ 問(wèn)答/HTML5  網(wǎng)絡(luò)安全  HTML/ Element UI Message 在兩個(gè)輸入框都做校驗(yàn)彈框時(shí)反復(fù)觸發(fā)

Element UI Message 在兩個(gè)輸入框都做校驗(yàn)彈框時(shí)反復(fù)觸發(fā)

  <el-input style='width:336px;height:20px;'
    placeholder="請(qǐng)輸入內(nèi)容"
    v-model="creditCode"
    @blur="creditInfo"
    :maxlength=25>
 </el-input>
        
    <el-input style='width:336px;height:20px;'
        placeholder="請(qǐng)輸入"
        v-model="creditCode"
        @blur="creditInfo"
        :maxlength=25>
  </el-input>
  
  
  
  this.$alert('不能為空!','認(rèn)證', {
    confirmButtonText: '確定',
    beforeClose: (action, instance, done) => {
      console.log(33333)
    },
    callback:function(){
        console.log(3432)
             Message.close()
    }
  });
  
  
  

clipboard.png

兩個(gè)輸入框都有校驗(yàn) 當(dāng)我光標(biāo)定位到第一個(gè)輸入框什么內(nèi)容都不輸入直接定位到第二個(gè)輸入框后會(huì)反復(fù)觸發(fā)blur 事件 彈框無(wú)法消失 怎么處理呢

回答
編輯回答
不舍棄

兩個(gè) input 相同 v-model blur 引起的吧

2017年5月6日 11:59