From 7b058aeecba471a1ae64f3966069eb31e6a65aa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Fri, 10 Mar 2023 12:50:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20dropdown=20=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=20`show:=20true`=20=E6=97=B6=EF=BC=8C`ready`=20?= =?UTF-8?q?=E5=9B=9E=E8=B0=83=E6=9C=AA=E6=89=A7=E8=A1=8C=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/dropdown.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/dropdown.js b/src/modules/dropdown.js index 72c28f3f..cf5c2e9b 100644 --- a/src/modules/dropdown.js +++ b/src/modules/dropdown.js @@ -301,6 +301,11 @@ layui.define(['jquery', 'laytpl', 'lay'], function(exports){ }); } + // 组件打开完毕的事件 + typeof options.ready === 'function' && options.ready( + that.elemView, + options.elem + ); }; //位置定位 @@ -361,9 +366,6 @@ layui.define(['jquery', 'laytpl', 'lay'], function(exports){ that.e = e; that.render(); e.preventDefault(); - - //组件打开完毕的时间 - typeof options.ready === 'function' && options.ready(that.elemView, options.elem, that.e.target); }; //触发元素事件