input输入框password切换问题
<input type="text" password="{{password}}" bindinput="inputEvent" ></input> <button bindtap="changePassword">按钮</button> changePassword: function () { let { password } = this.data; this.setData({ password: !password }) } inputEvent: function (e) { let { value } = e.detail; console.log(value); } 苹果手机 输入框明文,输入一段文本 输入框切换成密码格式,然后再输入,输入框会被清空,