//LayerClose弹窗关闭
// 开始判断
switch(type){
case "self":
var index = layer.index
layer.close(index);
break;
case "FrameIndex":
var index = parent.layer.getFrameIndex(window.name);
layer.close(index);
break;
case "selfall":
layer.closeAll(); //疯狂模式,关闭所有层
break;
case "fatherall":
parent.layer.closeAll(); //疯狂模式,关闭所有层
break;
default:
switch(type){
case "self":
var index = layer.index
layer.close(index);
break;
case "FrameIndex":
var index = parent.layer.getFrameIndex(window.name);
layer.close(index);
break;
case "selfall":
layer.closeAll(); //疯狂模式,关闭所有层
break;
case "fatherall":
parent.layer.closeAll(); //疯狂模式,关闭所有层
break;
default:
break;
}
};
if(typeof type =="undefined"){
return;
}
return;
}
// 开始判断
switch(type){
case "tips":
layer.closeAll('tips'); //关闭所有的tips层
break;
case "loading":
layer.closeAll('loading');
break;
case "iframe":
layer.closeAll('iframe');
break;
case "dialog":
layer.closeAll('dialog');
break;
case "page":
layer.closeAll('page');
break;
default:
break;
}
};
// 开始判断
switch(o.type){
case "self":
(!o.index)?layer.index:o.index
layer.close(o.index);
break;
case "FrameIndex":
//var index = parent.layer.getFrameIndex(window.name);
(!o.index)?parent.layer.getFrameIndex(window.name):o.index
layer.close(o.index);
break;
case "selfall":
layer.closeAll(); //疯狂模式,关闭所有层
break;
case "fatherall":
parent.layer.closeAll(); //疯狂模式,关闭所有层
break;
default:
switch(o.type){
case "self":
(!o.index)?layer.index:o.index
layer.close(o.index);
break;
case "FrameIndex":
//var index = parent.layer.getFrameIndex(window.name);
(!o.index)?parent.layer.getFrameIndex(window.name):o.index
layer.close(o.index);
break;
case "selfall":
layer.closeAll(); //疯狂模式,关闭所有层
break;
case "fatherall":
parent.layer.closeAll(); //疯狂模式,关闭所有层
break;
default:
break;
}
};
// 关闭刷新
if(typeof index =="undefined"||typeof type =="undefined"){
return;
}
return;
}
// 开始判断
switch(type){
case "topreload":
parent.window.location.reload();
break;
case "reload":
window.location.reload();
break;
case "no":
Layerclose("FrameIndex");//关闭弹窗
// window.location.reload();
break;
case "refreshTable":
Layerclose("FrameIndex");
$('#tablelist').bootstrapTable('refresh');
break;
default:
break;
}
}
以上这篇LayerClose弹窗关闭刷新方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持编程之家。
原文链接:https://www.f2er.com/js/30916.html