From 14268017836cb2db88d4867f65f10c79770f374a Mon Sep 17 00:00:00 2001 From: "lihao.ylh" Date: Tue, 29 Mar 2022 10:01:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BD=8E=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=BB=84=E4=BB=B6=E5=B1=9E=E6=80=A7=E4=B8=8D=E5=A4=84?= =?UTF-8?q?=E7=90=86=20JSE=20=E7=BB=93=E6=9E=84=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vision-polyfill/src/props-reducers/value-parser.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/vision-polyfill/src/props-reducers/value-parser.ts b/packages/vision-polyfill/src/props-reducers/value-parser.ts index d748f30bb..5cdb02a31 100644 --- a/packages/vision-polyfill/src/props-reducers/value-parser.ts +++ b/packages/vision-polyfill/src/props-reducers/value-parser.ts @@ -1,4 +1,4 @@ -import Env from '../env'; +import env from '../env'; import { Node } from '@ali/lowcode-designer'; import { isJSSlot, isI18nData, isJSExpression } from '@ali/lowcode-types'; import { isPlainObject } from '@ali/lowcode-utils'; @@ -23,8 +23,8 @@ function deepValueParser(obj: any, info: { path = '', node, } = info; - // 如果不是 vc 体系,不做这个兼容处理 - if (!node.componentMeta.prototype) { + // 如果是 vc 体系 / 低代码组件,才做这个兼容处理 + if (!node.componentMeta.prototype && node.componentMeta.getMetadata().devMode !== 'lowcode') { return obj; } if (isJSExpression(obj)) { @@ -53,7 +53,7 @@ function deepValueParser(obj: any, info: { if (isPlainObject(obj)) { if (isI18nData(obj)) { // FIXME! use editor.get - let locale = Env.getLocale(); + let locale = env.getLocale(); if (obj.key && i18nUtil.get(obj.key, locale)) { return i18nUtil.get(obj.key, locale, { node,