From 5c63b1fccedfcd208f3434edb79926c206c3d26f Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期二, 29 四月 2025 14:52:35 +0800 Subject: [PATCH] feat:增加类型显示 --- pages/login/userPassword.vue | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-) diff --git a/pages/login/userPassword.vue b/pages/login/userPassword.vue index f145714..a9853cc 100644 --- a/pages/login/userPassword.vue +++ b/pages/login/userPassword.vue @@ -34,15 +34,29 @@ </view> <view class="list-call"> <u-input v-model="password" - clearable + v-if="inpType" + clearable maxlength="32" - :type="inpType ? 'password' : 'text'" + :type="'password'" placeholder="璇疯緭鍏ュ瘑鐮�" prefixIcon="lock" style="padding:0;margin-left:8px;" prefixIconStyle="font-size: 22px;color: #909399"> <template slot="suffix"> - <u-icon size="40" name="eye" @click="todoShow"></u-icon> + <u-icon size="45" name="eye-off" @click.native.stop="todoShow"></u-icon> + </template> + </u-input> + <u-input v-model="password" + v-if="!inpType" + maxlength="32" + clearable + :type="'text'" + placeholder="璇疯緭鍏ュ瘑鐮�" + prefixIcon="lock" + style="padding:0;margin-left:8px;" + prefixIconStyle="font-size: 22px;color: #909399"> + <template slot="suffix"> + <u-icon size="45" name="eye" @click.native.stop="todoShow"></u-icon> </template> </u-input> </view> @@ -121,7 +135,8 @@ }, todoShow(){ console.log('鐐瑰嚮') - this.inpType = !this.inpType + this.inpType = !this.inpType; + this.password = this.password; }, //鐧诲綍 -- Gitblit v1.9.1