Merge pull request #1280 from zhangyutongdeyonghuming/main
layui-select 搜索筛选,删除 input 已有文本并放入 placeholder,方便输入
This commit is contained in:
commit
2714854196
@ -314,6 +314,12 @@ layui.define(['lay', 'layer', 'util'], function(exports){
|
||||
reElem.addClass(CLASS + 'up');
|
||||
}
|
||||
|
||||
// 删除input已有文本并放入 placeholder,方便输入
|
||||
if (input.val()) {
|
||||
// 有值时才删除并替换placeholder
|
||||
input.attr('placeholder', input.val());
|
||||
input.val(''); // 清空输入框的值
|
||||
}
|
||||
followScroll();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user