jQuery EasyUI window - custom toolbar

By default, a window has four tools: collapsible, minimizable, maximizable, and closable. For example, we define the following window (window):

	<div id="win" class="easyui-window" title="My Window" style="padding:10px;width:200px;height:100px;">
		window content
	</div>

To customize the tool, set the tool to true or false. For example, we want to define a window (window), only have a tool that can be closed. You should set any other tools to false. We can define the tools attribute in markup or through jQuery code. Now we use jQuery code to define the window (window):

	$('#win').window({
		collapsible:false,
		minimizable:false,
		maximizable:false
	});

If we wish to add custom tools to the window (window), we can use the tools property. As an example demonstration, we add two tools to the window (window):

	$('#win').window({
		collapsible:false,
		minimizable:false,
		maximizable:false,
		tools:[{
			iconCls:'icon-add',
			handler:function(){
				alert('add');
			}
		},{
			iconCls:'icon-remove',
			handler:function(){
				alert('remove');
			}
		}]
	});

Guess you like

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