mirror of
https://gitee.com/layui/layui.git
synced 2025-12-26 22:25:48 +08:00
修复 layer 弹层容器中的 id 值与其他弹层索引值相同时,导致关闭弹层存在冲突问题
This commit is contained in:
@@ -1175,10 +1175,10 @@ layer.title = function(name, index){
|
||||
// 关闭 layer 总方法
|
||||
layer.close = function(index, callback){
|
||||
var layero = function(){
|
||||
var closest = $('.'+ doms[0]).find('#'+ index).closest('.'+ doms[0]);
|
||||
var closest = $('.'+ doms[0]).children('#'+ index).closest('.'+ doms[0]);
|
||||
return closest[0] ? (
|
||||
index = closest.attr('times')
|
||||
,closest
|
||||
index = closest.attr('times'),
|
||||
closest
|
||||
) : $('#'+ doms[0] + index)
|
||||
}();
|
||||
var type = layero.attr('type');
|
||||
|
||||
Reference in New Issue
Block a user