easyui-combobox add small icons

1. First, in the easyui file /easyui/themes/icon.css
1.1, customize the icon style in icon.css
For example
: .icon -black{
background:url('../../../../resources /images/vehicle/black.jpg') no-repeat center center;

}
2. Define easyui-combobox in jsp file for
example: <input id="vechicleColour" name="vehicleColour"
class="easyui-combobox" style= "width:100%;" data-options="
showItemIcon: true,
data: [
{value:'black',text:'black',iconCls:'icon-black',selected:true}
],
editable: false,
panelHeight: 'auto',
labelPosition: 'top'
">

on date :The class icon-black can be introduced after the iconCls.
Here I only define a css style, and the principles of defining multiple are the same. The data can be separated by ','


After solving the problems encountered at work, I will share them with everyone. I
just started to learn to write and share. I hope that the old irons will point out the bad points and make progress together. Thank you
easyui. The English official website address: http://www.jeasyui. com/demo/main/index.php?plugin=ComboBox&theme=default&dir=ltr&pitem=&sort=

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326604073&siteId=291194637