From b528a9aabb31332c74f13bed6b798d7bc9ad3f57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B7=E4=BA=AE=E8=BE=89?= Date: Tue, 12 Dec 2023 17:14:37 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BD=9C=E7=94=A8=E5=9F=9F=E4=B8=AD?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E4=B8=BB=E8=A1=A8=E5=8F=98=E9=87=8FformData/?= =?UTF-8?q?record=E6=97=B6=E4=BC=9A=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/steedos/steedos-platform/issues/5935 --- packages/@steedos-widgets/amis-lib/src/lib/input_table.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/@steedos-widgets/amis-lib/src/lib/input_table.js b/packages/@steedos-widgets/amis-lib/src/lib/input_table.js index 18ca12503..0a86e96fa 100644 --- a/packages/@steedos-widgets/amis-lib/src/lib/input_table.js +++ b/packages/@steedos-widgets/amis-lib/src/lib/input_table.js @@ -2,7 +2,7 @@ * @Author: 殷亮辉 yinlianghui@hotoa.com * @Date: 2023-11-15 09:50:22 * @LastEditors: 殷亮辉 yinlianghui@hotoa.com - * @LastEditTime: 2023-12-12 17:08:33 + * @LastEditTime: 2023-12-12 17:13:37 */ import { getFormBody } from './converter/amis/form'; @@ -497,7 +497,7 @@ async function getButtonEdit(props, showAsInlineEditMode) { // 这里必须加data数据映射,否则翻页功能中取changedItems值时会乱,比如翻页编辑后会把上一页中没改过的字段值带过去 // 额外把华炎魔方主表记录ObjectForm中的字段值从record变量中映射到子表form中,因为子表lookup字段filtersFunction中可能依赖了主表记录中的字段值,比如“工作流规则”对象“时间触发器”字段中的“日期字段”字段 // 额外把global、uiSchema也映射过去,有可能要用,后续需要用到其他变更可以这里加映射 - "&": "${record}", + "&": "${record || {}}", "global": "${global}", "uiSchema": "${uiSchema}", "grid": "${grid}", @@ -551,7 +551,7 @@ async function getButtonView(props) { // 这里必须加data数据映射,否则翻页功能中取changedItems值时会乱,比如翻页编辑后会把上一页中没改过的字段值带过去 // 额外把华炎魔方主表记录ObjectForm中的字段值从formData变量中映射到子表form中,因为子表lookup字段filtersFunction中可能依赖了主表记录中的字段值,比如“工作流规则”对象“时间触发器”字段中的“日期字段”字段 // global、uiSchema等常用变量本来就在formData变量已经存在了,无需另外映射 - "&": "${formData}", + "&": "${formData || {}}", "grid": "${grid}", "index": "${index}", "changedItems": "${changedItems}",