Update laydate.js
日期组件在右侧可能超界,显示不全
This commit is contained in:
		
							parent
							
								
									cebbcd9e3f
								
							
						
					
					
						commit
						442fca8eaf
					
				@ -446,7 +446,10 @@ layui.define(function(exports){
 | 
			
		||||
  //方位辨别
 | 
			
		||||
  Dates.orien = function(obj, pos){
 | 
			
		||||
    var tops, rect = Dates.elem.getBoundingClientRect();
 | 
			
		||||
    obj.style.left = rect.left + (pos ? 0 : Dates.scroll(1)) + 'px';
 | 
			
		||||
    if(rect.left < $(window).width() - 250)
 | 
			
		||||
      obj.style.left = rect.left + (pos ? 0 : Dates.scroll(1)) + 'px';
 | 
			
		||||
    else
 | 
			
		||||
        obj.style.left = ($(window).width() - 250) + 'px';
 | 
			
		||||
    if(rect.bottom + obj.offsetHeight/1.5 <= Dates.winarea()){
 | 
			
		||||
      tops = rect.bottom - 1;     
 | 
			
		||||
    } else {
 | 
			
		||||
@ -826,4 +829,4 @@ layui.define(function(exports){
 | 
			
		||||
  
 | 
			
		||||
  exports('laydate', laydate);
 | 
			
		||||
 | 
			
		||||
});
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user