context.d.ts 1.0 KB

123456789101112131415161718192021222324
  1. import type { ComputedRef } from 'vue';
  2. import type { ColumnType } from './interface';
  3. export type ContextSlots = {
  4. emptyText?: (...args: any[]) => any;
  5. expandIcon?: (...args: any[]) => any;
  6. title?: (...args: any[]) => any;
  7. footer?: (...args: any[]) => any;
  8. summary?: (...args: any[]) => any;
  9. bodyCell?: (...args: any[]) => any;
  10. expandColumnTitle?: (...args: any[]) => any;
  11. headerCell?: (...args: any[]) => any;
  12. customFilterIcon?: (...args: any[]) => any;
  13. customFilterDropdown?: (...args: any[]) => any;
  14. [key: string]: ((...args: any[]) => any) | undefined;
  15. };
  16. type SlotsContextProps = ComputedRef<ContextSlots>;
  17. export declare const useProvideSlots: (props: SlotsContextProps) => void;
  18. export declare const useInjectSlots: () => SlotsContextProps;
  19. type ContextProps = {
  20. onResizeColumn: (w: number, column: ColumnType<any>) => void;
  21. };
  22. export declare const useProvideTableContext: (props: ContextProps) => void;
  23. export declare const useInjectTableContext: () => ContextProps;
  24. export {};