From d6914da2811323f7aa382c113915d665c075916a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Sat, 25 Mar 2023 23:58:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20laydate=20=E6=8C=87?= =?UTF-8?q?=E5=90=91=E5=85=83=E7=B4=A0=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/laydate.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/laydate.js b/src/modules/laydate.js index 72bc7b5b..ddf1f830 100644 --- a/src/modules/laydate.js +++ b/src/modules/laydate.js @@ -707,7 +707,7 @@ Class.prototype.position = function(){ var that = this ,options = that.config; - lay.position(that.bindElem || options.elem[0], that.elem, { + lay.position(options.elem[0], that.elem, { position: options.position }); return that; @@ -769,7 +769,7 @@ ,dateTime = options.dateTime = options.dateTime || that.systemDate() ,thisMaxDate, error - ,elem = that.bindElem || options.elem[0] + ,elem = options.elem[0] ,valType = that.isInput(elem) ? 'val' : 'html' ,value = function(){ //如果传入了开始和结束日期的 input 对象,则将其拼接为日期范围字符 @@ -1566,7 +1566,7 @@ Class.prototype.setValue = function(value){ var that = this ,options = that.config - ,elem = that.bindElem || options.elem[0]; + ,elem = options.elem[0]; //静态展现则不作默认赋值 if(options.position === 'static') return that; @@ -2082,9 +2082,9 @@ var showEvent = function(){ // 已经打开的面板避免重新渲染 if(laydate.thisId === options.id) return; - that.bindElem = this; that.render(); - } + }; + //绑定呼出控件事件 options.elem.on(options.trigger, showEvent); options.elem[0].eventHandler = true;