mirror of https://github.com/layui/layer
				
				
				
			fix bug
							parent
							
								
									737e061104
								
							
						
					
					
						commit
						5bfc1ec84b
					
				
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										17
									
								
								src/layer.js
								
								
								
								
							
							
						
						
									
										17
									
								
								src/layer.js
								
								
								
								
							| 
						 | 
				
			
			@ -233,7 +233,7 @@ Class.pt.creat = function(){
 | 
			
		|||
        break;
 | 
			
		||||
        case 2:
 | 
			
		||||
            var content = config.content = conType ? config.content : [config.content||'http://sentsin.com?from=layer', 'auto'];
 | 
			
		||||
            config.content = '<iframe scrolling="'+ (config.content[1]||'auto') +'" allowtransparency="true" id="'+ doms[5] +''+ times +'" name="'+ doms[5] +''+ times +'" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="' + config.content[0] + '"></iframe>';
 | 
			
		||||
            config.content = '<iframe scrolling="'+ (config.content[1]||'auto') +'" allowtransparency="true" id="'+ doms[4] +''+ times +'" name="'+ doms[4] +''+ times +'" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="' + config.content[0] + '"></iframe>';
 | 
			
		||||
        break;
 | 
			
		||||
        case 3:
 | 
			
		||||
            config.title = false;
 | 
			
		||||
| 
						 | 
				
			
			@ -705,14 +705,23 @@ layer.title = function(name, index){
 | 
			
		|||
//关闭layer总方法
 | 
			
		||||
layer.close = function(index){
 | 
			
		||||
    var layero = $('#'+ doms[0] + index), type = layero.attr('type');
 | 
			
		||||
    if(!layero) return;
 | 
			
		||||
    if(type == ready.type[1] && layero.attr('conType') === 'object'){
 | 
			
		||||
    if(!layero[0]) return;
 | 
			
		||||
    if(type === ready.type[1] && layero.attr('conType') === 'object'){
 | 
			
		||||
        layero.children(':not(.'+ doms[5] +')').remove();
 | 
			
		||||
        for(var i = 0; i < 2; i++){
 | 
			
		||||
            layero.find('.layui-layer-wrap').unwrap().hide();
 | 
			
		||||
        }
 | 
			
		||||
    } else {
 | 
			
		||||
        layero.innerHTML = '';
 | 
			
		||||
        //低版本IE 回收 iframe
 | 
			
		||||
        if(type === ready.type[2]){
 | 
			
		||||
            try {
 | 
			
		||||
                var iframe = $('#'+doms[4]+index)[0];
 | 
			
		||||
                iframe.contentWindow.document.write('');
 | 
			
		||||
                iframe.contentWindow.close();
 | 
			
		||||
                layero.find('.'+doms[5])[0].removeChild(iframe);
 | 
			
		||||
            } catch(e){}
 | 
			
		||||
        }
 | 
			
		||||
        layero[0].innerHTML = '';
 | 
			
		||||
        layero.remove();
 | 
			
		||||
    }
 | 
			
		||||
    $('#layui-layer-moves, #layui-layer-shade' + index).remove();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,7 +10,7 @@
 | 
			
		|||
html #layui_layer_skinlayercss{display:none; position: absolute; width:1989px;}
 | 
			
		||||
 | 
			
		||||
/* common */
 | 
			
		||||
.layui-layer-shade, .layui-layer{position:fixed; _position:absolute;}
 | 
			
		||||
.layui-layer-shade, .layui-layer{position:fixed; _position:absolute; pointer-events: auto;}
 | 
			
		||||
.layui-layer-shade{top:0; left:0; width:100%; height:100%; _height:expression(document.body.offsetHeight+"px");}
 | 
			
		||||
.layui-layer{top:150px; left:50%; margin:0; padding:0; background-color:#fff; -webkit-background-clip: content; box-shadow: 1px 1px 50px rgba(0,0,0,.3);}
 | 
			
		||||
.layui-layer-close{position:absolute;}
 | 
			
		||||
| 
						 | 
				
			
			@ -56,7 +56,7 @@ html #layui_layer_skinlayercss{display:none; position: absolute; width:1989px;}
 | 
			
		|||
.layui-layer-setwin .layui-layer-close2:hover{ background-position:-91px -195px; _background-position:-51px -7px;}
 | 
			
		||||
 | 
			
		||||
/* 按钮栏 */
 | 
			
		||||
.layui-layer-btn{text-align:center; padding:10px 30px; }
 | 
			
		||||
.layui-layer-btn{text-align:center; padding:10px 30px; pointer-events: auto;}
 | 
			
		||||
.layui-layer-btn a{height:30px; line-height:30px; margin:0 8px; padding:0 20px; background:#5FBFE7; color:#fff; font-size:14px; font-weight:bold; cursor:pointer;}
 | 
			
		||||
.layui-layer-btn a:hover{opacity:0.9;}
 | 
			
		||||
.layui-layer-btn a:active{opacity:0.7;}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue