当前位置:网站首页>Input of native applet switches between text and password types
Input of native applet switches between text and password types
2022-07-07 05:47:00 【Don't ask people 0】
Native applet And input Switch text And password type
login.wxml
<input type="text" password="{
{ !isShowPwd }}" placeholder=" Please input a password " 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, // Whether to display the password
phoneNum: '',
password: '',
},
// Switch password format
changePwdType(){
if (this.data.isShowPwd) {
// If this.data.isShow by true, It is expressed as password small black dot
this.setData({
isShowPwd:false,
})
} else {
this.setData({
isShowPwd: true,
})
}
},
边栏推荐
- 论文阅读【MM21 Pre-training for Video Understanding Challenge:Video Captioning with Pretraining Techniqu】
- High voltage leakage relay bld-20
- C#可空类型
- Differences and introduction of cluster, distributed and microservice
- Jhok-zbl1 leakage relay
- What are the common message queues?
- Nodejs get client IP
- [binary tree] binary tree path finding
- Wechat applet Bluetooth connects hardware devices and communicates. Applet Bluetooth automatically reconnects due to abnormal distance. JS realizes CRC check bit
- 1. AVL tree: left-right rotation -bite
猜你喜欢
随机推荐
拼多多新店如何获取免费流量,需要从哪些环节去优化,才能有效提升店内免费流量
毕业之后才知道的——知网查重原理以及降重举例
SQLSTATE[HY000][1130] Host ‘host. docker. internal‘ is not allowed to connect to this MySQL server
CVE-2021-3156 漏洞复现笔记
Getting started with DES encryption
Mysql-centos7 install MySQL through yum
Explication contextuelle du langage Go
Dj-zbs2 leakage relay
Polynomial locus of order 5
Go language context explanation
爬虫练习题(三)
论文阅读【Open-book Video Captioning with Retrieve-Copy-Generate Network】
不同网段之间实现GDB远程调试功能
Distributed global ID generation scheme
Wechat applet Bluetooth connects hardware devices and communicates. Applet Bluetooth automatically reconnects due to abnormal distance. JS realizes CRC check bit
谈fpga和asic的区别
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
三级菜单数据实现,实现嵌套三级菜单数据
软件测试面试技巧
Lombok plug-in