Update form.js

Swap 'eye' and 'eye-invisible'
pull/1158/head
raypard 2 years ago committed by GitHub
parent 8b982a827e
commit bf52e7a006
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -208,13 +208,13 @@ layui.define(['layer', 'util'], function(exports){
// 密码显隐
,eye: [function(){ // 渲染
renderSuffix('eye');
renderSuffix('eye-invisible');
}, function(){ // 事件
var SHOW_NAME = 'LAY_FORM_INPUT_AFFIX_SHOW';
var isShow = othis.data(SHOW_NAME);
othis.attr('type', isShow ? 'password' : 'text').data(SHOW_NAME, !isShow);
renderSuffix(isShow ? 'eye' : 'eye-invisible');
renderSuffix(isShow ? 'eye-invisible' : 'eye');
}]
};

Loading…
Cancel
Save