From d21466d250a4a460e8f239ced5cc810dc975145d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B7=E4=BA=AE=E8=BE=89?= Date: Fri, 26 Apr 2024 16:47:30 +0800 Subject: [PATCH] =?UTF-8?q?[Bug]:=20=E5=BA=94=E7=94=A8=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=BE=AE=E9=A1=B5=E9=9D=A2=E9=87=8C=E9=9D=A2?= =?UTF-8?q?=E6=94=BE=E5=88=97=E8=A1=A8=E8=A7=86=E5=9B=BE=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E8=AF=A5=E7=BB=84=E4=BB=B6=E9=87=8D=E5=86=99crud?= =?UTF-8?q?=E7=9A=84autoFillHeight=E4=B8=BAfalse=E4=B8=8D=E7=94=9F?= =?UTF-8?q?=E6=95=88=E9=80=A0=E6=88=90=E9=AB=98=E5=BA=A6=E4=BC=9A=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E8=B7=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/steedos/steedos-platform/issues/6788 --- .../@steedos-widgets/amis-lib/src/lib/objects.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/@steedos-widgets/amis-lib/src/lib/objects.js b/packages/@steedos-widgets/amis-lib/src/lib/objects.js index d0940e74d..928cb8214 100644 --- a/packages/@steedos-widgets/amis-lib/src/lib/objects.js +++ b/packages/@steedos-widgets/amis-lib/src/lib/objects.js @@ -2,7 +2,7 @@ * @Author: baozhoutao@steedos.com * @Date: 2022-07-05 15:55:39 * @LastEditors: 殷亮辉 yinlianghui@hotoa.com - * @LastEditTime: 2024-04-25 19:01:52 + * @LastEditTime: 2024-04-26 16:46:44 * @Description: */ import { fetchAPI, getUserId } from "./steedos.client"; @@ -312,10 +312,6 @@ export async function getListSchema( if (localListViewProps.perPage) { listSchema.perPage = localListViewProps.perPage; } - if (window.innerWidth > 768) { - // 列表视图组件PC端高度自动计算实现满屏效果,手机端不需要满屏效果,所以不用autofillheight - listSchema.autoFillHeight = true; - } defaults.listSchema = defaultsDeep({}, listSchema, defaults.listSchema || {}); } } @@ -323,6 +319,13 @@ export async function getListSchema( console.error("本地存储中crud参数解析异常:", ex); } + if (window.innerWidth > 768) { + // 列表视图组件PC端高度自动计算实现满屏效果,手机端不需要满屏效果,所以不用autofillheight,且允许重写微页面中重新组件autoFillHeight属性 + defaults.listSchema = defaultsDeep({}, defaults.listSchema || {}, { + autoFillHeight: true + }); + } + ctx.defaults = defaults; if (listViewName == "recent") {