From a66b5a0805a322643bd044f09e39fb31dc59d95f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B6=82=E4=BD=B3=E4=BF=8A?= Date: Wed, 24 Jan 2024 15:58:34 +0800 Subject: [PATCH] =?UTF-8?q?steedos-input-table=E5=A2=9E=E5=8A=A0mode?= =?UTF-8?q?=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/steedos/steedos-platform/issues/6345 --- .../amis-lib/src/lib/input_table.js | 26 +++++++++---------- .../amis-object/src/amis/AmisInputTable.tsx | 2 +- 2 files changed, 14 insertions(+), 14 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 a05a4caeb..073e6f4f8 100644 --- a/packages/@steedos-widgets/amis-lib/src/lib/input_table.js +++ b/packages/@steedos-widgets/amis-lib/src/lib/input_table.js @@ -1341,19 +1341,19 @@ export const getAmisInputTableSchema = async (props) => { }); } let schema = { - "type": "service", - "body": [ - { - "type": "control", - "body": schemaBody, - "label": props.label, - "labelClassName": props.label ? props.labelClassName : "none", - "labelRemark": props.labelRemark, - "labelAlign": props.labelAlign - } - ], - "className": props.className, - "id": serviceId + "type": "control", + "body": { + "type": "service", + "body": schemaBody, + "id": serviceId + }, + "label": props.label, + "labelClassName": props.label ? props.labelClassName : "none", + "labelRemark": props.labelRemark, + "labelAlign": props.labelAlign, + //控制control的mode属性,https://aisuda.bce.baidu.com/amis/zh-CN/components/form/formitem#表单项展示 + "mode": props.mode || null, + "className": props.className }; // console.log("===schema===", schema); return schema; diff --git a/packages/@steedos-widgets/amis-object/src/amis/AmisInputTable.tsx b/packages/@steedos-widgets/amis-object/src/amis/AmisInputTable.tsx index 2a2ad776c..378835410 100644 --- a/packages/@steedos-widgets/amis-object/src/amis/AmisInputTable.tsx +++ b/packages/@steedos-widgets/amis-object/src/amis/AmisInputTable.tsx @@ -10,7 +10,7 @@ export const AmisInputTable = async (props) => { // console.log("AmisInputTable props", props); // columns内存在inlineEditMode属性, 控制字段级的內联模式 const { $schema, fields, name, id, data, columns, amis, className, tableClassName, headerToolbar, footerToolbar, - inlineEditMode, strictMode, dialog, primaryKey, showOperation, fieldPrefix, autoGeneratePrimaryKeyValue } = props; + inlineEditMode, strictMode, dialog, primaryKey, showOperation, fieldPrefix, autoGeneratePrimaryKeyValue, mode } = props; const amisSchema = await getAmisInputTableSchema(props); // console.log("=AmisInputTable==amisSchema====", amisSchema); return amisSchema;