|
@@ -12,7 +12,6 @@
|
|
|
</div>
|
|
|
<div style="border-bottom:1px solid black ;width: 80%;margin-top: 5%" >
|
|
|
<input style="border:none;width: 80%;height:30px;font-size: 15px;outline: none" name="text" type="text" placeholder="请输入6位验证码">
|
|
|
-<!-- <el-button slot="append" style="width: 20%;height: 30px ;background-color: white" >获取验证码</el-button>-->
|
|
|
<el-button type="text" style="width: 20%;height: 30px ;padding-left: 40px;color:#b3b3b3 ">获取验证码</el-button>
|
|
|
</div>
|
|
|
<div style="border-bottom:1px solid black ;width: 80%;margin-top: 6%">
|
|
@@ -22,7 +21,12 @@
|
|
|
name="password"
|
|
|
placeholder="设置密码"
|
|
|
/>
|
|
|
- <i class="el-icon-view" style="font-size: 20px" @click="togglePasswordVisibility"></i>
|
|
|
+ <img
|
|
|
+ :src="showPassword? visibleImagePath : hiddenImagePath"
|
|
|
+ style="font-size: 20px; cursor: pointer;width: 20px;height: 20px"
|
|
|
+ @click="togglePasswordVisibility"
|
|
|
+ data-show-password="false"
|
|
|
+ />
|
|
|
</div>
|
|
|
<el-button class="gradient-button">立即注册</el-button>
|
|
|
<div align="left" style="margin-left: 10%;margin-top: 4%">
|
|
@@ -39,6 +43,8 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
showPassword: false,
|
|
|
+ hiddenImagePath: require('../login/img/眼睛_闭.png'), // 替换为你的隐藏密码状态图片路径
|
|
|
+ visibleImagePath: require('../login/img/发现-眼睛.png'), // 替换为你的显示密码状态图片路径
|
|
|
radio: '1',
|
|
|
checked: false,
|
|
|
ruleForm: {
|
|
@@ -51,6 +57,9 @@ export default {
|
|
|
methods: {
|
|
|
togglePasswordVisibility() {
|
|
|
this.showPassword =!this.showPassword;
|
|
|
+ const imgElement = document.querySelector('img');
|
|
|
+ imgElement.src = this.showPassword? this.visibleImagePath : this.hiddenImagePath;
|
|
|
+ imgElement.dataset.showPassword = this.showPassword.toString();
|
|
|
},
|
|
|
},
|
|
|
}
|
|
@@ -98,4 +107,7 @@ export default {
|
|
|
input::-webkit-input-placeholder {
|
|
|
color: #b3b3b3; /* 设置为你想要的颜色,这里以红色为例 */
|
|
|
}
|
|
|
+.password-eye-icon {
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
</style>
|