21 Commits

Author SHA1 Message Date
roymondchen
3d038513e3 feat(editor): 新增 DSL 修改方法的 doNotSwitchPage 选项
在 add / remove / doRemove / sort / paste / alignCenter / moveToContainer
的 options 对象中新增 doNotSwitchPage,与 doNotSelect 合并为同一配置 DslOpOptions,
用于在 DSL 操作(新增 / 删除 / 跨页移动)会引发当前页面切换时跳过该次切换。

- 抽取共用类型 DslOpOptions 到 type.ts 并对外导出
- 新增 editorService.isOnDifferentPage 辅助方法用于跨页判断
- 修复 doUpdate 同步 state.page 时无条件覆盖的问题:只在被更新页就是当前页时才同步引用,避免「更新非当前页」误把编辑器切到该页
- doRemove 中对已删除节点的引用清理与当前页清空逻辑提升为无条件执行,避免 doNotSelect / doNotSwitchPage 跳过后续 select 时 state 持有已删除节点
- 补充对应单元测试与 API 文档

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-22 16:49:52 +08:00
roymondchen
05e512b1fe feat(editor): 新增 DSL 修改方法的 doNotSelect 选项
- add/remove/sort/alignCenter/moveToContainer/paste 新增 doNotSelect 选项,控制操作后是否自动触发选中变化
- doUpdate/doRemove 改为始终同步当前选中列表中的节点引用,避免 state 持有已被替换/已删除的过期节点
- 顺手修复 doUpdate 在 splice(-1) 时误改最后一个选中项的 bug
- 移除 update/doUpdate 的 selectedAfterUpdate 参数(语义已内化),move 不再暴露无意义的 doNotSelect
- 新增 safeOptions / safeParent 辅助函数,兜底插件机制将 dispatch 注入到形参位置的场景

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-19 17:20:04 +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
f6bd647958 test(editor): 更新monaco-editor依赖 2026-03-18 20:27:09 +08:00
roymondchen
5242585500 chore: update copyright 2025-07-11 15:04:22 +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
831204663a test: 完善测试用例 2024-05-09 20:49:54 +08:00
roymondchen
5c6a3455b0 feat(editor): service扩展支持设置成同步的 2023-12-06 15:28:18 +08:00
roymondchen
2b881c3863 feat(editor): 新增parseDSL配置,用于解析DSL,默认使用eval 2023-06-19 11:27:47 +08:00
roymondchen
0491487385 feat(editor): 修改service get set 方法的ts定义,不再需要传入泛型参数 2023-02-06 19:25:37 +08:00
oceanzhu
23708e4644 chore: 更新版权年份 2023-01-04 16:11:51 +08:00
roymondchen
ac065504f6 test: vue组件测试用例 2022-09-26 21:29:54 +08:00
roymondchen
9b9c9db683 fix(editor): 上移一层通知runtime更新参数出错
fix #282
2022-08-24 10:36:42 +08:00
roymondchen
b6fa064b0b feat(editor): editorService.add支持添加多个组件 2022-08-11 14:26:03 +08:00
roymondchen
574e03f685 feat(editor): 完善storageService功能
新增namespace,setItem/getItem时自动key自动加上namespace;setItem可以指定协议;getItem时根据协议自动解析

fix #224
2022-08-04 18:46:26 +08:00
王明华
da0cb7d614
feat(editor): 添加storageService服务 (#225)
* feat(editor): 添加storageService服务

* fix(editor): 添加type.ts 导出StorageService的定义
2022-08-04 12:45:55 +08:00
parisma
af2fa3eee4 test(editor): 修改测试用例,修复流水线打包问题 2022-08-03 14:46:48 +08:00
khuntoriia
b702857aad
feat(editor): 多选菜单支持复制粘贴删除 (#217)
* feat(editor): 多选菜单支持复制粘贴删除

* fix(editor): 编辑器选中节点统一为nodes数组,保留原node对象为nodes数组的第一个元素,将复制粘贴删除行为封装到editorservice中,支持键盘快捷键

* test(editor): 修改editor相关测试用例

* fix(editor): cr问题修改

* feat(editor): 将复制粘贴操作进行拆分封装

* fix(editor): cr修改

Co-authored-by: parisma <parisma@tencent.com>
2022-08-03 14:03:36 +08:00
roymondchen
ca4a6b596d test: jest 改成 vitest 2022-06-07 20:10:41 +08:00
roymondchen
6dbda7b565 style(editor): 将节点类型改成枚举 2022-03-31 19:46:12 +08:00
roymondchen
bc8b9f5225 refactor: make it public 2022-02-17 14:47:39 +08:00