1、可以在一個Div內建立一個layout
- <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>
(注:如果在一個Div內建立一個layout,在style內指定Size是必須的,否則無沒顯示)
2、可以在整個頁面建立一個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 Options
Name | Type | Description | Default |
---|
title | string | layout的標題文字,如不設置,則不能出現折疊按鈕 | null |
region | string | layout的位置,必須為以下的值: north, south, east, west, center. (注:在如果不註明則不會顯示該Div) | |
border | boolean | 是否顯示邊框 | true |
split | boolean | 顯示分拆條,並可拖動改變 Size | false |
iconCls | string | An icon CSS class to show a icon on panel header. | null |
href | string | An URL to load data from remote site. | null |
Methods
Name | Parameter | Description |
---|
resize | none | Set the layout size. |
panel | region | Return the specified panel, the 'region' parameter possible values:'north','south','east','west','center'. |
collapse | region | Collapse the specified panel, the 'region' parameter possible values:'north','south','east','west'. |
expand | region | Expand the specified panel, the 'region' parameter possible values:'north','south','east','west'. |
转载于:https://www.cnblogs.com/DinoFung/archive/2012/02/13/2348699.html