赞
踩
从网上看了很多,
比如 auto-complete="new-password"
比如 autocomplete="off"
这是真的用不了啊,最后用css可以实现
1、html
- <div class="miyaoWrap pr mt10">
- <el-input v-model="reach__vioSecretkey" :class="!reach__seePwd ? 'no-autofill-pwd' : ''" placeholder="请输入密钥" auto-complete="new-password" autocomplete="off" />
- <i class="el-icon-view" @click="seePwd()" />
- </div>
2、data
- reach__vioSecretkey: '', // 违纪秘钥
- reach__seePwd: false,
3、methods
- seePwd() {
- this.reach__seePwd = !this.reach__seePwd
- },
4、css
-
- .miyaoWrap{
- .no-autofill-pwd {
- ::v-deep .el-input__inner {
- -webkit-text-security: disc !important;
- }
- }
- .el-icon-view {
- position: absolute;
- right: 10px;
- top: 50%;
- transform: translateY(-50%);
- }
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。