fix(designer): constrain amis-editor height so canvas scrolls (was clipped)
设计器「整个页面没有滚动条、看不到底部」真因:amis-editor 自带 CSS 未把 .ae-Editor 约束到容器高度,它按内容自然撑高(新闻管理页达 ~2804px),超出被 DesignerPage 外层 wrapper(flex:1;overflow:hidden) 裁掉、底部够不到。 (此前 theme.css 滚动条改动只作用主应用,editor.html 隔离入口未受影响 → 用户 反馈「没修」。) 修:editor.html <style> 强制 .ae-Editor / .ae-Editor-inner 填满父容器高度 → 编辑器适配视口,画布(.ae-Preview-body 本就 overflow:auto)内部滚动长页面,三栏 框架固定。实测:.ae-Editor 831px、clippedLayers=0(无裁切层)、新闻管理页 776px 完整显示;高于画布的页面经 .ae-Preview-body 滚动。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,12 @@
|
||||
<link rel="stylesheet" href="/node_modules/amis-ui/lib/helper.css" />
|
||||
<style>
|
||||
html, body, #editor-root { height: 100%; margin: 0; overflow: hidden; }
|
||||
/* amis-editor 自带 CSS 未把 .ae-Editor 约束到容器高度 → 它按内容自然撑高(高页面如
|
||||
新闻管理可达 2800px)、超出被外层 overflow:hidden 裁掉、画布「滚不动、看不到底部」。
|
||||
强制 .ae-Editor 填满父容器高度 → 编辑器适配视口,画布(.ae-Preview-body 本就
|
||||
overflow:auto)自行内部滚动长页面,三栏框架固定不动。 */
|
||||
.ae-Editor { height: 100% !important; }
|
||||
.ae-Editor-inner { height: 100% !important; min-height: 0 !important; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user