我是靠谱客的博主 贪玩雪碧,最近开发中收集的这篇文章主要介绍EasyUi_学习之路_05,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

今天学习layout

<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-81">
<link href="easyui/themes/default/easyui.css" rel="stylesheet" type="text/css" />
<link href="easyui/themes/icon.css" rel="stylesheet" type="text/css" />
<script src="easyui/jquery-1.8.0.min.js" type="text/javascript"></script>
<script src="easyui/jquery.easyui.min.js" type="text/javascript"></script>
 <script src="easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
<title>布局框架</title>
<script type="text/javascript">
 function getPanel() {
            var southPanel = $("#layoutbody").layout('panel', 'south');
            //获得panel的属性
            var attributes = southPanel.panel('options');
            console.info(attributes); //可以看到其中的各个属性,浏览器调试,这里说明下:使用这种框架和使用js自己书写前台代码,浏览器调试是必不可少的:火狐或者谷歌
        }
    </script>
 </head>
<body id="layoutbody" class="easyui-layout">
    <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',iconCls:'icon-reload',title:'East',split:true" style="width: 100px;"></div>
    <div data-options="region:'west',title:'West',split:true" style="width: 100px;">
        <input type="button" value="获取panel" οnclick="getPanel();" />
    </div>
    <div data-options="region:'center',title:'center title'" href="first.jsp" style="padding: 5px;background: #eee;">
    <!--如果这里指定了href属性,那么我们自己在这个部分写的代码将不会被现实-->
        <input type="button" value="获取panel" οnclick="getPanel();" />        
    </div>
</body>
</html>


Layout 选项

名称类型描述默认
fitbooleanSet to true to set the layout size fit its parent container.When creating layout on 'body' tag, it will be auto maximized to the full size of whole page.false

Region Panel Options

The region panel options is defined in panel component, below is some common and added properties:

名称类型描述默认
titlestringThe layout panel title text.null
regionstringDefines the layout panel position, the value is one of following: north, south, east, west, center. 
borderbooleanTrue to show layout panel border.true
splitboolean如果设置为true将显示一个分隔条,用户可以拖动分隔条来改变布局面板的尺寸。false
iconClsstringAn icon CSS class to show a icon on panel header.null
hrefstring在指定区域内加载页面的body中的部分,其他不加载null
collapsiblebooleanDefines if to show collapsible button.true
minWidthnumberThe minimum panel width.10
minHeightnumberThe minimum panel height.10
maxWidthnumberThe maximum panel width.10000
maxHeightnumberThe maximum panel height.10000

Methods

名称参数描述
resizenoneSet the layout size.
panelregionReturn the specified panel, the 'region' parameter possible values:'north','south','east','west','center'.
collapseregionCollapse the specified panel, the 'region' parameter possible values:'north','south','east','west'.
expandregionExpand the specified panel, the 'region' parameter possible values:'north','south','east','west'.
addoptionsAdd a specified panel, the options parameter is a config object, see tab panel properties for more details.
removeregionRemove the specified panel, the 'region' parameter possible values:'north','south','east','west'.

最后

以上就是贪玩雪碧为你收集整理的EasyUi_学习之路_05的全部内容,希望文章能够帮你解决EasyUi_学习之路_05所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(62)

评论列表共有 0 条评论

立即
投稿
返回
顶部