当前位置:网站首页>原生小程序 之 input切換 text與password類型
原生小程序 之 input切換 text與password類型
2022-07-07 05:47:00 【不求人0】
原生小程序 之 input切換 text與password類型
login.wxml
<input type="text" password="{
{ !isShowPwd }}" placeholder="請輸入密碼" value='{
{password}}' maxlength="11" class="phonePassword" placeholder-class="placeholderClass"></input>
<image class='input-img input-img2' bindtap='changePwdType' src="{
{isShowPwd ? '/static/login/viewPassword.png' : '/static/login/hidePassword.png'}}"></image>
login.js
data: {
isShowPwd:true, // 是否顯示密碼
phoneNum: '',
password: '',
},
// 切換密碼格式
changePwdType(){
if (this.data.isShowPwd) {
//如果this.data.isShow為true,則錶示為密碼小黑點
this.setData({
isShowPwd:false,
})
} else {
this.setData({
isShowPwd: true,
})
}
},
边栏推荐
- How to get free traffic in pinduoduo new store and what links need to be optimized in order to effectively improve the free traffic in the store
- 消息队列:如何确保消息不会丢失
- [论文阅读] A Multi-branch Hybrid Transformer Network for Corneal Endothelial Cell Segmentation
- SQLSTATE[HY000][1130] Host ‘host. docker. internal‘ is not allowed to connect to this MySQL server
- In memory, I moved from CSDN to blog park!
- High voltage leakage relay bld-20
- Educational Codeforces Round 22 B. The Golden Age
- zabbix_ Get test database failed
- “多模态”概念
- 往图片添加椒盐噪声或高斯噪声
猜你喜欢
Distributed global ID generation scheme
The 2022 China low / no code Market Research and model selection evaluation report was released
2pc of distributed transaction solution
pytorch_ 01 automatic derivation mechanism
Common skills and understanding of SQL optimization
产业金融3.0:“疏通血管”的金融科技
论文阅读【Open-book Video Captioning with Retrieve-Copy-Generate Network】
毕业之后才知道的——知网查重原理以及降重举例
随机生成session_id
判断文件是否为DICOM文件
随机推荐
【Shell】清理nohup.out文件
How to get free traffic in pinduoduo new store and what links need to be optimized in order to effectively improve the free traffic in the store
消息队列:如何确保消息不会丢失
软件测试面试技巧
微信小程序蓝牙连接硬件设备并进行通讯,小程序蓝牙因距离异常断开自动重连,js实现crc校验位
基于NCF的多模块协同实例
淘寶商品詳情頁API接口、淘寶商品列錶API接口,淘寶商品銷量API接口,淘寶APP詳情API接口,淘寶詳情API接口
JD commodity details page API interface, JD commodity sales API interface, JD commodity list API interface, JD app details API interface, JD details API interface, JD SKU information interface
集群、分布式、微服務的區別和介紹
The navigation bar changes colors according to the route
I didn't know it until I graduated -- the principle of HowNet duplication check and examples of weight reduction
High voltage leakage relay bld-20
论文阅读【Open-book Video Captioning with Retrieve-Copy-Generate Network】
Get the way to optimize the one-stop worktable of customer service
JSP setting header information export to excel
Getting started with DES encryption
2pc of distributed transaction solution
Distributed global ID generation scheme
nVisual网络可视化
淘宝店铺发布API接口(新),淘宝oAuth2.0店铺商品API接口,淘宝商品发布API接口,淘宝商品上架API接口,一整套发布上架店铺接口对接分享