Files
eip4-web/editor.html
zhengwr ae0155eb2c fix(web): editor.html CSS 改 import 进 bundle,修生产构建 404
editor.html 三条 /node_modules/*.css 绝对 link 在 vite build 后不入 dist,
preview/静态托管下 404 → 设计器裸样式。改由 src/editor/main.tsx import,
rollup 收集进 dist/assets/*.css。dev 不受影响(vite 转译同源)。
注:amis-ui/amis-editor-core 的 exports 字段不暴露 css 子路径,裸包名 import 被 rollup 拒绝,
故用相对 node_modules 路径直引真实 css 文件。
REQUIRED-before-any-hosted-demo, OPTIONAL-for-pure-dev。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 09:33:34 +08:00

24 lines
1.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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 由 src/editor/main.tsx import 引入(vite build 收集进 dist,避免绝对包路径在生产构建 404)-->
<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>