1 | /**
|
2 | * Module : kero dataTable getFocus
|
3 | * Author : liuyk(liuyk@yonyou.com)
|
4 | * Date : 2016-08-08 09:59:01
|
5 | */
|
6 |
|
7 | /**
|
8 | * 获取焦点行
|
9 | * @memberof DataTable
|
10 | * @return {u.Row} 焦点行
|
11 | * @example
|
12 | * datatable.getFocusRow()
|
13 | */
|
14 | var getFocusRow = function getFocusRow() {
|
15 | if (this.focusIndex() != -1) return this.getRow(this.focusIndex());else return null;
|
16 | };
|
17 |
|
18 | /**
|
19 | * 获取焦点行索引
|
20 | * @memberof DataTable
|
21 | * @return {number} 焦点行索引
|
22 | * @example
|
23 | * datatable.getFocusIndex()
|
24 | */
|
25 | var getFocusIndex = function getFocusIndex() {
|
26 | return this.focusIndex();
|
27 | };
|
28 |
|
29 | export var getFocusFunObj = {
|
30 | getFocusRow: getFocusRow,
|
31 | getFocusIndex: getFocusIndex
|
32 | }; |
\ | No newline at end of file |