vtils

Home > utils > StringTemplate > render

StringTemplate.render() method

渲染字符串模板。语法:

Signature:

static render(template: string, data: Record<string, any>, options?: StringTemplateRenderOptions): string;

Parameters

Parameter Type Description
template string 要渲染的模板
data Record<string, any> 渲染数据
options StringTemplateRenderOptions (Optional) 渲染选项

Returns:

string

返回渲染后字符串