EasyUI-Portal(门户)
这里的门户就是可以把各种资源集中到一个视窗下集中管理或应用的套件。
第1步:创建一个HTML页面
<div id=”pp” style=”width:x;height:x;”>
<div style=”width:”></div>
<div style=”width:”></div>
<div style=”width:”></div>
</div>
第2步:创建一个门户
$(‘#pp’).portal(options);
第3步:在这个门户中添加面板部件
// create the panel
var p = $(‘<div></div>’).appendTo(‘body’);
p.panel({
title: ‘My Title’,
height:
closable: true,
collapsible: true
});
// add the panel to portal
$(‘#pp’).portal(‘add’, {
panel: p,
columnIndex:
});
属性
属性名 |
属性值类型 |
描述 |
默认值 |
width |
number |
门户宽度。 |
auto |
height |
number |
门户高度。 |
auto |
border |
boolean |
定义是否显示门户边框。 |
false |
fit |
boolean |
当该属性为true时则设置门户大小自适应父容器。 |
false |
事件
事件名 |
参数 |
描述 |
onStateChange |
none |
在用户拖拽面板的时候触发。 |
onResize |
width,height |
在门户大小改变的时候触发。 |
方法
方法名 |
参数 |
描述 |
options |
none |
返回属性对象。 |
resize |
param |
设置门户大小,‘param’参数包含以下属性: |
getPanels |
columnIndex |
获取指定列面板,当列索引参数未指定的时候则返回所有面板。 |
add |
param |
添加一个新面板,‘param’参数包含以下属性: |
remove |
panel |
移除和销毁指定面板。 |
disableDragging |
panel |
禁用面板拖拽功能。 |
enableDragging |
panel |
启用面板拖拽功能。 |
声明: 除非转自他站(如有侵权,请联系处理)外,本文采用 BY-NC-SA 协议进行授权 | 嗅谱网
转载请注明:转自《EasyUI-Portal(门户)》
本文地址:http://www.xiupu.net/archives-2592.html
关注公众号:
微信赞赏
支付宝赞赏