From 83b44e939e64442ddeee95855456e7322a0a3ec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B7=E4=BA=AE=E8=BE=89?= Date: Tue, 5 Dec 2023 18:57:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E9=83=A8=E5=88=86=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=EF=BC=8C=E8=AF=A5bug=E5=85=88=E6=94=BE=E6=94=BE?= =?UTF-8?q?=EF=BC=8Ccrud=E5=9C=A8=E5=BD=93=E5=89=8Damis=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E6=B8=B2=E6=9F=93=E5=8A=A8=E6=80=81className=E6=9C=89=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E5=90=8E=E7=BB=AD=E7=AD=89=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E9=AB=98=E7=89=88=E6=9C=ACamis=20sdk=E5=86=8D=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/steedos/steedos-platform/issues/5925 --- .../amis-lib/src/lib/converter/amis/index.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/@steedos-widgets/amis-lib/src/lib/converter/amis/index.js b/packages/@steedos-widgets/amis-lib/src/lib/converter/amis/index.js index dc218e611..a0be72941 100644 --- a/packages/@steedos-widgets/amis-lib/src/lib/converter/amis/index.js +++ b/packages/@steedos-widgets/amis-lib/src/lib/converter/amis/index.js @@ -287,11 +287,13 @@ export async function getObjectCRUD(objectSchema, fields, options){ api: await getTableApi(objectSchema, fields, options), hiddenOn: options.tableHiddenOn, autoFillHeight, - className: { - [`flex-auto ${crudClassName || ""}`]: "true", - "is-steedos-crud-data-empty": "${!items || COUNT(items) == 0}" - }, - bodyClassName: "bg-white", + className: `flex-auto ${crudClassName || ""}`, + // 这里不可以用动态className,因为它会把样式类加到.antd-Crud和.antd-Table.antd-Crud-body这两层div中,而子表列表中crudClassName中有hidden样式类会造成所有子表都不显示的bug + // className: { + // [`flex-auto ${crudClassName || ""}`]: "true", + // "is-steedos-crud-data-empty": "${!items || COUNT(items) == 0}" + // }, + bodyClassName: "bg-white",//上面className写成动态的class变量对象的话,bodyClassName不会生效,会被上面的className值覆盖 crudClassName: crudClassName, quickSaveApi: { url: `\${context.rootUrl}/graphql`,