From 6f450e55cb0e2040728831cfc57b3d0936b93a9b Mon Sep 17 00:00:00 2001 From: zhangtao07 Date: Wed, 8 May 2024 10:52:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E7=A7=BB=E5=8A=A8=E7=AB=AF=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis/src/renderers/Cards.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/amis/src/renderers/Cards.tsx b/packages/amis/src/renderers/Cards.tsx index 917fa9a7a..c3ae2c1d8 100644 --- a/packages/amis/src/renderers/Cards.tsx +++ b/packages/amis/src/renderers/Cards.tsx @@ -962,7 +962,8 @@ export default class Cards extends React.Component { env, id, wrapperCustomStyle, - themeCss + themeCss, + mobileUI } = this.props; this.renderedToolbars = []; // 用来记录哪些 toolbar 已经渲染了,已经渲染了就不重复渲染了。 @@ -1003,8 +1004,8 @@ export default class Cards extends React.Component { if (style?.gutterY >= 0) { itemStyles.marginBottom = style?.gutterY + 'px'; } - // 修正grid多列计算错误 - if (columnsCount && !masonryLayout) { + // 修正grid多列计算错误,另外移动端目前只显示一列 + if (columnsCount && !masonryLayout && !mobileUI) { itemStyles.flex = `0 0 ${100 / columnsCount}%`; itemStyles.maxWidth = `${100 / columnsCount}%`; }