From 8de9a9c0436fdf5ab2a9f5c1aeeaadb4ef84a40c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Mon, 27 Mar 2023 00:29:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E6=BB=9A=20laydate=20=E7=9A=84=20`id`?= =?UTF-8?q?=20=E5=B1=9E=E6=80=A7=E5=8F=96=E5=80=BC=E4=BC=98=E5=85=88?= =?UTF-8?q?=E7=BA=A7=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/laydate.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/modules/laydate.js b/src/modules/laydate.js index bb77a85e..ec986a68 100644 --- a/src/modules/laydate.js +++ b/src/modules/laydate.js @@ -116,9 +116,7 @@ // 初始化 id 参数 options = lay.extend(that.config, lay.options(elem[0])); // 继承节点上的属性 - options.id = 'id' in options ? options.id : ( - elem.attr('id') || that.index - ); + options.id = 'id' in options ? options.id : that.index; // 初始化 laydate.ready(function(){