重复点击 input 组件时 bindblur被触发
wxml如下:
<text>{{destination.title}}</text><input type= "text" bindblur= "checkValue" value= "{{destination.value}}" data-name= "{{destination.title}}" /> |
js如下
checkValue: function (e){ console.log(e.detail.value); console.log(e) if (!(e.detail.value)){ var that = this ; this .setData({ pickerDisabled : true , }); wx.showToast({ title: "请输入" +e.target.dataset.name, icon: 'warn' , image: '' , duration: 2000, mask: true , success: function (res) {}, fail: function (res) {}, complete: function (res) {}, }); } |
当 重复点击__ __ input 组件时,其绑定的 bindblur 事件被触发。