chore(dropdown): 将 dropdown id 添加到触发元素 (#1761)

pull/1784/head
morning-star 2024-04-08 08:51:52 +08:00 committed by GitHub
parent 26abb14c9d
commit 394c7e7ee7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -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);