@happy-table/vue3
Version:
A high-performance Vue 3 table component for B2B systems with TypeScript support
20 lines (19 loc) • 509 B
TypeScript
import { TableColumn, TableRow } from '../types';
export interface TemplateContext {
value: unknown;
row: TableRow;
column: TableColumn;
index: number;
}
/**
* 安全的模板变量替换器
* 只支持基本的变量插值,不执行任意代码
*/
export declare function renderTemplateSafe(template: string, context: TemplateContext): string;
/**
* 验证模板是否安全
*/
export declare function validateTemplate(template: string): {
valid: boolean;
errors: string[];
};