50 Commits

Author SHA1 Message Date
roymondchen
27b2c2c685 feat(editor): 历史记录支持操作来源 2026-06-04 16:08:52 +08:00
roymondchen
444d4223a9 feat(stage): 非点击画布选中组件时高亮闪烁选中区域
从图层树、面包屑等外部选中组件时,在画布上对选中区域做一次紫色高亮闪烁,
帮助用户快速定位组件;选中页面不触发。支持通过 editor 的 disabledFlashTip 关闭。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 14:02:57 +08:00
roymondchen
09558fa027 feat(editor): 历史记录接入 changeRecords,undo/redo 按 propPath 局部更新
- 节点 / 数据源 / 代码块的 history step 增加 changeRecords 字段

- editor.update / dataSource.update / codeBlock.setCodeDslById(Sync) 透传 changeRecords 入历史

- applyHistoryOp 的 update 分支:携带 changeRecords 时,按 propPath 从 oldNode/newNode 取值

  构造最小 patch 走 update,不冲掉同节点上其它无关变更;缺省退化为整节点替换

  (覆盖 sort/moveLayer/拖动等纯快照场景)

- editor.update 增加 changeRecordList 形参,多节点场景每个节点单独保留 records;

  use-stage 多选拖动 / 缩放改用 changeRecordList,避免 records 在多节点间共享

- use-code-block-edit.submitCodeBlockHandler 透传 form changeRecords

- 同步更新 editor / dataSource / codeBlock / history service 文档
2026-05-28 16:28:35 +08:00
roymondchen
a341c7d73e fix(editor): 多选时对多个节点的操作合并入同一条历史记录
- moveToContainer 支持数组形参,多选移动整批只产生一条历史记录

- use-stage 拖动多选元素入容器 / 多选拖动缩放整批合成一次调用

- 右键移动至改走 moveToContainer,避免 remove+add 切成两条历史

- 跳过选中目标节点的分支清理 state.nodes 残留旧引用

- history.push 新增可选 pageId 参数,跨页操作正确落到目标页栈

- pushOpHistory 显式按 step.data.id 入栈,避免跨页操作错配
2026-05-27 19:09:34 +08:00
roymondchen
aab73249d1 feat(editor): 新增 alwaysMultiSelect 配置开启常驻多选模式
新增编辑器配置项 alwaysMultiSelect(默认 false),开启后无需按住 Ctrl/Meta
键,组件树与画布点击即多选;当 disabledMultiSelect=true 时本配置失效。同步
在 stage 层 ActionManager 暴露 setAlwaysMultiSelect 方法用于运行时切换,并
补充组件树/服务/画布的状态联动、文档与单元测试。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-11 16:50:40 +08:00
roymondchen
5af9f6e27a feat(editor): 新增 canDropIn 配置统一控制 layer/stage 拖拽放入行为
支持通过 scene 区分图层树、画布拖动、组件库新增三种场景;
返回 false 阻止放入,返回 Id 可重定向放入目标节点。
layer 场景下若禁用某节点的 inner,其子节点的 before/after 也会被同步禁用以避免被绕过。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-09 16:38:10 +08:00
roymondchen
b46b571214 feat(editor): 没有参考线时不显示参考线切换按钮
Made-with: Cursor
2026-04-23 15:42:10 +08:00
roymondchen
b2888962df style(schema,editor,data-source): 代码块类型定义中content去掉string类型 2026-04-09 15:28:03 +08:00
roymondchen
10c36c1980 chore(editor): 画布拖动组件位置更新dsl添加changeRecordes 2026-01-08 16:44:44 +08:00
roymondchen
5242585500 chore: update copyright 2025-07-11 15:04:22 +08:00
roymondchen
c984c1a0cf fix(editor): 树组件搜索后不展开所有节点 2025-07-02 19:47:52 +08:00
roymondchen
32681964b3 feat(editor): stage overlay 支持放大缩小 2025-06-20 19:47:51 +08:00
roymondchen
e7e9197ae3 style: 更新eslint版本,更新eslint配置 2025-04-21 20:35:54 +08:00
roymondchen
900b701c80 refactor(editor): 新增useServices hook,减少使用可选链 2025-02-11 16:24:24 +08:00
roymondchen
1baec3f1d4 refactor(editor): useTemplateRef参数不能与变量名一样,不然会有一个warn 2025-01-09 20:48:35 +08:00
roymondchen
7109df9deb refactor(editor): 模板改成使用useTemplateRef 2024-12-13 16:19:44 +08:00
roymondchen
6030ed1684 feat(edtior,stage): 重新渲染改成重新收集依赖后渲染 2024-12-09 20:21:34 +08:00
roymondchen
0727fe4fea feat(stage,editor): 在选中框新增支持触发画布中组件重新渲染 2024-12-09 20:21:34 +08:00
roymondchen
b4136c91c2 feat(editor): 优化依赖收集体验,减小收集任务粒度,修改配置时识别是否需要触发重新收集 2024-12-09 20:21:34 +08:00
parisma
52c1124e97 feat(editor): 事件流支持上下文对象传递和abort方法中断 2024-12-09 20:21:34 +08:00
roymondchen
eb8126c32f refactor(editor,utils): 将traverseNode方法挪到utils中 2024-12-09 20:21:34 +08:00
roymondchen
0d901c018f fix(editor): stage销毁问题 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
c82e3257c1 refactor(stage,editor): stage销毁后释放内部变量 2024-12-09 20:21:34 +08:00
roymondchen
4f7b6cede4 feat(editor): export tree组件 2024-12-09 20:21:34 +08:00
roymondchen
9e4da0a5c2 feat: dsl id渲染到dom上的data-tamgic-id,不再是id属性 2024-12-09 20:21:34 +08:00
roymondchen
b249563f94 feat(editor): 优化编辑器左边栏拖出体验,需要拖出一定距离才行 2024-07-25 20:58:07 +08:00
roymondchen
6cdeaa0c1b feat(editor): 方法参数支持选择数据源字段 2024-07-02 16:16:15 +08:00
parisma
faabf1bb3a feat(editor,dep): 支持复制组件时将组件绑定的数据源一并复制 2024-05-27 10:52:07 +00:00
roymondchen
47c42222b3 fix(editor): stageOverlay不应受编辑器zoom影响 2024-05-23 19:32:00 +08:00
roymondchen
872c978b9b fix(editor): floating-box高度无法改变 2024-04-11 17:23:31 +08:00
roymondchen
66e16452a8 feat(editor): 数据源字段选择器增加编辑按钮 2024-03-26 16:12:01 +08:00
roymondchen
b3cf919273 chore(editor): 解决warning 2024-03-19 19:18:03 +08:00
moonszhang
96149bd2ae feat(editor): 数据源抽屉切floatbox 2024-03-19 11:07:43 +00:00
roymondchen
c83e76e641 feat(editor): 优化代码块编辑弹窗 2024-03-15 15:24:16 +08:00
moonszhang
a035f02f83 feat(editor): 使用 floatbox 替换原抽屉栏 2024-03-11 12:25:19 +00:00
moonszhang
0d471a96ed style(editor): 修改floatbox 样式问题 2024-02-27 07:35:40 +00:00
moonszhang
cda5413fd1 refactor(editor): floatbox 使用公共组件 2024-02-27 03:01:38 +00:00
roymondchen
c30e7d340b feat(editor,stage): 完善双击画布可以已弹层方向显示并显示完整的组件 2024-01-18 11:40:00 +08:00
roymondchen
e4af8cadb0 feat(editor,stage): 双击画布可以已弹层方向显示并显示完整的组件 2024-01-12 16:36:59 +08:00
roymondchen
2a5b9ec6bd feat(editor, stage): 新增禁用多选的props 2023-12-18 15:00:26 +08:00
roymondchen
b72e487b58 chore: 使用on-before-unmount替换on-unmouted 2023-12-15 16:20:50 +08:00
roymondchen
f212be136e feat(editor,stage): 新增标尺配置props
re #558
2023-12-15 14:32:32 +08:00
roymondchen
7305f878f3 feat(editor, stage): 初始化加载runtime loading 2023-12-15 14:09:44 +08:00
roymondchen
ba2f1e5ac5 feat(stage, editor): runtime支持直接渲染模式不用iframe 2023-12-12 15:09:33 +08:00
roymondchen
741140fa71 refactor(editor): 代码编辑、数据源重构 2023-12-08 17:20:43 +08:00
moonszhang
2b10e7eda9 feat(editor): 支持 slide 侧边栏可拖拽悬浮 2023-11-16 11:00:05 +00:00
roymondchen
5a345575c4 refactor(editor): ui-slect事件名使用常量 2023-10-23 19:54:26 +08:00
roymondchen
1c6c9ab3e8 feat(editor,stage): 新增鼠标悬停在组件上显示当前位置下所有组件菜单 2023-09-19 17:39:36 +08:00
roymondchen
d8a2a1f805 chore(editor): 将hooks放到同一个文件夹中 2023-08-09 19:22:42 +08:00