vhb-table
Version:
一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、贼灵活的配置项、扩展接口等...
47 lines (39 loc) • 1.29 kB
TypeScript
import { ColumnInfo } from '../column'
import { TableExportConfig } from '../export'
import { MenuFirstOption } from '../menu'
import { GridRenderParams } from './renderer'
declare function interceptorFunc(params: any, event: any): any;
/**
* 全局事件拦截器
*/
export class VhbGlobalInterceptor {
mixin(map: { [type: string]: typeof interceptorFunc }): VhbGlobalInterceptor;
get(type: string): typeof interceptorFunc;
add(type: string, callback: typeof interceptorFunc): VhbGlobalInterceptor;
delete(type: string): VhbGlobalInterceptor;
}
export interface InterceptorParams extends GridRenderParams {
$event: any;
}
export interface InterceptorKeydownParams extends InterceptorParams { }
export interface InterceptorExportParams extends InterceptorParams {
options: TableExportConfig;
columns: ColumnInfo[];
colgroups: ColumnInfo[][];
datas: any[];
}
export interface InterceptorImportParams extends InterceptorParams {
file: File;
options: TableExportConfig;
columns: ColumnInfo[];
datas: any[];
}
export interface InterceptorMenuParams extends InterceptorParams {
type: 'header' | 'body' | 'footer';
options: MenuFirstOption[][];
columns: ColumnInfo[];
row?: any;
rowIndex?: number;
column?: ColumnInfo;
columnIndex?: number;
}