<input
type="text"
:password="showPassword"
placeholder="请输入密码至少6位"
v-model="password"
maxlength=12
class="iptPasswd"
/>
<!-- 显示或隐藏密码 -->
<view @click="showPwd">
<image :src="showPassword?'/static/login/open.png':'/static/login/close.png'" class="showPwd"></image>
</view>
showPassword: true return里默认返回为true
关于图片可能被盒子压住 导致点击事件失效 可以给图片设置z-index:999