mirror of https://github.com/layui/layui
chore(dropdown): 将 dropdown id 添加到触发元素 (#1761)
parent
26abb14c9d
commit
394c7e7ee7
|
@ -150,6 +150,10 @@ layui.define(['jquery', 'laytpl', 'lay', 'util'], function(exports){
|
||||||
elem.attr('id') || that.index
|
elem.attr('id') || that.index
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if(!lay.isTopElem(elem[0])){
|
||||||
|
elem.attr('lay-id', options.id);
|
||||||
|
}
|
||||||
|
|
||||||
// 初始化自定义字段名
|
// 初始化自定义字段名
|
||||||
options.customName = $.extend({}, dropdown.config.customName, options.customName);
|
options.customName = $.extend({}, dropdown.config.customName, options.customName);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue