UNPKG

vxe-table-demonic

Version:

一个基于 vue 的 PC 端表单/表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、JSON 配置式...

58 lines (49 loc) 2.43 kB
import { VxeTableConstructor, VxeTableDefines, VxeTablePropTypes, VxeTablePrivateMethods } from '../table' import { VxeGridConstructor, VxeGridPrivateMethods } from '../grid' export namespace VxeGlobalInterceptorHandles { export type HookType = 'created' | 'mounted' | 'activated' | 'beforeUnmount' | 'unmounted' export type EventType = 'event.clearActived' | 'event.clearFilter' | 'event.clearAreas' | 'event.showMenu' | 'event.keydown' | 'event.export' | 'event.import' export type Type = HookType | EventType export type InterceptorCallback = (params: any) => any interface InterceptorParams { $grid?: VxeGridConstructor<any> & VxeGridPrivateMethods<any> $table: VxeTableConstructor<any> & VxeTablePrivateMethods<any> $event: Event } export interface InterceptorKeydownParams extends InterceptorParams { } export interface InterceptorClearFilterParams extends InterceptorParams { } export interface InterceptorClearActivedParams extends InterceptorParams { } export interface InterceptorClearAreasParams extends InterceptorParams { } export interface InterceptorExportParams extends InterceptorParams { options: VxeTablePropTypes.ExportHandleOptions columns: VxeTableDefines.ColumnInfo<any>[] colgroups: VxeTableDefines.ColumnInfo<any>[][] datas: any[] } export interface InterceptorImportParams extends InterceptorParams { file: File options: VxeTablePropTypes.ExportHandleOptions columns: VxeTableDefines.ColumnInfo<any>[] datas: any[] } export interface InterceptorShowMenuParams extends InterceptorParams { type: 'header' | 'body' | 'footer' options: VxeTableDefines.MenuFirstOption[][] columns: VxeTableDefines.ColumnInfo<any>[] row?: any rowIndex?: number column?: VxeTableDefines.ColumnInfo<any> columnIndex?: number } } /** * 全局事件拦截器 */ export interface VxeGlobalInterceptor { mixin(options: { [type: string]: VxeGlobalInterceptorHandles.InterceptorCallback }): VxeGlobalInterceptor get(type: VxeGlobalInterceptorHandles.Type): VxeGlobalInterceptorHandles.InterceptorCallback[] add(type: VxeGlobalInterceptorHandles.Type, callback: VxeGlobalInterceptorHandles.InterceptorCallback): VxeGlobalInterceptor delete(type: VxeGlobalInterceptorHandles.Type, callback?: VxeGlobalInterceptorHandles.InterceptorCallback): void }