Skip to content

Commit

Permalink
[Bug]: 应用程序类型微页面里面放列表视图组件,该组件重写crud的autoFillHeight为false不生效造成高度会自动跳
Browse files Browse the repository at this point in the history
  • Loading branch information
yinlianghui committed Apr 26, 2024
1 parent afb5860 commit d21466d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/@steedos-widgets/amis-lib/src/lib/objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: [email protected]
* @Date: 2022-07-05 15:55:39
* @LastEditors: 殷亮辉 [email protected]
* @LastEditTime: 2024-04-25 19:01:52
* @LastEditTime: 2024-04-26 16:46:44
* @Description:
*/
import { fetchAPI, getUserId } from "./steedos.client";
Expand Down Expand Up @@ -312,17 +312,20 @@ 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 || {});
}
}
catch (ex) {
console.error("本地存储中crud参数解析异常:", ex);
}

if (window.innerWidth > 768) {
// 列表视图组件PC端高度自动计算实现满屏效果,手机端不需要满屏效果,所以不用autofillheight,且允许重写微页面中重新组件autoFillHeight属性
defaults.listSchema = defaultsDeep({}, defaults.listSchema || {}, {
autoFillHeight: true
});
}

ctx.defaults = defaults;

if (listViewName == "recent") {
Expand Down

0 comments on commit d21466d

Please sign in to comment.