From 2699cc3d45912f6f71d55328248fd33cd88462ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Tue, 1 Aug 2023 11:39:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20layer=20=E5=BC=B9=E5=B1=82?= =?UTF-8?q?=E5=AE=B9=E5=99=A8=E4=B8=AD=E7=9A=84=20`id`=20=E5=80=BC?= =?UTF-8?q?=E4=B8=8E=E5=85=B6=E4=BB=96=E5=BC=B9=E5=B1=82=E7=B4=A2=E5=BC=95?= =?UTF-8?q?=E5=80=BC=E7=9B=B8=E5=90=8C=E6=97=B6=EF=BC=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E5=BC=B9=E5=B1=82=E5=AD=98=E5=9C=A8=E5=86=B2?= =?UTF-8?q?=E7=AA=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/layer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/layer.js b/src/modules/layer.js index da6b2c90..4c0f4b5d 100644 --- a/src/modules/layer.js +++ b/src/modules/layer.js @@ -1175,10 +1175,10 @@ layer.title = function(name, index){ // 关闭 layer 总方法 layer.close = function(index, callback){ var layero = function(){ - var closest = $('.'+ doms[0]).find('#'+ index).closest('.'+ doms[0]); + var closest = $('.'+ doms[0]).children('#'+ index).closest('.'+ doms[0]); return closest[0] ? ( - index = closest.attr('times') - ,closest + index = closest.attr('times'), + closest ) : $('#'+ doms[0] + index) }(); var type = layero.attr('type');