Merge branch fix/loop-jsFunction into develop

Title: fix: 修复 JSFunction 表达式使用时,无法去掉 this 使用 scope 变量 

Link: https://code.aone.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/codereview/7954110
This commit is contained in:
lihao.ylh 2022-03-30 17:10:11 +08:00
commit 39c24add37

View File

@ -413,7 +413,7 @@ export function parseData(schema: any, self: any): any {
return schema; return schema;
} }
/* 全匹配{{开头,}}结尾的变量表达式或者对象类型JSExpression支持省略this */ /* 全匹配{{开头,}}结尾的变量表达式或者对象类型JSExpression/JSFunction支持省略this */
export function parseExpression(str: any, self: any) { export function parseExpression(str: any, self: any) {
try { try {
const contextArr = ['"use strict";', 'var __self = arguments[0];']; const contextArr = ['"use strict";', 'var __self = arguments[0];'];