fix select bug

pull/15/head^2
sentsin 8 years ago
parent 5903266d54
commit 756252ccf0

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -153,7 +153,7 @@ layui.define('layer', function(exports){
var othis = $(this)
,text = othis.text()
,not = text.indexOf(value) === -1;
if(value === '' || (keyup ? not : value !== text)) num++;
if(value === '' || not) num++;
keyup && othis[not ? 'addClass' : 'removeClass'](HIDE);
});
var none = num === dds.length;
@ -179,15 +179,20 @@ layui.define('layer', function(exports){
}
}, true);
if(value === ''){
dl.find('.'+NONE).remove();
}
};
if(isSearch){
input.on('keyup', search).on('blur', function(e){
thatInput = input;
initValue = dl.find('.'+THIS).html();
if(!initValue){
notOption(input.val(), function(none){
if(none && !initValue){
input.val('');
}
});
});
}
//选择

Loading…
Cancel
Save