当前位置:网站首页>Wechat applet password display hidden (small eyes)
Wechat applet password display hidden (small eyes)
2022-07-19 05:38:00 【One finger quicksand Q】
One 、 design sketch
Wechat applet password display and hiding ( Little eyes )
![]()
![]()
Two 、 Code
wxml
<view>
<input type="text" password="{
{pwdtype}}" />
<image src="{
{image}}" mode="aspectFit" bindtap="goto"></image>
</view>wxss
view {
display: flex;
justify-content: center;
}
input {
width: 50%;
border-bottom: 1px solid black;
}
image {
width: 48rpx;
height: 48rpx;
/* border: 1px solid black; */
}js
Page({
/**
* Initial data of the page
*/
data: {
pwdtype: true,
image: '/images/ eyes _ hide _o.png'
},
goto() {
if (this.data.pwdtype == true) {
this.setData({
pwdtype: false,
image: '/images/ eyes _ Show _o.png'
})
} else {
this.setData({
pwdtype: true,
image: '/images/ eyes _ hide _o.png'
})
}
}
})Be careful : Real machine test cannot be used
Image download address :iconfont- Alibaba vector icon library
边栏推荐
猜你喜欢
随机推荐
利用IDE打jar包
Talk about the 8 pits of redis distributed lock
zTree自定义Title属性
ambari2.7.5集成es6.4.2
typedef
关于Kotlin泛型遇到的问题
6.数据仓库搭建之数据仓库设计
10 question 10 answer: do you really know thread pools?
Solve idea new module prompt module XXXX does exits
Character processing function
Constants and constant pointers
Judging prime
Is the software testing training of lemon class reliable? This successful case of counter attack from the training class tells you
Time difference calculation
5.数据采集通道搭建之业务分析
10.数据仓库搭建之DWD层搭建
gradle
MySQL comma separated data for branches
SQL练习题集合
3.东软跨境电商数仓项目架构设计









