change to jsdoc

This commit is contained in:
2024-01-30 17:28:18 +08:00
parent 0b897cae8a
commit a38af7577b
11 changed files with 1347 additions and 43 deletions

View File

@@ -2,11 +2,11 @@ import { GridColumnDefinition } from "./column"
/**
* 单元格点击回调函数
*
* @callback cellClickedCallback
* @param {number} index - 点击的行索引
* @param {number} colIndex - 点击的列索引
* @returns {boolean} 返回 `false` 则取消事件冒泡
*/
declare function cellClickedCallback(index: number, colIndex: number): boolean;
/** 列数据接口 */
interface GridItem {
@@ -159,10 +159,9 @@ export class Grid {
willSelect?: (index: number, colIndex: number) => boolean;
/**
* 单元格单击时触发colIndex 为 -1 则表示点击的是行的空白处,返回 false 则取消事件冒泡
* @property {cellClickedCallback}
* @eventProperty
*/
cellClicked?: (index: number, colIndex: number) => boolean;
cellClicked?: typeof cellClickedCallback;
/**
* 选中行发生变化时触发的事件