开发环境
IconPicker 提供图标选择功能

显示代码

								
							
默认图标

显示代码

								layui.use(['iconPicker'], function() {
								    var iconPicker = layui.iconPicker;
								
								    iconPicker.render({
								        elem: '#iconPicker',
								        type: 'fontClass',
								        search: true,
								        page: true,
								        limit: 16,
								        click: function(data) {
								           console.log(data);
								        },
								        success: function(d) {
								            console.log(d);
								        }
								    });
									
								});
							
默认选中

显示代码

								layui.use(['iconPicker'], function() {
								    var iconPicker = layui.iconPicker;
								
								    iconPicker.render({
								        elem: '#iconPicker2',
								        type: 'fontClass',
								        search: true,
								        page: true,
								        limit: 16,
								        click: function(data) {
								           console.log(data);
								        },
								        success: function(d) {
								            console.log(d);
								        }
								    });
									
								});
							
不分页

显示代码

								layui.use(['iconPicker'], function() {
								    var iconPicker = layui.iconPicker;
								
								    iconPicker.render({
								        elem: '#iconPicker',
								        type: 'fontClass',
								        search: true,
								        page: false,
								        limit: 16,
								        click: function(data) {
								           console.log(data);
								        },
								        success: function(d) {
								            console.log(d);
								        }
								    });
									
								});