From 002b4d4fcdc235ccb9ba1f64a35613fedcfa52c2 Mon Sep 17 00:00:00 2001 From: thinkgem Date: Tue, 23 Jun 2020 14:22:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3laydate=E6=9C=89=E6=97=B6?= =?UTF-8?q?=E5=91=BC=E4=B8=8D=E5=87=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/static/laydate/5.0/laydate.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/common/src/main/resources/static/laydate/5.0/laydate.js b/common/src/main/resources/static/laydate/5.0/laydate.js index 18dd4a02..1e5b4ad4 100644 --- a/common/src/main/resources/static/laydate/5.0/laydate.js +++ b/common/src/main/resources/static/laydate/5.0/laydate.js @@ -379,7 +379,7 @@ ,value: null //默认日期,支持传入new Date(),或者符合format参数设定的日期格式字符 ,min: '1900-1-1' //有效最小日期,年月日必须用“-”分割,时分秒必须用“:”分割。注意:它并不是遵循 format 设定的格式。 ,max: '2099-12-31' //有效最大日期,同上 - ,trigger: 'click' //呼出控件的事件 + ,trigger: 'focus' //呼出控件的事件 ,show: false //是否直接显示,如果设置true,则默认直接显示控件 ,showBottom: true //是否显示底部栏 ,btns: ['clear', 'now', 'confirm'] //右下角显示的按钮,会按照数组顺序排列 @@ -1804,7 +1804,13 @@ ,showEvent = function(elem, bind){ elem.on(options.trigger, function(){ bind && (that.bindElem = this); - that.render(); + if(options.trigger === 'focus'){ // ThinkGem 冒泡事件优先处理时,可能会呼不出,增加延迟。 + setTimeout(function(){ + that.render(); + },100); + }else{ + that.render(); + } }); };