1. laydate 修复点击页面的其他区域无法关闭已经打开的日期选择面板的问题
2. laydate 事件触发时候添加限制,避免trigger为click已经弹出面板的时候点选触发节点中的文本的时候日期选择面板闪一下的问题
This commit is contained in:
		
							parent
							
								
									95359a3565
								
							
						
					
					
						commit
						0431f92e92
					
				@ -480,13 +480,13 @@
 | 
			
		||||
      lay(elem).addClass('laydate-theme-molv');
 | 
			
		||||
      elem.appendChild(style);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    //移除上一个控件
 | 
			
		||||
    that.remove(Class.thisElemDate);
 | 
			
		||||
 | 
			
		||||
    //记录当前执行的实例索引
 | 
			
		||||
    laydate.thisId = options.id;
 | 
			
		||||
    
 | 
			
		||||
    //移除上一个控件
 | 
			
		||||
    that.remove(Class.thisElemDate); 
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    //如果是静态定位,则插入到指定的容器中,否则,插入到body
 | 
			
		||||
    isStatic ? options.elem.append(elem) : (
 | 
			
		||||
      document.body.appendChild(elem)
 | 
			
		||||
@ -1583,6 +1583,8 @@
 | 
			
		||||
    //绑定呼出控件事件
 | 
			
		||||
    ,showEvent = function(elem, bind){
 | 
			
		||||
      elem.on(options.trigger, function(){
 | 
			
		||||
        //已经打开的面板避免重新渲染
 | 
			
		||||
        if(laydate.thisId === options.id) return;
 | 
			
		||||
        bind && (that.bindElem = this);
 | 
			
		||||
        that.render();
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user