下载的组件
layui下拉图标 layui排行号选择器
下载路径:https://gitee.com/ayscap/icon-selected 参考:https://gitee.com/layui-exts/icon-selected
或者
链接: https://pan.baidu.com/s/1NVAvyiDOyfjc8vN37Sla0Q 提取码: wiyj
使用方式
JS引入组件
layui.config({
base: $projectPath+"/js/util/layui-module/"
}).extend({
treeSelect: "treeSelect",
treeTable: "treeTable",
iconSelected: "iconSelected/js/index",
});
html 中
<link rel="stylesheet" href="${projectPath}/js/util/layui-module/iconSelected/css/theme.css" />
<input type="text" name="iconCls" id="iconCls" value="layui-icon layui-icon-username" class="layui-input" placeholder="请选择图标" >
JS 中
layui.use(["iconSelected"], function() {
var iconSelected = layui.iconSelected;
iconSelected.init("#iconCls");
});
如果弹出位置不如意就加这个调试调试
.layui-ext-icon-selected-container{
z-index: 999999999 !important;
position: absolute !important;
}
或者js修改位置
$('.layui-ext-icon-selected-input').on('click', function(){
var left = $(this).offset().left;
var top = $(this).offset().top;
$('.layui-ext-icon-selected-container').css({"left": left, "top": top+40});
})
效果
|