updateValue(e) {
let name = e.currentTarget.dataset.name;
let nameMap = {}
nameMap[name] = e.detail && e.detail.value
this.setData(nameMap)
}
<input class='weui-input' placeholder='密码' placeholder-class="phcolor" bindinput="updateValue" data-name='pwd' value='{{pwd}}'></input>
感谢网友提供的解决办法
https://blog.csdn.net/lizhen_software/article/details/81632229
网友评论