在此提供bootstrap相关下载信息: bootstrap.css https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.css bootstrap.js https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.js bootstrap-select http://silviomoreto.github.io/bootstrap-select/ js和css文件都引入完成,但是不可以模糊查询,只可以搜索开头关键字 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.css"> <link rel="stylesheet" href="dist/css/bootstrap-select.css"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.js" defer></script> <script src="dist/js/bootstrap-select.js" defer></script>
<select id="lunchBegins" class="selectpicker select1 layui-input-block layui-input-block-add" data-live-search="true" data-live-search-style="begins" title="全部" lay-filter="name"> </select>
最后解决方案是删除 data-live-search-style="begins",它限制搜索只可以从开头搜索