修复 layer 弹层容器中的 `id` 值与其他弹层索引值相同时,导致关闭弹层存在冲突问题

pull/1312/head
贤心 1 year ago
parent 065222befb
commit 2699cc3d45

@ -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');

Loading…
Cancel
Save