.wxml :
<input bindblur='clearSpace' />
.js :
// 清空input的空格
clearSpace: function(event) {
var v = event.detail.value;
v = v.replace(/\s*/g, "");
console.log('clear: ', v)
}
.wxml :
<input bindblur='clearSpace' />
.js :
// 清空input的空格
clearSpace: function(event) {
var v = event.detail.value;
v = v.replace(/\s*/g, "");
console.log('clear: ', v)
}