2 Star 5 Fork 0

imlzw / XIcon

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

XIcon图标选择器

介绍

基于iconHhysFa图标选择器1.0改造, layui 图标 140个, font-awesome 有786个图标。

演示地址

https://imlzw.gitee.io/xicon

组件预览

输入图片说明

使用教程

  1. 将xIcon放置layui的模块目录下,类似(****/lay/modules/)
  2. 在引用的主html页面引入awesome的css文件,类似
<!-- ps: 如果仅用layui图标可不引 -->
<link rel="stylesheet" href="./xIcon/font-awesome/css/font-awesome.css" media="all">
  1. 初始化表单text
<div class="layui-form-item">
	<label for="" class="layui-form-label">图标选择:</label>
	<div class="layui-input-block">
		<input type="text" id="demo1" lay-filter="" class="hide">
	</div>
</div>
  1. 引用xIcon组件渲染
<script>
	layui.use(['xIcon'], function() {
		var xIcon = layui.xIcon;
		xIcon.render({
			// 选择器,推荐使用input
			elem: '#demo1',
			// 数据类型:layui/awesome,推荐使用layui
			type: 'layui,awesome',
			// 是否开启搜索:true/false,默认true
			search: true,
			// 是否开启分页:true/false,默认true
			page: true,
			// 每页显示数量,默认12
			limit: 999,
                        // 支持js初始值设置,优先于input value
                        // initValue: 'layui-icon-snowflake',
			// 点击回调
			click: function(data) {
				console.log(data);
			},
			// 渲染成功后的回调
			success: function(d) {
				console.log(d);
			}
		});
	});
</script>

特别鸣谢

  1. iconHhysFa
MIT License Copyright (c) 2020 imlzw Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

基于layui界面的图标选择器表单组件,包含layui-icon与awesome图标。 展开 收起
JavaScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/imlzw/xicon.git
git@gitee.com:imlzw/xicon.git
imlzw
xicon
XIcon
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891