jquery-easy ui-layout布局(easy ui的固定布局方案)

1.前言.
easy ui有两种布局,一种是在div上面布局,一种是直接body全局布局,一般div布局用得比较多。本文主要参照http://www.cnblogs.com/Philoo/archive/2011/10/01/jeasyui_api_layout.html。
2.布局实现方法 。
依赖•panel•resizable用法示例创建 Layout
经由标记创建 Layout 。添加 'easyui-layout' 类到 <div/> 标记。
<div id="cc" class="easyui-layout" style="width:600px;height:400px;"> <div region="north" title="North Title" split="true" style="height:100px;"></div>
<div region="south" title="South Title" split="true" style="height:100px;"></div>
<div region="east" iconCls="icon-reload" title="East" split="true" style="width:100px;"></div>
<div region="west" split="true" title="West" style="width:100px;"></div>
<div region="center" title="center title" style="padding:5px;background:#eee;"></div>
</div>
在整个页面上创建 Layout。
<body class="easyui-layout">
<div region="north" title="North Title" split="true" style="height:100px;"></div>
<div region="south" title="South Title" split="true" style="height:100px;"></div>
<div region="east" iconCls="icon-reload" title="East" split="true" style="width:100px;"></div>
<div region="west" split="true" title="West" style="width:100px;"></div>
<div region="center" title="center title" style="padding:5px;background:#eee;"></div>
</body>
折叠 Layout Panel
$('#cc').layout();
// 折叠 west panel
$('#cc').layout('collapse','west');
3.参数的解释.
Layout Panel 选项名称
类型
说明
默认值

title
string
Layout panel 的标题文字。
null

region
string
定义 layout panel 的位置,其值是下列之一:north、south、east、west、center。


border
boolean
True 就显示 layout panel 的边框。
true

split
boolean
True 就显示拆分栏,用户可以用它改变panel 的尺寸。
false

iconCls
string
在panel 头部显示一个图标的CSS 类。
null

href
string
从远程站点加载数据的 URL 。
null


方法名称
参数
说明

resize
none
设置 layout 的尺寸。

panel
region
返回指定的 panel,'region' 参数可能的值是:'north'、'south'、'east'、'west'、'center'。

collapse
region
折叠指定的 panel,'region' 参数可能的值是:'north'、'south'、'east'、'west'。

expand
region
展开指定的 panel,'region' 参数可能的值是:'north'、'south'、'east'、'west'。


本文转自:http://www.cnblogs.com/Philoo/archive/2011/10/01/jeasyui_api_layout.html
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值