mirror of
https://gitee.com/layui/layui.git
synced 2025-04-05 17:38:02 +08:00
优化 layer.closeLast()
方法,给第二个参数增加回调
[#I8JHBY](https://gitee.com/layui/layui/issues/I8JHBY)
This commit is contained in:
parent
e4ae678cb7
commit
ab4ded2275
@ -1288,9 +1288,9 @@ layer.closeAll = function(type, callback){
|
||||
};
|
||||
|
||||
// 根据弹层类型关闭最近打开的层
|
||||
layer.closeLast = function(type){
|
||||
layer.closeLast = function(type, callback){
|
||||
type = type || 'page';
|
||||
layer.close($('.layui-layer-'+ type +':last').attr("times"));
|
||||
layer.close($('.layui-layer-'+ type +':last').attr("times"), callback);
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user