当前位置:网站首页>原生小程序 之 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,
})
}
},
边栏推荐
- Taobao Commodity details page API interface, Taobao Commodity List API interface, Taobao Commodity sales API interface, Taobao app details API interface, Taobao details API interface
- 消息队列:如何确保消息不会丢失
- Explication contextuelle du langage Go
- The year of the tiger is coming. Come and make a wish. I heard that the wish will come true
- Codeforces Round #416 (Div. 2) D. Vladik and Favorite Game
- What is message queuing?
- [paper reading] semi supervised left atrium segmentation with mutual consistency training
- English语法_名词 - 所有格
- English grammar_ Noun possessive
- 软件测试面试技巧
猜你喜欢

Pytorch builds neural network to predict temperature

Unity让摄像机一直跟随在玩家后上方

R语言【逻辑控制】【数学运算】

Leakage relay jelr-250fg

Leetcode: maximum number of "balloons"

nVisual网络可视化

How digitalization affects workflow automation
![[PM products] what is cognitive load? How to adjust cognitive load reasonably?](/img/75/2277e0c413be561ec963b44679eb75.jpg)
[PM products] what is cognitive load? How to adjust cognitive load reasonably?
![[论文阅读] Semi-supervised Left Atrium Segmentation with Mutual Consistency Training](/img/d6/e6db0d76e81e49a83a30f8c1832f09.png)
[论文阅读] Semi-supervised Left Atrium Segmentation with Mutual Consistency Training

随机生成session_id
随机推荐
WEB架构设计过程
Pytorch builds neural network to predict temperature
AI人脸编辑让Lena微笑
【Shell】清理nohup.out文件
淘寶商品詳情頁API接口、淘寶商品列錶API接口,淘寶商品銷量API接口,淘寶APP詳情API接口,淘寶詳情API接口
TCC of distributed transaction solutions
1. AVL tree: left-right rotation -bite
什么是依赖注入(DI)
The year of the tiger is coming. Come and make a wish. I heard that the wish will come true
async / await
5. Data access - entityframework integration
How digitalization affects workflow automation
Polynomial locus of order 5
三级菜单数据实现,实现嵌套三级菜单数据
pytorch_ 01 automatic derivation mechanism
Nodejs get client IP
Paper reading [MM21 pre training for video understanding challenge:video captioning with pre training techniqu]
Message queue: how to deal with message backlog?
make makefile cmake qmake都是什么,有什么区别?
集群、分布式、微服务的区别和介绍