当前位置:网站首页>原生小程序 之 input切换 text与password类型
原生小程序 之 input切换 text与password类型
2022-07-07 00:08: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,
})
}
},
边栏推荐
- Mybaits multi table query (joint query, nested query)
- 淘寶商品詳情頁API接口、淘寶商品列錶API接口,淘寶商品銷量API接口,淘寶APP詳情API接口,淘寶詳情API接口
- SAP webservice 测试出现404 Not found Service cannot be reached
- 【已解决】记一次EasyExcel的报错【读取xls文件时全表读不报错,指定sheet名读取报错】
- 1. AVL tree: left-right rotation -bite
- EMMC打印cqhci: timeout for tag 10提示分析与解决
- 什么是依赖注入(DI)
- JVM the truth you need to know
- 力扣102题:二叉树的层序遍历
- 分布式事务解决方案之TCC
猜你喜欢
I didn't know it until I graduated -- the principle of HowNet duplication check and examples of weight reduction
消息队列:消息积压如何处理?
[reading of the paper] a multi branch hybrid transformer network for channel terminal cell segmentation
JVM the truth you need to know
CVE-2021-3156 漏洞复现笔记
拼多多商品详情接口、拼多多商品基本信息、拼多多商品属性接口
Introduction to distributed transactions
English语法_名词 - 所有格
Différenciation et introduction des services groupés, distribués et microservices
三级菜单数据实现,实现嵌套三级菜单数据
随机推荐
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
The 2022 China low / no code Market Research and model selection evaluation report was released
高级程序员必知必会,一文详解MySQL主从同步原理,推荐收藏
随机生成session_id
Zero sequence aperture of leakage relay jolx-gs62 Φ one hundred
Jhok-zbg2 leakage relay
async / await
如何提高网站权重
Flink SQL 实现读写redis,并动态生成Hset key
How does mapbox switch markup languages?
《ClickHouse原理解析与应用实践》读书笔记(6)
什么是消息队列?
Design, configuration and points for attention of network specified source multicast (SSM) simulation using OPNET
English grammar_ Noun possessive
4. Object mapping Mapster
Pinduoduo product details interface, pinduoduo product basic information, pinduoduo product attribute interface
Web Authentication API兼容版本信息
Leakage relay llj-100fs
AI人脸编辑让Lena微笑
JVM (XX) -- performance monitoring and tuning (I) -- Overview