Multiple selection drop-down box of layui

want to implement layui multi-selection drop-down box

 var select = $(this)
                            ,title = reElem.find("." + TITLE)
                            ,input = title.find("input")
                            ,multiSelect = title.find(".multiSelect")
                            ,dl = reElem.find("dl:eq(0)")
                            ,dds = dl.find("div>dd").length==0 ? dl.find("dd") : dl.find("div>dd")
                            ,index =  this.selectedIndex //
                            ,nearElem //select 
                            ,omit = typeof select.attr("lay-omit") === "undefined" //  x
                            ,isMulti = typeof select.attr("multiple") && typeof select.attr("multiple") === "string";

                        that.hidePlaceholder(title,select);
                        if(disabled) return;

this is a part of the form source code that has not been changed.

Jan.08,2022

you might as well look for documentation and realizable methods instead of changing the source code. In the official module, there are netizens' custom components
layui custom components
select


layui multiple selection drop-down box

Menu