fix(layer): 修复在 success 中关闭上一个弹层报错的问题

This commit is contained in:
贤心 2025-03-10 23:45:15 +08:00
parent a86211b92f
commit de9736b223

View File

@ -533,15 +533,18 @@ Class.pt.creat = function(){
win.on('resize', ready.events.resize[that.index]);
}
}
// 记录配置信息
that.layero.data('config', config);
// 自动关闭
config.time <= 0 || setTimeout(function(){
layer.close(that.index);
}, config.time);
that.move().callback();
setAnim(that.layero);
// 记录配置信息
that.layero.data('config', config);
};
// 当前实例的 resize 事件
@ -1029,7 +1032,8 @@ ready.restScrollbar = function(index) {
// 关闭和大小化, layer-full 处理
var targetEl = $('.'+ doms[0]).filter(function(){
var layero = $(this);
return layero.data('config').scrollbar === false
var options = layero.data('config') || {};
return options.scrollbar === false
&& layero.data('maxminStatus') !== 'min'
&& layero.attr('times') !== String(index);
});