Browse Source

Merge pull request #1033 from sunxiaobin89/main

Fix some issues with laydate
pull/1035/head
贤心 2 years ago committed by GitHub
parent
commit
b56e83a0c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      src/modules/laydate.js

8
src/modules/laydate.js

@ -481,12 +481,12 @@
elem.appendChild(style);
}
//记录当前执行的实例索引
laydate.thisId = options.id;
//移除上一个控件
that.remove(Class.thisElemDate);
//记录当前执行的实例索引
laydate.thisId = options.id;
//如果是静态定位,则插入到指定的容器中,否则,插入到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…
Cancel
Save