input组件动态设置type不生效?
<input type="{{show}}" value='{{password}}' bindinput='getPassWord' placeholder="请输入密码" placeholder-class="input-placeholder"></input>
<image class="psdMage" bindtap="showPassword" src="/pages/img/showPassword.png"></image>
data: {
isShow: false,
show:"text"
},
showPassword: function() {
if (this.data.isShow) {
this.setData({
isShow:false,
show:"password"
})
} else {
this.setData({
isShow: true,
show: "text"
})
}
},
