1.
每个easyui组件都有特性(property)、方法(method)和事件(event),用户可以很容易地扩展它们。
特性在jQuery.fn.{plugin}.defaults里定义。例如,
事件(回调函数)也在jQuery.fn.{plugin}.defaults里定义。
方法在jQuery.fn.{plugin}.methods里定义。每个方法有两个参数:jq和param。第一个参数'jq'是必须的,它是指jQuery对象。第二个参数'param'
1.
2.
3.
4.
5.
6.
7.
现在你可以调用'mymove'方法把dialog移动到一个指定的位置:
1.
2.
3.
4.
1.2.
1.2.1. 用法
1.
2.
名称 | 类型 | 说明 | 默认值 |
$.parser.auto | boolean | 定义是否自动解析easyui组件。 | true |
名称 | 参数 | 说明 |
$.parser.onComplete | context | 当解析器完成解析动作的时候触发。 |
名称 | 参数 | 说明 |
$.parser.parse | context | 解析easyui组件。 |
1.3. EasyLoader 加载器
1.3.1. 用法
1.
2.
3.
4.
名称 | 类型 | 说明 | 默认值 |
modules | object | 预定义的模块。 | |
locales | object | 预定义的语言环境。 | |
base | string | easyui的基本路径,必须以'/'结尾。 | 基本路径将被自动相对于easyload.js进行设置 |
theme | string | 定义在'themes' | default |
css | boolean | 定义当加载模块的时候是否加载css文件。 | true |
locale | string | 语言环境名称。 | null |
timeout | number | 以毫秒为单位的超时值,如果超时发生就触发。 | 2000 |
·
·
·
·
·
·
·
·
·
·
·
名称 | 参数 | 说明 |
onProgress | name | 当一个模块被成功加载的时候触发。 |
onLoad | name | 当一个模块和它的依赖被成功加载的时候触发。 |
名称 | 参数 | 说明 |
load | module, callback | 加载指定模块。当加载成功的时候一个回调函数将被调用。 Module的有效类型是: |
1.4. Draggable 可拖拽
用$.fn.draggable.defaults重写默认的defaults。
1.
2.
3.
1.
2.
3.
名称 | 类型 | 说明 | 默认值 |
proxy | string,function | 拖拽时要使用的代理元素,设置为’clone’时,克隆元素将被用作代理。如果指定一个函数,它必须返回一个jQuery对象。 | null |
revert | boolean | 如果设为true,拖拽结束后元素将返回它的开始位置。 | false |
cursor | string | 拖拽时的css光标(cursor)。 | move |
deltaX | number | 拖拽的元素相对于当前光标的位置的X。 | null |
deltaY | number | 拖拽的元素相对于当前光标的位置的Y。 | null |
handle | selector | 启动draggable的处理(handle)。 | null |
disabled | boolean | 设为true就停止draggable。 | false |
edge | number | 能够在其中开始draggable.的拖拽宽度。 | 0 |
axis | string | 定义拖拽元素可在其上移动的轴,可用的值是'v'或'h',当设为null,将会沿着'v'和'h'的方向移动。 | null |
名称 | 参数 | 说明 |
onBeforeDrag | e | 拖拽前触发,返回false就取消拖拽。 |
onStartDrag | e | 目标对象开始拖拽时触发。 |
onDrag | e | 拖拽期间触发。返回false将不做真正的拖拽。 |
onStopDrag | e | 拖拽停止时触发。 |
名称 | 参数 | 描述 |
options | none | 返回选项(options)属性(property)。 |
proxy | none | 如果设置了代理(proxy)属性就返回代理(proxy)。 |
enable | none | 启用拖拽动作。. |
disable | none | 禁用拖拽动作。 |
1.5. Droppable 可释放
1.
1.
2.
3.
名称 | 类型 | 说明 | 默认值 |
accept | selector | 确定将被接受的可拖拽元素。 | null |
名称 | 参数 | 说明 |
onDragEnter | e,source | 当可拖拽元素被拖进来时触发。source参数指被拖拽的DOM元素。 |
onDragOver | e,source | 当可拖拽元素被拖过时触发。source参数指被拖拽的DOM元素。 |
onDragLeave | e,source | 当可拖拽元素被拖离开时触发。source参数指被拖拽的DOM元素。 |
onDrop | e,source | 当可拖拽元素被放下时触发。source参数指被拖拽的DOM元素。 |
1.6. Resizable 可调整尺寸
1.6.1. 用法
1.
1.
2.
3.
4.
名称 | 类型 | 说明 | 默认值 |
disabled | boolean | true将禁止调整尺寸。 | false |
handles | string | 指resizable的方向。'n'是北,'e'是东,等等。 | n, e, s, w, ne, se, sw, nw, all |
minWidth | number | 调整尺寸时最小宽度。 | 10 |
minHeight | number | 调整尺寸时最小高度。 | 10 |
maxWidth | number | 调整尺寸时最大宽度。 | 10000 |
maxHeight | number | 调整尺寸时最大高度。 | 10000 |
edge | number | 被调整尺寸的边框的边缘。 | 5 |
名称 | 参数 | 说明 |
onStartResize | e | 开始调整尺寸时触发。 |
onResize | e | 调整尺寸期间触发。返回false时DOM元素将不进行真实的调整尺寸动作。 |
onStopResize | e | 停止调整尺寸时触发。 |
1.7. Pagination 分页
1.7.1. 依赖
linkbutton
用法
1.
1.
2.
3.
4.
名称 | 类型 | 说明 | 默认值 |
total | number | 记录总数,应该在创建pagination时设置。 | 1 |
pageSize | number | 页面尺寸。(译者注:每页显示的最大记录数) | 10 |
pageNumber | number | 创建pagination时显示的页码。 | 1 |
pageList | array | 用户能改变页面尺寸。pageList特性定义了能改成多大的尺寸。 | [10,20,30,50] |
loading | boolean | 定义了是否数据正在加载。 | false |
buttons | array | 定义了自定义按钮,每个按钮包含两个特性: | null |
showPageList | boolean | 定义了是否显示页面列表。 | true |
showRefresh | boolean | 定义了是否显示刷新按钮。 | true |
beforePageText | string | 在input组件之前显示label。 | Page |
afterPageText | string | 在input组件之后显示label。 | of {pages} |
displayMsg | string | 显示页面信息。 | Displaying {from} to {to} of {total} items |
名称 | 参数 | 说明 |
onSelectPage | pageNumber, pageSize | 当用户选择新的页面时触发。回调函数包含两个参数: |
onBeforeRefresh | pageNumber, pageSize | 刷新按钮点击之前触发,返回false就取消刷新动作。 |
onRefresh | pageNumber, pageSize | 刷新之后触发。 |
onChangePageSize | pageSize | 当用户改变页面尺寸时触发。 |
名称 | 参数 | 说明 |
options | none | 返回options对象。 |
loading | none | 把pagination变成正在加载(loading)状态。 |
loaded | none | 把pagination变成加载完成(loaded)状态。 |
1.8. SearchBox 搜索框
用$.fn.searchbox.defaults重写defaults。
1.8.1. 依赖
menubutton
1.8.2. 用法示例
创建SearchBox
1.
1.
6.
7.
8.
9.
10.
11.
12.
13.
2.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
1.8.3. 特性
名称 | 类型 | 说明 | 默认值 |
width | number | 设置组件宽度。 | auto |
propmt | string | 显示在输入框里的提示信息。 | '' |
value | string | 输入的值。 | '' |
menu | selector | 搜索类型的菜单。 | null |
searcher | function(value,name) | 函数,当用户按搜索按钮或者按ENTER键时被调用。 | null |
1.8.4. 方法
名称 | 参数 | 说明 |
options | none | 返回options对象。 |
menu | none | 返回搜索类型的菜单对象。 |
textbox | none | 返回文本框对象。 |
getValue | none | 返回当前的搜索用值。 |
setValue | value | 设置新的搜索用值。 |
getName | none | 返回当前搜索类型的名称。 |
destroy | none | 销毁这个组件。 |
resize | width | 重设组件的宽度。 |
1.9. ProgressBar 进度条
用$.fn.progressbar.defaults重写defaults。
1.9.1. 依赖
none
1.9.2. 用法示例
创建ProgressBar
ProgressBar能够从html标记创建或者编程创建。从标记创建更容易些,把
1.
获取或者设置值
我们获取当前值并且给这个组件设置一个新值。
1.
2.
3.
4.
5.
1.9.3. 特性
名称 | 类型 | 说明 | 默认值 |
width | string | 设置progressbar的宽度。 | auto |
value | number | 百分比值。 | 0 |
text | string | 显示在组件上的文字的模板。 | {value}% |
1.9.4. 事件
名称 | 参数 | 说明 |
onChange | newValue,oldValue | 当值改变的时候触发。 |
1.9.5. 方法
名称 | 参数 | 说明 |
options | none | 返回options对象。 |
resize | width | 调整组件尺寸。 |
getValue | none | 返回当前的进度值。 |
setValue | value | 设置一个新的进度值。 |
2.
2.1. Panel 面板
用$.fn.panel.defaults重写defaults。
2.1.1. 用法示例
创建Panel
从标记创建Panel更容易。把
1.
2.
3.
4.
5.
6.
2.
让我们创建带右上角工具栏的Panel。.
1.
2.
panel
3.
panel
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
移动Panel
调用
1.
2.
3.
4.
加载内容
让我们经由ajax加载panel内容并且当加载成功时显示一些信息。
1.
2.
3.
4.
5.
6.
2.1.2. 特性
名称 | 类型 | 说明 | 默认值 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
title | string | 显示在Panel头部的标题文字。 | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
iconCls | string | 在Panel里显示一个16x16图标的CSS类。 | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
width | number | 设置Panel的宽度。 | auto | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
height | number | 设置Panel的高度。 | auto | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
left | number | 设置Panel的左边位置。 | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
top | number | 设置Panel的顶部位置。 | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cls | string | 给Panel增加一个CSS类。 | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
headerCls | string | 给Panel头部增加一个CSS类。 | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bodyCls | string | 给Panel身体增加一个CSS类。 | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
style | object | 给Panel增加自定义格式的样式。 | {} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fit | boolean | 当设为true时,Panel的 | false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
border | boolean | 定义了是否显示Panel的边框。 | true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
doSize | boolean | 设置为true,创建时Panel就调整尺寸并做成布局。 | true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
noheader | boolean | 要是设置为true,Panel的头部将不会被创建。 | false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
content | string | Panel身体的内容。 | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
collapsible | boolean | 定义了是否显示折叠按钮。 | false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minimizable | boolean | 定义了是否显示最小化按钮。 | false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maximizable | boolean | 定义了是否显示最大化按钮。 | false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
closable | boolean | 定义了是否显示关闭按钮。 | false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tools | array | 自定义工具组,每个工具包含两个特性: iconCls和handler | [] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
collapsed | boolean | 定义了初始化Panel是不是折叠的。 | false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minimized | boolean | 定义了初始化Panel是不是最小化的。 | false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maximized | boolean | 定义了初始化Panel是不是最大化的。 | false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
closed | boolean | 定义了初始化Panel是不是关闭的。 | false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
href | string | 一个URL,用它加载远程数据并且显示在Panel里。 | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cache | boolean | 设置为true就缓存从href加载的Panel内容。 | true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
loadingMessage | string | 当加载远程数据时在Panel里显示的一条信息。 | Loading… | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
extractor | function | 定义了如何从ajax响应抽出内容,返回抽出的数据。 extractor: function(data){ ]*>((.|[\n\r])*)<\/body>/im;
}
2.1.3.
|
名称 | 参数 | 说明 |
onLoad | none | 当远程数据被加载时触发。 |
onBeforeOpen | none | Panel打开前触发,返回false就停止打开。 |
onOpen | none | Panel打开后触发。 |
onBeforeClose | none | Panel关闭前触发,返回false就取消关闭。 |
onClose | none | Panel关闭后触发。 |
onBeforeDestroy | none | Panel销毁前触发,返回false就取消销毁。 |
onDestroy | none | Panel销毁后触发。 |
onBeforeCollapse | none | Panel折叠前触发,返回false就停止折叠。 |
onCollapse | none | Panel折叠后触发。 |
onBeforeExpand | none | Panel展开前触发,返回false就停止展开。 |
onExpand | none | Panel展开后触发。 |
onResize | width, height | Panel调整尺寸后触发。 |
onMove | left,top | Panel移动后触发。 Top:新的顶部位置 |
onMaximize | none | 窗口最大化后触发。 |
onRestore | none | 窗口还原为它的原始尺寸后触发。 |
onMinimize | none | 窗口最小化后触发。 |
2.1.4. 方法
名称 | 参数 | 说明 |
options | none | 返回选项特性。 |
panel | none | 返回Panel对象。 |
header | none | 返回Panel头部对象。 |
body | none | 返回Panel身体对象。 |
setTitle | title | 设置头部的标题文字。 |
open | forceOpen | 当forceOpen参数设为true,就绕过onBeforeOpen回调函数打开Panel。 |
close | forceClose | 当forceClose参数设为true,就绕过onBeforeClose回调函数关闭Panel。 |
destroy | forceDestroy | 当forceDestroy参数设为true,就绕过onBeforeDestroy回调函数销毁Panel。 |
refresh | href | 当设置了href特性时,刷新Panel加载远程数据。 |
resize | options | 设置Panel尺寸并做布局。Options对象包含下列特性: |
move | options | 移动Panel到新位置。Options对象包含下列特性: |
maximize | none | Panel适应它的容器的尺寸。 |
minimize | none | 最小化Panel。 |
restore | none | 把最大化的Panel还原为它原来的尺寸和位置。 |
collapse | animate | 折叠Panel身体。 |
expand | animate | 展开Panel身体。 |
2.2. Tabs 标签页/选项卡
用$.fn.tabs.defaults重写defaults。
panel
linkbutton
创建tabs
1.
从标记创建Tabs更容易,我们不需要写任何JavaScript代码。记住把
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
2.
现在我们编程创建
1.
2.
3.
4.
5.
6.
增加新的
1.
2.
3.
4.
5.
6.
获取选中的
1.
2.
3.
名称 | 类型 | 说明 | 默认值 |
width | number | Tabs | auto |
height | number | Tabs | auto |
plain | boolean | True | false |
fit | boolean | True | false |
border | boolean | True | true |
scrollIncrement | number | 每按一次tab | 100 |
scrollDuration | number | 每一个滚动动画应该持续的毫秒数。 | 400 |
tools | array | 右侧工具栏,每个工具选项都和 | null |
名称 | 参数 | 说明 |
onLoad | panel | 当一个 |
onSelect | title | 当用户选择一个 |
onBeforeClose | title | 当一个 |
onClose | title | 当用户关闭一个 |
onAdd | title | 当一个新的 |
onUpdate | title | 当一个 |
onContextMenu | e, title | 当一个 |
名称 | 参数 | 说明 |
options | none | 返回 |
tabs | none | 返回全部 |
resize | none | 调整 |
add | options | 增加一个新的 |
close | title | 关闭一个 |
getTab | title | 获取指定的 |
getSelected | none | 获取选中的 |
select | title | 选择一个 |
exists | title | 是指是否存在特定的 |
update | param | 更新指定的 |
Tab panel
名称 | 类型 | 说明 | 默认值 |
title | string | Tab panel | |
content | string | Tab panel | |
href | string | 加载远程内容来填充 | null |
cache | boolean | True | true |
iconCls | string | 显示在tab panel | null |
width | number | Tab panel | auto |
height | number | Tab panel | auto |
一些附加的特性
名称 | 类型 | 说明 | 默认值 |
closable | boolean | 当设置为 | false |
selected | boolean | 当设置为 | false |
2.3. Accordion 手风琴
用
2.3.1. 依赖
panel
创建
经由标记创建
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
我们可以改变或重建
1.
2.
3.
刷新
调用
1.
2.
3.
4.
2.3.3. 容器选项
名称 | 类型 | 说明 | 默认值 |
width | number | Accordion | auto |
height | number | Accordion | auto |
fit | boolean | 设置为 | false |
border | boolean | 定义是否显示边框。 | true |
animate | boolean | 定义当展开折叠 | true |
2.3.4. Panel 选项
Accordion
名称 | 类型 | 说明 | 默认值 |
selected | boolean | 设为 | false |
2.3.5. 事件
名称 | 参数 | 说明 |
onSelect | title | 当 |
onAdd | title | 当增加一个新 |
onBeforeRemove | title | 当移除一个 |
onRemove | title | 当移除一个 |
2.3.6. 方法
名称 | 参数 | 说明 |
options | none | 返回 |
panels | none | 获取全部的 |
resize | none | 调整 |
getSelected | none | 获取选中的 |
getPanel | title | 获取指定的 |
select | title | 选择指定的 |
add | options | 增加一个新的 |
remove | title | 移除指定的 |
2.4. Layout 布局
panel
resizable
创建
经由标记创建
1.
2.
3.
4.
5.
6.
7.
在整个页面上创建
1.
2.
3.
4.
5.
6.
7.
折叠
1.
2.
3.
名称 | 类型 | 说明 | 默认值 |
title | string | Layout panel | null |
region | string | 定义 | |
border | boolean | True | true |
split | boolean | True | false |
iconCls | string | 在panel | null |
href | string | 从远程站点加载数据的 | null |
2.4.4. 方法
名称 | 参数 | 说明 |
resize | none | 设置 |
panel | region | 返回指定的 |
collapse | region | 折叠指定的 |
expand | region | 展开指定的 |
3.
3.1. Menu 菜单
用
创建
经由标记创建
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
编程创建
1.
2.
3.
4.
5.
显示
当
1.
2.
3.
4.
名称 | 类型 | 说明 | 默认值 |
zIndex | number | Menu | 110000 |
left | number | Menu | 0 |
top | number | Menu | 0 |
3.1.3. 事件
名称 | 参数 | 说明 |
onShow | none | 当 |
onHide | none | 当 |
onClick | item | 当点击 |
3.1.4. 方法
名称 | 参数 | 说明 |
show | pos | 在指定的位置显示 |
hide | none | 隐藏 |
getItem | itemEl | 获取 |
setText | param | 给指定的 |
setIcon | param | 给指定的 |
findItem | text | 找到指定的 |
appendItem | param | 追加 |
removeItem | itemEl | 移除指定的 |
enableItem | itemEl | 启用 |
disableItem | itemEl | 禁用 |
3.2. LinkButton 链接按钮
用
1.
1.
2.
3.
4.
5.
名称 | 类型 | 说明 | 默认值 |
id | string | 组件的 | null |
disabled | boolean | True | false |
plain | boolean | True | false |
text | string | 按钮的文字。 | '' |
iconCls | string | 在左边显示一个16x16 | null |
名称 | 参数 | 说明 |
options | none | 返回选项(options)特性。 |
disable | none | 禁用按钮。 |
enable | none | 启用按钮。 |
3.3. MenuButton 菜单按钮
扩展自
menu
linkbutton
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
1.
2.
3.
其特性扩展自
名称 | 类型 | 说明 | 默认值 |
plain | boolean | True | true |
menu | string | 创建一个相应 | null |
duration | number | 当悬停在按钮上时,以毫秒为单位定义的,显示menu的持续时间。 | 100 |
名称 | 参数 | 说明 |
options | none | 返回选项(options)对象。 |
disable | none | 禁用 |
enable | none | 启用 |
3.4. SplitButton 拆分按钮
扩展自
menu
linkbutton
1.
2.
3.
4.
5.
1.
2.
3.
其特性扩展自
名称 | 类型 | 说明 | 默认值 |
plain | boolean | True | true |
menu | string | 创建一个对应 | null |
duration | number | 当悬停在按钮上时,以毫秒为单位定义的,显示menu的持续时间。 | 100 |
名称 | 参数 | 说明 |
options | none | 返回选项(options)对象。 |
disable | none | 禁用 |
enable | none | 启用 |
4.
4.1. Form 表单
4.1.1. 用法
1.
2.
3.
使
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
去做一个提交动作。
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
名称 | 类型 | 说明 | 默认值 |
url | string | 表单提交动作的 | null |
名称 | 参数 | 说明 |
onSubmit | none | 提交前触发,返回 |
success | data | 当表单提交成功时触发。 |
onBeforeLoad | param | 发出请求加载数据之前触发。返回 |
onLoadSuccess | data | 当表单数据加载时触发。 |
onLoadError | none | 加载表单数据时发生某些错误的时候触发。 |
名称 | 参数 | 说明 |
submit | options | 做提交动作, |
load | data | 加载记录来填充表单。 |
clear | none | 清除表单数据。 |
validate | none | 进行表单字段验证,当全部字段都有效时返回 |
4.2. ValidateBox 验证框
用
1.
1.
2.
3.
验证规则
验证规则是通过使用
email:匹配
url:匹配
length[0,100]:允许从
remote['http://.../action.do','paramName']:发送
要自定义验证规则,重写
1.
2.
3.
4.
5.
6.
7.
8.
现在你可以使用这个
1.
名称 | 类型 | 说明 | 默认值 |
required | boolean | 定义是否字段应被输入。 | false |
validType | string | 定义字段的验证类型,比如 | null |
missingMessage | string | 当文本框是空时出现的提示文字。 | This field is required. |
invalidMessage | string | 当文本框的内容无效时出现的提示文字。 | null |
名称 | 参数 | 说明 |
destroy | none | 移除并且销毁这个组件。 |
validate | none | 进行验证以判定文本框的内容是否有效。 |
isValid | none | 调用 |
4.3. Combo 组合
扩展自
validatebox
panel
1.
2.
1.
2.
3.
4.
其特性扩展自
名称 | 类型 | 说明 | 默认值 |
Width | number | 组件的宽度。 | auto |
panelWidth | number | 下拉面板的宽度。 | null |
panelHeight | number | 下拉面板的高度。 | 200 |
multiple | boolean | 定义是否支持多选。 | false |
separator | string | 多选时文本的分隔符。 | , |
editable | boolean | 定义是否用户可以往文本域中直接输入文字。 | true |
disabled | boolean | 定义是否禁用文本域。 | false |
hasDownArrow | boolean | 定义是否显示向下箭头的按钮。 | true |
Value | string | 默认值。 | |
Delay | number | 从最后一个键的输入事件起,延迟进行搜索。 | 200 |
keyHandler | object | 当用户按键后调用的函数。默认的 keyHandler: { } | |
说明 | 参数 | 说明 |
onShowPanel | none | 当下拉面板显示的时候触发。 |
onHidePanel | none | 当下拉面板隐藏的时候触发。 |
onChange | newValue, oldValue | 当文本域的值改变的时候触发。 |
其方法扩展自
名称 | 参数 | 说明 |
options | none | 返回选项(options)对象。 |
panel | none | 返回下拉面板对象。 |
textbox | none | 返回文本框对象。 |
destroy | none | 销毁组件。 |
resize | width | 调整组件的宽度。 |
showPanel | none | 显示下拉面板。 |
hidePanel | none | 隐藏下拉面板。 |
disable | none | 禁用组件。 |
enable | none | 启用组件。 |
validate | none | 验证输入的值。 |
isValid | none | 返回验证结果。 |
clear | none | 清除组件的值。 |
getText | none | 获取输入的文本。 |
setText | text | 设置文本值。 |
getValues | none | 获取组件的值的数组。 |
setValues | values | 设置组件的值的数组。 |
getValue | none | 获取组件的值。 |
setValue | value | 设置组件的值。 |
4.4. ComboBox 组合框
扩展自
combo
1.
1.
1.
2.
3.
4.
5.
json
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
其特性扩展自
名称 | 类型 | 说明 | 默认值 |
valueField | string | 绑定到 | value |
textField | string | 绑定到 | text |
mode | string | 定义在文本改变时如何加载列表数据。如果组合框从服务器加载就设为 | local |
url | string | 从远程加载列表数据的 | null |
method | string | 用来检索数据的 | post |
data | array | 被加载的列表数据。 | null |
filter | function | 定义当 | |
formatter | function | 定义如何呈现行。这个函数有一个参数:row。 | |
其事件扩展自
名称 | 参数 | 说明 |
onLoadSuccess | none | 当远程数据加载成功时触发。 |
onLoadError | none | 当远程数据加载失败时触发。 |
onSelect | record | 当用户选择一个列表项时触发。 |
onUnselect | record | 当用户取消选择一个列表项时触发。 |
其方法扩展自
名称 | 参数 | 说明 |
options | none | 返回 |
getData | none | 返回加载的数据。 |
loadData | data | 加载本地列表数据。 |
reload | url | 请求远程的列表数据。 |
setValues | values | 把数组设置为组合框的值。 |
setValue | value | 设置组合框的值。 |
clear | none | 清除组合框的值。 |
select | value | 选择指定的选项。 |
unselect | value | 取消选择指定的选项。 |
4.5. ComboTree 组合树
扩展自
combo
tree
1.
1.
1.
2.
3.
其特性扩展自
名称 | 类型 | 说明 | 默认值 |
editable | boolean | 定义用户是否可以直接往文本域中输入文字。 | false |
其事件扩展自
其方法扩展自
名称 | 参数 | 说明 |
options | none | 返回 |
tree | none | 返回 |
loadData | data | 加载本地的 |
reload | url | 再一次请求远程的 |
clear | none | 清除组件的值。 |
setValues | values | 把数组设置给组件的值。 |
setValue | value | 设置组件的值。 |
4.6. ComboGrid 组合表格
扩展自
combo
datagrid
1.
1.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
其特性扩展自combo
名称 | 类型 | 说明 | 默认值 |
loadMsg | string | 当 | null |
idField | string | id | null |
textField | string | 显示到文本框中的 | null |
mode | string | 定义当文本改变时如何加载 | local |
filter | function(q, row) | 定义当 | |
其事件扩展自
其方法扩展自
名称 | 参数 | 说明 |
options | none | 返回 |
grid | none | 返回 |
setValues | values | 把组件的值设为数组。 |
setValue | value | 设置组件的值。 |
clear | none | 清除组件的值。 |
4.7. NumberBox 数字框
扩展自
validatebox
1.
1.
2.
3.
4.
其特性扩展自
名称 | 类型 | 说明 | 默认值 |
disabled | boolean | 定义是否禁用该域。 | false |
min | number | 允许的最小值。 | null |
max | number | 允许的最大值。 | null |
precision | number | 显示在小数点后面的最大精度。 | 0 |
其方法扩展自
名称 | 参数 | 说明 |
disable | none | 禁用该域。 |
enable | none | 启用该域。 |
fix | none | 把值固定为有效的值。 |
4.8. DateBox 日期框
扩展自
combo
calendar
1.
1.
2.
3.
其特性扩展自
名称 | 类型 | 说明 | 默认值 |
panelWidth | number | 下拉日历面板的宽度。 | 180 |
panelHeight | number | 下拉日历面板的高度。 | auto |
currentText | string | 当前日期按钮上显示的文字。 | Today |
closeText | string | 关闭按钮上显示的文字。 | Close |
okText | string | 确定按钮上显示的文字。 | Ok |
disabled | boolean | 为 | false |
formatter | function | 格式化日期的函数,此函数有一个 | |
parser | function | 解析日期字符串的函数,此函数有一个 | |
名称 | 参数 | 说明 |
onSelect | date | 当用户选择一个日期时触发。 |
其方法扩展自
名称 | 参数 | 说明 |
options | none | 返回 |
calendar | none | 获取 |
setValue | value | 设置 |
4.9. Calendar 日历
用
1.
1.
2.
3.
4.
5.
名称 | 类型 | 说明 | 默认值 |
width | number | 日历组件的宽度。 | 180 |
height | number | 日历组件的高度。 | 180 |
fit | boolean | true | false |
border | boolean | 定义是否显示边框。 | true |
weeks | array | 显示星期的日历。 | ['S','M','T','W','T','F','S'] |
months | array | 显示月份的列表。 | ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] |
year | number | 日历的年。 | 当前年份(4位) |
month | number | 日历的月。 | 当前月份(从1开始) |
current | Date | 日历的日期。 | 当前日期 |
名称 | 参数 | 说明 |
onSelect | date | 当用户选择一个日期时触发。 |
名称 | 参数 | 说明 |
options | none | 返回 |
resize | none | 调整日历的尺寸。 |
moveTo | date | 移动日历到一个指定的日期。 |
4.10. Spinner 微调器
扩展自
validatebox
1.
1.
2.
3.
4.
其特性扩展自
名称 | 类型 | 说明 | 默认值 |
width | number | 组件的宽度。 | auto |
value | string | 初始值。 | |
min | string | 允许的最小值。 | null |
max | string | 允许的最大值。 | null |
increment | number | 点击微调器按钮时的增量值。 | 1 |
editable | boolean | 定义用户是否可以往文本域中直接输入值。 | true |
disabled | boolean | 定义是否禁用文本域。 | false |
spin | function(down) | 当用户点击微调按钮时调用的函数。 | |
名称 | 参数 | 说明 |
onSpinUp | none | 当用户点击向上微调按钮时触发。 |
onSpinDown | none | 当用户点击向下微调按钮时触发。 |
其方法扩展自
名称 | 参数 | 说明 |
options | none | 返回 |
destroy | none | 销毁微调器组件。 |
resize | width | 重设组件的宽度。 |
enable | none | 启用组件。 |
disable | none | 禁用组件。 |
getValue | none | 获取组件的值。 |
setValue | value | 设置组件的值。 |
clear | none | 清除组件的值。 |
4.11. NumberSpinner 数值微调器
扩展自
spinner
numberbox
1.
1.
2.
3.
其特性扩展自
其事件扩展自
其方法扩展自
名称 | 参数 | 说明 |
options | none | 返回 |
setValue | value | 设置 |
4.12. TimeSpinner 时间微调器
扩展自
spinner
1.
1.
2.
3.
其特性扩展自
名称 | 类型 | 说明 | 默认值 |
separator | string | 时分秒之间的分隔符。 | : |
showSeconds | boolean | 定义是否显示秒的信息。 | false |
highlight | number | 初期高亮的域, | 0 |
其事件扩展自
其方法扩展自
名称 | 参数 | 数码 |
options | none | 返回 |
setValue | value | 设置 |
getHours | none | 获取当前的时钟的值。 |
getMinutes | none | 获取当前的分钟的值。 |
getSeconds | none | 获取当前的秒钟的值。 |
5.
5.1. Window 窗口
扩展自
·
·
·
1.
2.
3.
1.
2.
3.
4.
5.
6.
其特性扩展自
名称 | 类型 | 说明 | 默认值 |
title | string | 窗口的标题文字。 | New Window |
collapsible | boolean | 定义是否显示折叠按钮。 | true |
minimizable | boolean | 定义是否显示最小化按钮。 | true |
maximizable | boolean | 定义是否显示最大化按钮。 | true |
closable | boolean | 定义是否显示关闭按钮。 | true |
closed | boolean | 定义是否关闭了窗口。 | false |
zIndex | number | 从其开始增加的窗口的 | 9000 |
draggable | boolean | 定义是否窗口能被拖拽。 | true |
resizable | boolean | 定义是否窗口可以调整尺寸。 | true |
shadow | boolean | 如果设为 | true |
inline | boolean | 定义如何放置窗口, | false |
modal | boolean | 定义窗口是不是模态窗口。 | true |
其事件扩展自
其方法扩展自
名称 | 参数 | 说明 |
window | none | 返回 |
5.2. Dialog 对话框
扩展自
window
linkbutton
1.
2.
3.
1.
2.
3.
其特性扩展自
名称 | 类型 | 说明 | 默认值 |
title | string | 对话框的标题文字。 | New Dialog |
collapsible | boolean | 定义是否显示折叠按钮。 | false |
minimizable | boolean | 定义是否显示最小化按钮。 | false |
maximizable | boolean | 定义是否显示最大化按钮。 | false |
resizable | boolean | 定义对话框能否调整尺寸。 | false |
toolbar | array | 对话框的顶部工具栏,每个工具的选项都与 | null |
buttons | array | 对话框的底部按钮,每个按钮的选项都与 | null |
其事件扩展自
其方法扩展自
名称 | 参数 | 说明 |
dialog | none | 返回 |
5.3. Messager 消息框
用
window
linkbutton
progressbar
1.
2.
3.
4.
5.
6.
名称 | 类型 | 说明 | 默认值 |
ok | string | 确定按钮的文字。 | Ok |
cancel | string | 取消按钮的文字。 | Cancel |
5.3.4. 方法
名称 | 参数 | 说明 |
$.messager.show | options | 在屏幕的右下角显示一个消息窗口,options |
$.messager.alert | title, msg, icon, fn | 显示一个提示窗口。参数: |
$.messager.confirm | title, msg, fn | 显示一个带“确定”和“取消”按钮的确认消息。参数: |
$.messager.prompt | title, msg, fn | 显示一个带确定和取消按钮的消息窗口,提示用户输入一些文字。参数: |
$.messager.progress | options or method | 显示一个进度的消息窗口。 代码示例 显示进度消息窗口:
现在关闭消息窗口:
|
6.
6.1. DataGrid 数据表格
扩展自
panel
resizable
linkbutton
pagination
1.
1.
2.
3.
4.
5.
6.
7.
8.
6.1.3.
其特性扩展自
名称 | 类型 | 说明 | 默认值 |
columns | array | datagrid | null |
frozenColumns | array | 和列的特性一样,但是这些列将被冻结在左边。 | null |
fitColumns | boolean | True | false |
striped | boolean | True 就把行条纹化。(即奇偶行使用不同背景色) | false |
method | string | 请求远程数据的 | post |
nowrap | boolean | True | true |
idField | string | 标识字段。 | null |
url | string | 从远程站点请求数据的 | null |
loadMsg | string | 当从远程站点加载数据时,显示的提示信息。 | Processing, please wait … |
pagination | boolean | True | false |
rownumbers | boolean | True | false |
singleSelect | boolean | True | false |
pageNumber | number | 当设置了 | 1 |
pageSize | number | 当设置了 | 10 |
pageList | array | 当设置了 | [10,20,30,40,50] |
queryParams | object | 当请求远程数据时,发送的额外参数。 | {} |
sortName | string | 定义可以排序的列。 | null |
sortOrder | string | 定义列的排序顺序,只能用 | asc |
remoteSort | boolean | 定义是否从服务器给数据排序。 | true |
showFooter | boolean | 定义是否显示一行页脚。 | false |
rowStyler | function | 返回例如 | |
loadFilter | function | 返回过滤的数据去显示。这个函数需要一个参数 你可以把原始数据变成标准数据格式,此函数必须返回标准数据对象,含有 | |
editors | object | 定义编辑行时的 | 预定义的 |
view | object | 定义 | 默认的 |
6.1.4.
DataGrid
代码示例:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
名称 | 类型 | 说明 | 默认值 |
title | string | 列的标题文字。 | undefined |
field | string | 列的字段名。 | undefined |
width | number | 列的宽度。 | undefined |
rowspan | number | 指一个单元格占据多少行。 | undefined |
colspan | number | 指一个单元格占据多少列。 | undefined |
align | string | 指如何对齐此列的数据,可以用 | undefined |
sortable | boolean | True | undefined |
resizable | boolean | True | undefined |
hidden | boolean | True | undefined |
checkbox | boolean | True | undefined |
formatter | function | 单元格的格式化函数,需要三个参数: | undefined |
styler | function | 单元格的样式函数,返回样式字符串来自定义此单元格的样式,例如 | undefined |
sorter | function | 自定义字段的排序函数,需要两个参数: | undefined |
editor | string,object | 指编辑类型。当是 | undefined |
6.1.5.
用
每个编辑器有下列行为:
名称 | 参数 | 说明 |
init | container, options | 初始化编辑器并且返回目标对象。 |
destroy | target | 如果必要就销毁编辑器。 |
getValue | target | 从编辑器的文本返回值。 |
setValue | target , value | 给编辑器设置值。 |
resize | target , width | 如果必要就调整编辑器的尺寸。 |
例如,文本编辑器(text editor)像下面这样定义:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
6.1.6.
用
view
名称 | 参数 | 说明 |
render | target, container, frozen | 当数据加载时调用。 |
renderFooter | target, container, frozen | 这是呈现行脚选项的函数。 |
renderRow | target, fields, frozen, rowIndex, rowData | 这是选项的函数,将会被 |
refreshRow | target, rowIndex | 定义如何刷新指定的行。 |
onBeforeRender | target, rows | 视图被呈现前触发。 |
onAfterRender | target | 视图被呈现后触发。 |
其事件扩展自
名称 | 参数 | 说明 |
onLoadSuccess | data | 当数据加载成功时触发。 |
onLoadError | none | 加载远程数据发生某些错误时触发。 |
onBeforeLoad | param | 发送加载数据的请求前触发,如果返回 |
onClickRow | rowIndex, rowData | 当用户点击一行时触发,参数包括: |
onDblClickRow | rowIndex, rowData | 当用户双击一行时触发,参数包括: |
onClickCell | rowIndex, field, value | 当用户单击一个单元格时触发。 |
onDblClickCell | rowIndex, field, value | 当用户双击一个单元格时触发。 |
onSortColumn | sort, order | 当用户对一列进行排序时触发,参数包括: |
onResizeColumn | field, width | 当用户调整列的尺寸时触发。 |
onSelect | rowIndex, rowData | 当用户选中一行时触发,参数包括: |
onUnselect | rowIndex, rowData | 当用户取消选择一行时触发,参数包括: |
onSelectAll | rows | 当用户选中全部行时触发。 |
onUnselectAll | rows | 当用户取消选中全部行时触发。 |
onBeforeEdit | rowIndex, rowData | 当用户开始编辑一行时触发,参数包括: |
onAfterEdit | rowIndex, rowData, changes | 当用户完成编辑一行时触发,参数包括: |
onCancelEdit | rowIndex, rowData | 当用户取消编辑一行时触发,参数包括: |
onHeaderContextMenu | e, field | 当 |
onRowContextMenu | e, rowIndex, rowData | 当右键点击行时触发。 |
名称 | 参数 | 说明 |
options | none | 返回 |
getPager | none | 返回 |
getPanel | none | 返回 |
getColumnFields | frozen | 返回列的字段,如果 |
getColumnOption | field | 返回指定列的选项。 |
resize | param | 调整尺寸和布局。 |
load | param | 加载并显示第一页的行,如果指定 |
reload | param | 重新加载行,就像 |
reloadFooter | footer | 重新加载脚部的行。 |
loading | none | 显示正在加载状态。 |
loaded | none | 隐藏正在加载状态。 |
fitColumns | none | 使列自动展开/折叠以适应 |
fixColumnSize | none | 固定列的尺寸。 |
fixRowHeight | index | 固定指定行的高度。 |
loadData | data | 加载本地数据,旧的行会被移除。 |
getData | none | 返回加载的数据。 |
getRows | none | 返回当前页的行。 |
getFooterRows | none | 返回脚部的行。 |
getRowIndex | row | 返回指定行的索引,row |
getSelected | none | 返回第一个选中的行或者 |
getSelections | none | 返回所有选中的行,当没有选中的记录时,将返回空数组。 |
clearSelections | none | 清除所有的选择。 |
selectAll | none | 选中当前页所有的行。 |
unselectAll | none | 取消选中当前页所有的行。 |
selectRow | index | 选中一行,行索引从 |
selectRecord | idValue | 通过 |
unselectRow | index | 取消选中一行。 |
beginEdit | index | 开始对一行进行编辑。 |
endEdit | index | 结束对一行进行编辑。 |
cancelEdit | index | 取消对一行进行编辑。 |
getEditors | index | 获取指定行的编辑器们。每个编辑器有下列特性: |
getEditor | options | 获取指定的编辑器, |
refreshRow | index | 刷新一行。 |
validateRow | index | 验证指定的行,有效时返回 |
updateRow | param | 更新指定的行, |
appendRow | row | 追加一个新行。 |
insertRow | param | 插入一个新行, |
deleteRow | index | 删除一行。 |
getChanges | type | 获取最后一次提交以来更改的行,type 当 |
acceptChanges | none | 提交自从被加载以来或最后一次调用acceptChanges以来所有更改的数据。 |
rejectChanges | none | 回滚自从创建以来或最后一次调用acceptChanges以来所有更改的数据。 |
mergeCells | options | 把一些单元格合并为一个单元格,options |
showColumn | field | 显示指定的列。 |
hideColumn | field | 隐藏指定的列。 |
6.2. PropertyGrid 属性表格
扩展自
datagrid
1.
1.
2.
3.
4.
其特性扩展自
名称 | 类型 | 说明 | 默认值 |
showGroup | boolean | 定义是否显示特性组。 | false |
groupField | string | 定义组的字段名。 | group |
groupFormatter | function | 定义如何格式化组的值。 | |