UNPKG

@happy-table/vue3

Version:

A high-performance Vue 3 table component for B2B systems with TypeScript support

16 lines (15 loc) 873 B
import { Component, VNode, RendererNode, RendererElement } from 'vue'; import { CellContext } from '../types/slots'; export declare function registerCellRenderer(name: string, component: Component): void; export declare function registerCellRenderers(renderers: Record<string, Component>): void; export declare function getCellRenderer(name: string): Component | undefined; export declare function renderCell(rendererName: string, context: CellContext): VNode<RendererNode, RendererElement, { [key: string]: any; }>; export declare function registerTemplateRenderer(name: string, template: (context: CellContext) => string): void; interface RendererConfig { type: 'badge' | 'avatar' | 'currency' | 'date' | 'link' | 'image'; options?: Record<string, any>; } export declare function registerConfigRenderer(name: string, config: RendererConfig): void; export {};