data-page模板桌面优先修正(线上三症状均为模板缺陷,AI只是照搬):①kanban窄板靠左——board拆外层滚+内层fit-content+auto margin居中(列少居中、列多正常滚,直接justify-content:center会在溢出时裁掉首列)②桌面端容器820px小气——按页面类型放宽:table1200/dashboard1080/kanban1400③dashboard明细表nowrap撞破卡片——.card overflow:hidden+包.table-scroll(负margin贴卡片边缘滚动不撞圆角);SKILL.md同步成桌面优先移动兼容通则(溢出内容包overflow-x:auto、flex居中禁justify-content:center)

This commit is contained in:
2026-09-23 23:41:46 +08:00
parent 5ede5cfd4e
commit 4a16cbd215
4 changed files with 20 additions and 10 deletions
+4 -2
View File
@@ -80,7 +80,7 @@ const taskId = location.pathname.split('/').filter(Boolean)[1];
页面必须包含:
- HTML 骨架(`<!DOCTYPE html>`、`<meta viewport>`、UTF-8)
- 移动端友好的样式
- 桌面优先、移动兼容的样式:容器宽度按页面类型给足(表格类 1200px、看板类 1400px 或不设、统计类 1080px),不要照搬 800px 级别的移动端尺寸
- 通过 `fetch` 调用数据 API
- 错误处理和加载状态
@@ -176,7 +176,9 @@ const taskId = location.pathname.split('/').filter(Boolean)[1];
- 用原生 JS + fetch,不引入框架
- 样式用内联 `<style>` 或独立 CSS,不依赖外部 CSS 库
- 图表用纯 SVG 或 CSS 绘制
- 移动优先
- 桌面优先、移动兼容:数据页面主要在电脑上看,窄屏靠横向滚动兑底
- 所有可能横向溢出的内容(表格、长文本、代码)包一层 `overflow-x: auto` 容器;卡片内滚动可配合负 margin 贴边
- flex 居中用 `width: fit-content; margin: 0 auto`,不用 `justify-content: center`(内容超出滚动容器时居中会裁掉首屏左侧)
- 显示加载状态和错误提示
- 提交类按钮加禁用状态,避免重复点击