From 394c7e7ee74157d708f0b4a38e3798eba45f8ae8 Mon Sep 17 00:00:00 2001 From: morning-star <26325820+Sight-wcg@users.noreply.github.com> Date: Mon, 8 Apr 2024 08:51:52 +0800 Subject: [PATCH] =?UTF-8?q?chore(dropdown):=20=E5=B0=86=20dropdown=20id=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=B0=E8=A7=A6=E5=8F=91=E5=85=83=E7=B4=A0?= =?UTF-8?q?=20(#1761)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/dropdown.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/dropdown.js b/src/modules/dropdown.js index 5e4f15b2..ea28a0d3 100644 --- a/src/modules/dropdown.js +++ b/src/modules/dropdown.js @@ -150,6 +150,10 @@ layui.define(['jquery', 'laytpl', 'lay', 'util'], function(exports){ elem.attr('id') || that.index ); + if(!lay.isTopElem(elem[0])){ + elem.attr('lay-id', options.id); + } + // 初始化自定义字段名 options.customName = $.extend({}, dropdown.config.customName, options.customName);