新增 `layer.closeLast(type)` 方法

pull/1203/head
贤心 2023-02-16 08:31:50 +08:00
parent 08dce68a70
commit 10c55087c2
1 changed files with 6 additions and 0 deletions

View File

@ -1197,6 +1197,12 @@ layer.closeAll = function(type, callback){
if(domsElem.length === 0) typeof callback === 'function' && callback();
};
// 根据弹层类型关闭最近打开的层
layer.closeLast = function(type){
type = type || 'page';
layer.close($('.layui-layer-'+ type +':last').attr("times"));
};
/**
拓展模块layui 开始合并在一起