From 6635016f0bdc3d8e8d6535f9e41f3cf46694df08 Mon Sep 17 00:00:00 2001 From: schumi Date: Fri, 17 May 2019 11:56:55 +0800 Subject: [PATCH] fix(tpl-lodash): template typo --- src/utils/tpl-lodash.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/tpl-lodash.ts b/src/utils/tpl-lodash.ts index 31e841f1..e784ea36 100644 --- a/src/utils/tpl-lodash.ts +++ b/src/utils/tpl-lodash.ts @@ -1,5 +1,5 @@ import { reigsterTplEnginer, filter } from "./tpl"; -import tempalte = require('lodash/template'); +import template = require('lodash/template'); import { filters } from "./tpl-builtin"; import * as React from 'react'; import * as moment from 'moment'; @@ -31,7 +31,7 @@ const imports = { delete imports.default; // default 是个关键字,不能 imports 到 lodash 里面去。 function lodashCompile(str: string, data: object) { try { - const fn = tempalte(str, { + const fn = template(str, { imports: imports, variable: 'data' });