Conversation
- 升级数据库结构,添加pageId字段和索引 - 重构快照状态管理,支持页面隔离 - 每个页面维护独立的快照历史和游标 - 添加页面ID管理功能到CanvasState - 更新设计器和预览页面以支持页面ID - 添加完整的单元测试和使用文档 - 保持向后兼容性,支持旧版本数据 解决了所有页面共享快照导致的混乱问题, 现在撤销/重做操作只影响当前页面。
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.
功能概述
实现了按页面进行快照管理的功能,解决了之前所有页面共享快照导致的混乱问题。现在每个页面都有独立的快照历史,撤销/重做操作只影响当前页面。
主要改进
🔧 核心功能
📊 数据库升级
pageId字段和索引🎯 用户体验提升
技术实现
修改的文件
packages/designer/src/db.ts- 升级数据库结构packages/designer/src/state/snapshot.ts- 重构快照管理逻辑packages/designer/src/state/canvas.ts- 添加页面ID管理examples/src/pages/DesignerView/View.vue- 设置页面IDexamples/src/pages/Preview.vue- 更新预览页面逻辑新增的API
SnapshotState
CanvasState
测试和文档
向后兼容性
使用示例
测试说明
请测试以下场景:
相关Issue
解决了用户反馈的快照管理混乱问题,提升了多页面编辑的用户体验。
Pull Request opened by Augment Code with guidance from the PR author