Layout( 布局)

一. 加载方式
//class 加载方式
<div id="box" class="easyui-layout"
style="width:600px;height:400px;">
<div data-options="region:'north',title:'North Title',split:true"
style="height:100px;"></div>
<div data-options="region:'south',title:'South Title',split:true"
style="height:100px;"></div>
<div data-options="region:'east',title:'East',split:true"
style="width:100px;"></div>
<div data-options="region:'west',title:'West',split:true"
style="width:100px;"></div>
<div data-options="region:'center',title:'center title'"
style="padding:5px;background:#eee;"></div>
</div>
//JS 加载调用
$('#box').layout({
fit : true,
});css

 

二. 布局属性html

//属性设置
$('#box').layout({
fit : true,
});布局

 

三. 区域面板属性ui

区域面板属性定义与 panel 组件类型,下面是公共和新增的属性3d

<div data-options="
region:'north',
title:'North Title',
split:true,
border:false,
iconCls:'icon-save',
href:'content.html',
collapsible:false,
maxHeight:200"
style="height:100px;">
</div>htm

 

四.方法列表对象

//返回指定面板
console.log($('#box').layout('panel', 'north'));blog


//设置指定面板折叠
$('#box').layout('collapse', 'north');rem


//设置指定面板展开
$('#box').layout('expand', 'north');it


//从新调整布局和大小
$(document).click(function () {
$('#box').layout().css('display', 'block');
$('#box').layout('resize');
});


//新增一个面板
$('#box').layout('add', {
title : 'center title',
region : 'center',
});


//删除指定面板
$('#box').layout('remove', 'north');

使用$.fn.layout.defaults 重写默认值对象。

相关文章
相关标签/搜索