roymondchen
|
0f42989ca3
|
refactor(editor): 统一历史栈结构,支持扩展历史类型
将 pageSteps/codeBlockState/dataSourceState 三套独立历史栈收敛为统一的 steps 结构
(按 stepType 分桶),并新增 registerStepType/setStepName/getStepName 支持自定义
扩展历史类型。同步重构 history 相关服务、组件、工具方法、测试与文档。
|
2026-06-23 20:14:41 +08:00 |
|
roymondchen
|
bfdaf2b244
|
fix(playground): 调整初始化时序避免历史恢复被覆盖
将本地 magicDSL 的恢复逻辑移动到 restoreHistory 之后,避免页面初始化时覆盖已恢复的历史状态。
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-06-18 17:28:06 +08:00 |
|
roymondchen
|
4a8289137b
|
fix(playground): 修复历史恢复后加载 DSL 时缺少页面基线记录
初始 set root 时标记各页面历史栈为已保存,并用 dsl.id 恢复 IndexedDB 历史,避免 restore 后再赋值时走 diff 分支导致无 initial 基线。
|
2026-06-15 20:43:53 +08:00 |
|
roymondchen
|
4f284e8d9c
|
feat(editor): 支持页面初始基线与 root 变更历史记录
设置 root 时为各页建立 initial 基线并展示在历史列表底部;编辑期间再次 set root 按页面粒度写入历史,并抽取历史工具函数以支持撤销下限与持久化恢复。
|
2026-06-11 15:00:11 +08:00 |
|
roymondchen
|
614f12adf3
|
feat(editor): 支持历史记录持久化
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-06-08 17:04:39 +08:00 |
|
roymondchen
|
1b66ab1b88
|
refactor(editor): 抽取 serializeConfig 工具统一序列化配置
将分散在 CodeLink、CodeEditor 及 playground 中重复的 serialize-javascript
序列化逻辑收敛为 @editor/utils/editor 的 serializeConfig 并对外导出复用。
|
2026-06-02 16:34:23 +08:00 |
|
roymondchen
|
0446202ba6
|
feat(editor): 新增历史记录列表面板
- 新增 history-list 模块(面板、Tab、Bucket、GroupRow 与 composables)
- NavMenu 接入历史记录面板入口
- history/editor/codeBlock/dataSource service 配合面板能力调整
- utils/undo-redo 适配新面板
- 扩展 type.ts 相关类型定义
- 新增 history-list-panel.scss 并在 theme.scss 引入
- 补充 history-list 模块完整单元测试
- playground 同步小幅调整
|
2026-05-28 17:51:52 +08:00 |
|
roymondchen
|
c79034befc
|
feat(editor,form): 支持按需设置表单组件
|
2026-03-18 20:19:05 +08:00 |
|
roymondchen
|
450af8021d
|
style(playground): eslint
|
2026-01-26 14:37:18 +08:00 |
|
roymondchen
|
0ec8af20e0
|
refactor(playground): form提交的结果使用代码编辑器显示
|
2026-01-23 17:03:37 +08:00 |
|
roymondchen
|
93640257e9
|
fix(design,editro,element-plus-adapter,tdesign-vue-next-adapter): elememt-plus表单渲染失败
|
2025-11-24 16:14:21 +08:00 |
|
roymondchen
|
979b834fac
|
feat(design, tdesign-vue-next-adapter, table, element-plus-adapter): 完善tdesign适配
|
2025-11-12 19:52:31 +08:00 |
|
roymondchen
|
11d25603a8
|
feat(playground): 支持UI组件库切换
|
2025-11-12 19:52:30 +08:00 |
|
roymondchen
|
8809351537
|
feat(table): action支持配置disabled
|
2025-10-15 14:32:45 +08:00 |
|
roymondchen
|
4637c80125
|
style(editor,stage): 完善moveableOptions prop类型定义
|
2025-07-04 14:25:05 +08:00 |
|
roymondchen
|
b78ef20602
|
feat(playground): 新增按比例拖动组件大小快捷键
|
2025-06-25 14:19:18 +08:00 |
|
roymondchen
|
3b1e41b217
|
refactor(playground): 整理代码
|
2025-06-20 15:05:47 +08:00 |
|
roymondchen
|
94d0ed1fd0
|
chore(playground): 恢复dsl本地存储的key
|
2025-02-27 11:31:20 +08:00 |
|
roymondchen
|
4026c0c305
|
feat(runtime): 支持页面切换
|
2025-02-26 15:20:32 +08:00 |
|
roymondchen
|
a2c79c79cd
|
fix(tmagic-form-runtime): 画布无法点击选中组件
|
2024-12-09 20:21:34 +08:00 |
|
roymondchen
|
34fc0a15b9
|
refactor: 将data-source,dep,schema,utils收敛到core,将form,table,stage,design,util收敛到editor
|
2024-12-09 20:21:34 +08:00 |
|
roymondchen
|
ea556d69f6
|
style(playground): 完善ts定义
|
2024-07-25 17:51:49 +08:00 |
|
parisma
|
cd191f6815
|
feat(editor): 复制组件时收集依赖性能优化改造
|
2024-05-30 07:44:27 +00:00 |
|
roymondchen
|
50d238a48c
|
feat(playground): 设置配置表单的label-width
|
2024-05-30 11:29:02 +08:00 |
|
roymondchen
|
ee269917f8
|
feat(dep,editor,data-source,schema): 优化编辑器中依赖收集性能
|
2024-05-29 19:32:16 +08:00 |
|
parisma
|
faabf1bb3a
|
feat(editor,dep): 支持复制组件时将组件绑定的数据源一并复制
|
2024-05-27 10:52:07 +00:00 |
|
roymondchen
|
3af247febb
|
fix(playground): 画布尺寸切换无效
由于element-plus2.6后radio-button label属性改成value
fix #586
|
2024-04-08 14:25:33 +08:00 |
|
roymondchen
|
47b19ae7fa
|
feat(playground): 缓存上次保存dsl
|
2024-03-28 21:02:15 +08:00 |
|
roymondchen
|
f999b60a79
|
chore: 完善代码
|
2024-03-20 14:26:05 +08:00 |
|
roymondchen
|
4f31eed71a
|
style(editor): use-plugin ts定义完善
|
2024-03-12 14:08:37 +08:00 |
|
roymondchen
|
16e45cb45d
|
style(editor): 完善service use-plugin的ts类型定义
|
2024-03-05 14:55:41 +08:00 |
|
roymondchen
|
c30e7d340b
|
feat(editor,stage): 完善双击画布可以已弹层方向显示并显示完整的组件
|
2024-01-18 11:40:00 +08:00 |
|
roymondchen
|
f8443ed316
|
feat: 新增tmagic-form-runtime
|
2024-01-09 14:58:13 +08:00 |
|
roymondchen
|
fbe1d88d27
|
feat(editor,form): 新增属性配置表单error事件
re #557
|
2023-12-21 16:30:31 +08:00 |
|
roymondchen
|
538f96c082
|
feat(playground): 完善form editor
|
2023-12-15 20:05:29 +08:00 |
|
roymondchen
|
cf72039ff1
|
feat(playground): 新增表单编辑器
|
2023-12-12 15:17:28 +08:00 |
|
roymondchen
|
f8125aa149
|
feat(stage): 支持配置对齐元素
|
2023-11-28 16:19:00 +08:00 |
|
roymondchen
|
588ec68b21
|
feat(editor): 事件关联数据源方法支持预置
|
2023-10-07 20:10:50 +08:00 |
|
roymondchen
|
573f1a2c17
|
feat(cli,data-source,editor,playground,runtime): 支持自定义数据源
|
2023-08-21 16:57:18 +08:00 |
|
roymondchen
|
4c9ef87975
|
fix(stage,playground): moveableOptions对多选无效
fix #529
|
2023-08-08 20:58:22 +08:00 |
|
roymondchen
|
01d1dccbb6
|
feat(app,utils,runtime): 将resetcss.css移到utils,在runtime中引入
|
2023-06-08 17:44:06 +08:00 |
|
roymondchen
|
ea4af425f3
|
feat: 完善tdesign-vue-next适配
|
2023-04-25 21:03:52 +08:00 |
|
roymondchen
|
84e2cdf22d
|
fix(playground,runtime): 设备切换时,重新设置root font size与ua
fix #501
|
2023-04-10 16:42:22 +08:00 |
|
parisma
|
6610f30afd
|
feat(form): 支持表单差异对比
1、支持表单差异对比
2、支持在tab统计差异数量
|
2023-03-01 09:22:32 +00:00 |
|
roymondchen
|
0491487385
|
feat(editor): 修改service get set 方法的ts定义,不再需要传入泛型参数
|
2023-02-06 19:25:37 +08:00 |
|
roymondchen
|
ba20eb8cf1
|
fix(playground): 加载组件表单配置资源失败
|
2022-12-07 18:57:30 +08:00 |
|
oceanzhu
|
3fb880d09b
|
refactor(stage):重构魔方编辑器stage代码
Squash merge branch 'feature/oc_actionbox_879360293' into 'master'
对魔方编辑器核心代码stage进行重构,这部分代码主要是负责编辑器中间画布区域的处理,包括渲染一个所见即所得的画布,支持组件的增删改查和拖拽、高亮操作。
旧代码存在的问题以及解决方案:
1、过多暴露属性和循环引用,导致stageCore、stageDragResize、StageMultiDragResize、StageRender、StageMask、StageHighlight之间形成复杂的网状依赖,非常不可控。StageCore负责创建后面5个类的实例,并把这些实例作为自己的公共属性,同时core把自己的this传给这些实例,这些实例就会通过core传进来的this,通过core间接的访问其它实例的方法和属性,比如在stageDragResize中可能存在这样的一个访问:this.core.stageRender.contentWindow.document
解决方案:
1)、属性尽量设置为私有,对外暴露方法,不暴露属性;
2)、core避免向其它类传递this,改为传递接口,需要什么就传什么
2、事件传递较多,跳来跳去,定位问题较为困难
解决方案:
重新梳理各个类的职责,尽量在类中闭环,减少事件传递。
新增了actionManager类,core负责管理render、mask、actionManager三个类;
actionManager负责管理单选、多选、高亮三个类,同时将mask中的事件监听,转移到actionManager监听,actionManager形成单选、多选、高亮行为后,直接调动单选、多选、高亮完成功能。
3、存在一些重复代码
主要是拖拽框的代码在单选、多选、高亮中各自维护,改为统一维护
4、多选不支持辅助线对齐
将单选中的moveableOption管理逻辑抽取出来成为单选和多选的父类,使多选支持辅助线对齐
本次改动取消了一些对外暴露的属性,moveableOption回调函数签名也有变化,详细情况如下:
删除stageCore公共属性:
public selectedDom: HTMLElement | undefined;
public selectedDomList: HTMLElement[] = [];
public highlightedDom: Element | undefined;
public dr: StageDragResize;
public multiDr: StageMultiDragResize;
public highlightLayer: StageHighlight;
public config: StageCoreConfig;
public zoom = DEFAULT_ZOOM;
public containerHighlightClassName: string;
public containerHighlightDuration: number;
public containerHighlightType?: ContainerHighlightType;
public isContainer: IsContainer;
stageCore入参改动:
这两个参数原本定义:
moveableOptions?: ((core?: StageCore) => MoveableOptions) | MoveableOptions;
multiMoveableOptions?: ((core?: StageCore) => MoveableOptions) | MoveableOptions;
修改后定义:
moveableOptions?: CustomizeMoveableOptions;
multiMoveableOptions?: CustomizeMoveableOptions;
CustomizeMoveableOptions =
| ((config?: CustomizeMoveableOptionsCallbackConfig) => MoveableOptions)
| MoveableOptions
| undefined;
export interface CustomizeMoveableOptionsCallbackConfig {
targetElId?: string;
}
|
2022-11-24 21:19:56 +08:00 |
|
roymondchen
|
36f396ac24
|
feat(playground): 使用@tamgic/design
#401
|
2022-10-11 15:50:42 +08:00 |
|
roymondchen
|
f853299226
|
chore: 更新element-plus
|
2022-09-22 12:52:47 +08:00 |
|
roymondchen
|
41a8400095
|
fix(playground,runtime): 拖动添加弹窗时初始位置不对
|
2022-08-16 15:20:39 +08:00 |
|