diff --git a/src/modules/form.js b/src/modules/form.js index e66275da..174c401b 100644 --- a/src/modules/form.js +++ b/src/modules/form.js @@ -626,7 +626,12 @@ layui.define(['lay', 'layer', 'util'], function(exports){ }; if(isSearch){ - input.on('input propertychange', search).on('blur', function(e){ + // #1449: IE10 和 11 中,带有占位符的 input 元素获得/失去焦点时,会触发 input 事件 + var eventsType = 'input propertychange'; + if(lay.ie && (lay.ie === '10' || lay.ie === '11') && input.attr('placeholder')){ + eventsType = 'keyup'; + } + input.on(eventsType, search).on('blur', function(e){ var selectedIndex = select[0].selectedIndex; thatInput = input; // 当前的 select 中的 input 元素 diff --git a/src/modules/table.js b/src/modules/table.js index 30f3827b..9eec4c7f 100644 --- a/src/modules/table.js +++ b/src/modules/table.js @@ -82,7 +82,7 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){ var resolveTplStr = function(templet){ try{ return lay(templet).html(); - }catch{ + }catch(err){ return templet; } }