解决方案来自 世界最大的基友交友中心
将以下代码,插入select2.js中即可。
$.ui.dialog.prototype._allowInteraction = function(e) {
return !!$(e.target).closest('.ui-dialog, .ui-datepicker, .select2-drop').length;
};
本文介绍了一种解决Select2插件与UI Dialog组件在交互时出现的问题的方法。通过在select2.js文件中添加特定的JavaScript代码,可以确保两者在弹出窗口打开时能够正确工作,避免了因Select2下拉菜单导致UI Dialog无法正常关闭的问题。
解决方案来自 世界最大的基友交友中心
将以下代码,插入select2.js中即可。
$.ui.dialog.prototype._allowInteraction = function(e) {
return !!$(e.target).closest('.ui-dialog, .ui-datepicker, .select2-drop').length;
};
转载于:https://my.oschina.net/OriginLeon/blog/879649

被折叠的 条评论
为什么被折叠?