From 4ed1b6e09a2da306a2fc54e646cb0eca3565081a Mon Sep 17 00:00:00 2001 From: igrowp <164761965@qq.com> Date: Wed, 11 Jan 2023 10:48:38 +0800 Subject: [PATCH] =?UTF-8?q?BCE-FE-1181=20fix:=20=E5=BD=93=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E9=85=8D=E7=BD=AEdescription=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=85=AC=E5=BC=8F=E7=BC=96=E8=BE=91=E5=99=A8tag=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I2cae42aa00ba5c5b9c7d0b66934826d409400481 --- packages/amis-editor/src/renderer/textarea-formula/utils.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/amis-editor/src/renderer/textarea-formula/utils.ts b/packages/amis-editor/src/renderer/textarea-formula/utils.ts index 2c1ee0fc1..4eba1319b 100644 --- a/packages/amis-editor/src/renderer/textarea-formula/utils.ts +++ b/packages/amis-editor/src/renderer/textarea-formula/utils.ts @@ -1,4 +1,4 @@ -import {isExpression, resolveVariableAndFilter} from 'amis-core'; +import {isExpression, mapTree, resolveVariableAndFilter} from 'amis-core'; /** * 从amis数据域中取变量数据 @@ -11,6 +11,10 @@ export async function resolveVariablesFromScope(node: any, manager: any) { const dataPropsAsOptions = manager?.dataSchema?.getDataPropsAsOptions(); if (dataPropsAsOptions) { + mapTree(dataPropsAsOptions, item => { + item.tag = item.type; + return item; + }); return dataPropsAsOptions .map((item: any) => ({ selectMode: 'tree',