UNPKG

672 BJavaScriptView Raw
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 */
14const getFocusRow = function() {
15 if (this.focusIndex() != -1)
16 return this.getRow(this.focusIndex())
17 else
18 return null
19}
20
21/**
22 * 获取焦点行索引
23 * @memberof DataTable
24 * @return {number} 焦点行索引
25 * @example
26 * datatable.getFocusIndex()
27 */
28const getFocusIndex = function() {
29 return this.focusIndex()
30}
31
32export const getFocusFunObj = {
33 getFocusRow: getFocusRow,
34 getFocusIndex: getFocusIndex
35}