JQueryEasyUI 组件 布局 Layout组件
来源:互联网 发布:显示登录成功和链接php 编辑:程序博客网 时间:2024/05/23 01:40
1,介绍
layout布局组件是一个基本的容器组件,通常使用该组件来实现网站后台的总体布局设计。在该组件内部可以放置其它的easyui组件。
该组件将内容分为5个区域,分别是东西南北中,中间区域面板是必须存在的 边缘面板是可选的 也可以点击折叠按钮将面板折叠起来,布局可以嵌套
继承关系 panel 和 resizable
2,属性
属性属性值类型描述
title
string
布局面板标题文本
region
string
定义布局面板位置,可用的值有:north south east west center
border
boolean
为true时 显示布局面板边框
split
boolean
为true时 用户可以通过分割栏改变面板大小
iconCls
string
一个包含图标的CSS类ID 该图标将会显示到面板标题上
href
string
用于读取远程站点数据的URL链接
collapsible
boolean
定义是否显示折叠按钮
fit
boolean
当设置为true 时 面板大小将自适应父容器
3,方法
方法名参数类型
描述
add
options
添加指定面板 属性参数是一个匹配对象
remove
region
移除指定面板 'region'参数可用值 nortj south east west
语法
$("#标签ID").layout("add",{ itemText:itemValue });
$("#标签ID").layout("remove",region});
4,实例
<div id="cc" class="easyui-layout" data-options="fit:true"> <%--//基于父容器最大化--%> <div data-options="region:'north',title:'北部'" style="height: 100px"></div> <div data-options="region:'south',title:'南部'" style="height: 100px"></div> <div data-options="region:'east',title:'东部'" style="width: 100px;"></div> <div data-options="region:'west',title:'西部'" style="width: 100px;"></div> <div data-options="region:'center',title:'中部'" style="padding: 5px; background-color: #eee"> 选择区域:<input id="area" /><br /> <a id="btn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add'">添加</a> <a id="btn2" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove'">删除</a> </div> </div>
$(function () { addcomArea(); addbtn(); }); function addcomArea() { $("#area").combobox({ width: 150, valueField: 'id', textField: 'text', data: [ { "id": "north", "text": "北部", "selected": true }, { "id": "south", "text": "南部" }, { "id": "west", "text": "北部" }, { "id": "east", "text": "北部" } ] }); } function addbtn() { $("#btn").linkbutton({ onClick: function () { var strLay = $("#area").combobox("getValue"); var strLayT = $("#area").combobox("getText"); addArea(strLay, strLayT); } }); $("#btn2").linkbutton({ onClick: function () { var strLay = $("#area").combobox("getValue"); $("#cc").layout("remove", strLay); } }); } function addArea(strA, strB) { if (strA=="north"||strA=="south") { $("#cc").layout("add", { region: strA, height: 100, title: strB, split:true, }); } if (strA == "west" || strA == "east") { $("#cc").layout("add", { region: strA, width: 100, title: strB, split: true, }); } }
0 0
- JQueryEasyUI 组件 布局 Layout组件
- JQueryEasyUI 组件 布局 portal组件
- JQueryEasyUI 组件 布局 portal组件
- JQueryEasyUI 组件 布局 Accordion组件(分类)
- JQueryEasyUI 组件 布局 Tabs组件(选项卡)
- JQueryEasyUI 组件dialog
- jQuery Easy UI Layout(布局)组件
- JQueryEasyUI 组件的实例化
- 11、jQueryEasyUI的基本组件
- JQueryEasyUI 组件 datagrid组件(数据表格组件)
- Dojo.Layout下的三个布局组件,浓缩精华
- 几种Android布局layout组件主要常用属性
- 【ALearning】第四章 Android Layout组件布局(一)
- 【ALearning】第四章 Android Layout组件布局(二)
- java SWT:自定义布局(Layout)实现组件自动缩放显示
- JQuery EasyUI 之Layout布局组件小Demo
- 组件布局
- 组件布局
- nyoj 14 会场安排问题
- IO流文件的复制删除
- R语言常用函数总结大全
- 线线几何位置关系
- 三种常用排序算法(冒泡、选择、快速)的Java实现
- JQueryEasyUI 组件 布局 Layout组件
- codeforces Plant Tree
- 关于我
- Debug调试
- Java子类与父类之间的对象转换
- (邻接表构图-网络寻路题解
- 135. Candy
- 数据结构—树与二叉树篇I
- Hibernate 关联关系