feat(gantt): 导航 + 年刻度 + 保存布局 + 导出 PDF#1706
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
第三组: - 年刻度:新增 year 粒度,时间轴一列一年,上方带「20XXs」十年分组带; ResourceWorkload 同步支持 year 列宽与标签。 - 导航:工具栏新增 本周 / 本月 跳转按钮(配合已有 今天),横向滚动时间轴到 当前周 / 月 起点。 - 保存布局:新增 persistLayoutKey / onLayoutChange,工具栏「保存布局」按钮把 当前粒度 + 缩放 + 任务列折叠快照写入 localStorage(key gantt-layout:<对象>:<视图>), 下次加载自动恢复;显式 viewMode prop 优先。ObjectGantt 默认按数据对象派生 key,可用 persistLayout:false 关闭。 - 导出 PDF:将整图 SVG 栅格化为 JPEG,内嵌进零依赖单页 PDF(DCTDecode), 与导出 PNG 并列;buildExportSvg 复用于两种导出。 测试:新增 GanttView.layout.test.tsx(12 例)+ ObjectGantt.test.tsx(持久化 key 接线 2 例),共 173 通过;tsc 干净。浏览器留痕 scripts/verify-export-layout.mjs (7/7 通过),截图 45-48。文档与 skill 同步更新。
baozhoutao
force-pushed
the
feat/gantt-nav-export-layout
branch
from
June 13, 2026 14:41
79e967e to
9d6937a
Compare
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
Gantt 插件第三组增强:导航 + 年刻度 + 保存布局 + 导出 PDF。基于已合并的 #1689 之后的工作,净差异仅本组改动(GanttView ~335 行、ObjectGantt 5 行)。
改动
year粒度,时间轴一列一年,上方带「20XXs」十年分组带;ResourceWorkload同步支持 year 列宽与标签。persistLayoutKey/onLayoutChange;工具栏「保存布局」按钮把当前粒度 + 缩放 + 任务列折叠快照写入localStorage(keygantt-layout:<对象>:<视图>),下次加载自动恢复;显式viewModeprop 优先。ObjectGantt默认按数据对象派生 key,可用persistLayout: false关闭。DCTDecode),与导出 PNG 并列;buildExportSvg复用于两种导出。测试
GanttView.layout.test.tsx(12 例)+ObjectGantt.test.tsx(持久化 key 接线 2 例)。tsc --noEmit干净。浏览器留痕
scripts/verify-export-layout.mjs(7/7 通过),截图 45–48 持久化于docs/verification/:导出 PNG/PDF 通过下载魔数校验(
‰PNG/%PDF-)。文档与 skill(
page-builder.md)已同步更新。