From 885ec495d0a5965a46f7b786b4e74c695f25c99b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BB=96=E5=A4=A7=E9=9B=AA?= <2291335922@qq.com> Date: Thu, 11 Jan 2024 18:03:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=B0=E8=B4=A6=E7=95=8C=E9=9D=A2=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E7=BC=96=E8=BE=91=E6=8C=89=E9=92=AE=EF=BC=8Cautofill?= =?UTF-8?q?=E5=A1=AB=E5=85=85=E5=87=BA=E7=9A=84=E8=A1=A8=E5=8D=95=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=80=BC=E7=BC=BA=E5=A4=B1=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/steedos/steedos-platform/issues/6200 --- .../amis-lib/src/lib/converter/amis/fields/lookup.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/@steedos-widgets/amis-lib/src/lib/converter/amis/fields/lookup.js b/packages/@steedos-widgets/amis-lib/src/lib/converter/amis/fields/lookup.js index 385be3f32..259da614d 100644 --- a/packages/@steedos-widgets/amis-lib/src/lib/converter/amis/fields/lookup.js +++ b/packages/@steedos-widgets/amis-lib/src/lib/converter/amis/fields/lookup.js @@ -443,9 +443,11 @@ export async function lookupToAmisPicker(field, readonly, ctx){ */ if(enable_tree){ const rows = _.map(payload.data.rows, (item)=>{ - delete item.children; - delete item.parent; - return item; + if (!item.children) { + return { ...item, children: [] }; + } else { + return item; + } }) payload.data.rows = rows; }