问题描述:
在页面中,使用select2插件,在数据展示页面的下拉框支持搜素,但是弹出添加页面的搜索框缺不支持搜索。
解决方法:
1、检查modal模态窗口中的div中是否含有tabIndex="-1"属性
2、在js代码中加入
$.fn.modal.Constructor.prototype.enforceFocus = function () {
};
就可以了,亲测通过哦
在页面中,使用select2插件,在数据展示页面的下拉框支持搜素,但是弹出添加页面的搜索框缺不支持搜索。
1、检查modal模态窗口中的div中是否含有tabIndex="-1"属性
2、在js代码中加入
$.fn.modal.Constructor.prototype.enforceFocus = function () {
};
就可以了,亲测通过哦
(function(d, s, id) { let js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) retur