乐趣区

input密码框明文和加密切换的开关效果

let imageUrl = require("@/assets/images/icon_off.png");
let isShow = false;
let pwdType = "password";
show() {
    isShow ? 
    ((imageUrl =    require("@/assets/images/icon_off.png")), (isShow = false), (pwdType = "password")) 
    : 
    ((imageUrl = require("@/assets/images/icon_on.png")), (isShow = true), (pwdType = "text"));
}
退出移动版