设计器「整个页面没有滚动条、看不到底部」真因: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>
27 lines
1.3 KiB
HTML
27 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh">
|
||
<head>
|
||
<meta charset="UTF-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<title>EIP4 页面设计器</title>
|
||
<!-- amis-editor 独立入口:用 npm 包版 amis,与主应用 sdk-local 完全隔离 -->
|
||
<!-- CSS 在 HTML 里直接引用,绕开 vite esbuild 对 amis-ui 包路径的解析 -->
|
||
<link rel="stylesheet" href="/node_modules/amis-editor-core/lib/style.css" />
|
||
<link rel="stylesheet" href="/node_modules/amis-ui/lib/themes/default.css" />
|
||
<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>
|
||
<div id="editor-root"></div>
|
||
<script type="module" src="/src/editor/main.tsx"></script>
|
||
</body>
|
||
</html>
|