@pkt/utils
Version:
35 lines (34 loc) • 645 B
TypeScript
import type { SafeAny } from '@pkt/utils/types';
/**
* 复选框(全选/多选)
* @param id 唯一标识(默认ID)
*/
export declare function checkBox(id?: string): CheckResult;
export interface CheckResult {
isSelectAll: boolean;
/**
* 选中数量
*/
selectCount: number;
/**
* 选中
*/
select: {
value: SafeAny;
change(data: SafeAny): void;
};
/**
* 全选
*/
selectAll: {
change(data: SafeAny): void;
};
/**
* 获取已选中的ID数据
*/
getIDS(): Array<SafeAny>;
/**
* 清空所有选择
*/
clear(): void;
}