mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-19 22:58:15 +00:00
fix: 修复低代码组件属性不处理 JSE 结构的问题
This commit is contained in:
parent
651e118e3d
commit
1426801783
@ -1,4 +1,4 @@
|
|||||||
import Env from '../env';
|
import env from '../env';
|
||||||
import { Node } from '@ali/lowcode-designer';
|
import { Node } from '@ali/lowcode-designer';
|
||||||
import { isJSSlot, isI18nData, isJSExpression } from '@ali/lowcode-types';
|
import { isJSSlot, isI18nData, isJSExpression } from '@ali/lowcode-types';
|
||||||
import { isPlainObject } from '@ali/lowcode-utils';
|
import { isPlainObject } from '@ali/lowcode-utils';
|
||||||
@ -23,8 +23,8 @@ function deepValueParser(obj: any, info: {
|
|||||||
path = '',
|
path = '',
|
||||||
node,
|
node,
|
||||||
} = info;
|
} = info;
|
||||||
// 如果不是 vc 体系,不做这个兼容处理
|
// 如果是 vc 体系 / 低代码组件,才做这个兼容处理
|
||||||
if (!node.componentMeta.prototype) {
|
if (!node.componentMeta.prototype && node.componentMeta.getMetadata().devMode !== 'lowcode') {
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
if (isJSExpression(obj)) {
|
if (isJSExpression(obj)) {
|
||||||
@ -53,7 +53,7 @@ function deepValueParser(obj: any, info: {
|
|||||||
if (isPlainObject(obj)) {
|
if (isPlainObject(obj)) {
|
||||||
if (isI18nData(obj)) {
|
if (isI18nData(obj)) {
|
||||||
// FIXME! use editor.get
|
// FIXME! use editor.get
|
||||||
let locale = Env.getLocale();
|
let locale = env.getLocale();
|
||||||
if (obj.key && i18nUtil.get(obj.key, locale)) {
|
if (obj.key && i18nUtil.get(obj.key, locale)) {
|
||||||
return i18nUtil.get(obj.key, locale, {
|
return i18nUtil.get(obj.key, locale, {
|
||||||
node,
|
node,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user