roymondchen
|
899991794b
|
chore(editor): 拆分Editor.vue
|
2023-03-28 17:26:34 +08:00 |
|
roymondchen
|
3b6ca97f4c
|
feat(edtior): 代码块使用依赖收集器改造
|
2023-03-27 19:09:47 +08:00 |
|
roymondchen
|
fa89af920c
|
chore(editor): codeDsl由codeBlockService维护,不再从editorService中获取,删除editorService中相关api
|
2023-03-23 16:42:36 +08:00 |
|
parisma
|
a013f35cd9
|
fix: 调整绑定关系结构,优化性能
|
2023-02-17 14:14:26 +08:00 |
|
roymondchen
|
0491487385
|
feat(editor): 修改service get set 方法的ts定义,不再需要传入泛型参数
|
2023-02-06 19:25:37 +08:00 |
|
roymondchen
|
cfc57f17af
|
fix(editor): 组件销毁时移除service的时间监听
|
2022-12-13 15:32:13 +08:00 |
|
roymondchen
|
dd8ac99d5d
|
feat(stage,editor): 添加disabledDragStart配置,用于关闭按下鼠标并拖动功能
|
2022-12-12 16:56:08 +08:00 |
|
roymondchen
|
7c823022ae
|
build(playground): playground 增加element-plus 按需加载
fix #438
|
2022-12-08 19:43:38 +08:00 |
|
roymondchen
|
e813129eb8
|
fix(editor): modelValue自动更新不成功
|
2022-12-07 16:26:26 +08:00 |
|
roymondchen
|
45a20d9405
|
fix(editor): services在组件unmounted时只重置状态不移除事件
|
2022-12-06 20:32:06 +08:00 |
|
roymondchen
|
45eaea6f68
|
fix(editor): 编辑器初始化默认选择节点
|
2022-12-05 20:05:23 +08:00 |
|
roymondchen
|
f6262be397
|
docs: 1.2.0文档
|
2022-12-01 17:38:05 +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 |
|
parisma
|
0eab817a11
|
fix(editor): 区分直接关闭和保存后关闭
#440
|
2022-11-10 19:53:35 +08:00 |
|
roymondchen
|
c2e8a1caae
|
fix(editor): content-menu没有响应式
|
2022-11-04 19:19:44 +08:00 |
|
parisma
|
0baec3e532
|
fix(editor): slot修改,schema声明修改
|
2022-09-28 15:52:41 +08:00 |
|
parisma
|
84b24f11b8
|
Revert "fix(editor): codeblock slot参数修改"
This reverts commit b0a571b2bcb8b4c6f0098dd79fae4b9068996ae5.
|
2022-09-28 15:52:41 +08:00 |
|
parisma
|
2ac3645bb0
|
fix(editor): codeblock slot参数修改
|
2022-09-28 15:52:41 +08:00 |
|
parisma
|
92f3696e44
|
feat(editor): 组件代码块的绑定关系记录到dsl中,修复删除组件解除关系的问题,代码块dsl支持扩展字段
|
2022-09-22 16:46:11 +08:00 |
|
parisma
|
bfaa8317e3
|
feat(editor): 支持代码块维度查看与组件的绑定关系,并支持从代码块列表解除绑定
|
2022-09-22 16:46:11 +08:00 |
|
parisma
|
134efbfb0f
|
fix(editor): 修复从dsl初始化时代码块绑定关系未同步的问题,修复一些warning,优化语法报错时保存并关闭的交互逻辑
|
2022-09-22 16:46:11 +08:00 |
|
parisma
|
7640c06ccb
|
feat(editor): 代码块service封装完成
|
2022-09-22 16:46:11 +08:00 |
|
parisma
|
452c80d829
|
feat(editor): 代码块功能新增slot
|
2022-09-22 16:46:11 +08:00 |
|
parisma
|
f1242ee3f4
|
feat(editor): 代码块编辑区改为使用弹窗,代码块slot完善
|
2022-09-22 16:46:11 +08:00 |
|
parisma
|
0c2c33f854
|
feat(editor): 代码块新增,编辑器保存至dsl
|
2022-09-22 16:46:11 +08:00 |
|
roymondchen
|
cda0c41ad4
|
feat(editor): 新增layer-node-content slot,用于定制组件树节点
re #368
|
2022-09-22 14:43:46 +08:00 |
|
roymondchen
|
835189adc9
|
feat(editor): 新增Layout
|
2022-09-16 17:45:16 +08:00 |
|
roymondchen
|
c307386190
|
feat(editor): 添加compoent-list-item slot
|
2022-09-06 16:04:20 +08:00 |
|
roymondchen
|
e67cbceb7d
|
fix(editor): 没有页面时,添加页面出错
|
2022-08-31 15:11:01 +08:00 |
|
roymondchen
|
2201fbe80c
|
fix(editor,stage,ui,runtime): 流式布局下,height自动设置成auto
fix #298
|
2022-08-30 17:38:42 +08:00 |
|
roymondchen
|
4a59b4b0f4
|
feat(editor): 编辑器销毁后销毁services
|
2022-08-30 12:50:53 +08:00 |
|
roymondchen
|
4872e5352b
|
chore(editor): 重构tool-button,将功能逻辑移到nav-menu中
|
2022-08-25 15:30:41 +08:00 |
|
roymondchen
|
98bc4e2dbb
|
feat(editor): 添加stage slot
|
2022-08-24 09:37:41 +08:00 |
|
roymondchen
|
4f8ea94ee8
|
feat(stage,editor): 拖入指定容器支持配置成按住alt才开启
|
2022-08-12 15:36:05 +08:00 |
|
roymondchen
|
08dae20aa0
|
build(editor): 由于生成.d文件无法将别名转化成真实路径,暂时将@editor改回相对路径
|
2022-08-05 20:12:35 +08:00 |
|
wangminghua
|
2008bc7da1
|
fix(editor): 修复添加StorageService定义导出带来的构建错误
|
2022-08-04 13:40:46 +08:00 |
|
roymondchen
|
de0c6952c7
|
feat: 支持将组件拖动到指定容器
|
2022-07-14 19:02:29 +08:00 |
|
roymondchen
|
e901ad4dd0
|
feat(editor): 添加props-panel-header slot;修改layer-panel,component-list-panel slot名称,加上-header
|
2022-07-08 17:37:04 +08:00 |
|
roymondchen
|
49c9e87d6e
|
feat(editor): 添加layer-panel/component-list-panel slot
|
2022-07-07 19:46:11 +08:00 |
|
i33
|
ecd80cb4a4
|
fix(editor): 修正Editor slot 变量位置
|
2022-06-27 12:04:18 +08:00 |
|
roymondchen
|
23776299a7
|
fix(editor): moveableOptions默认值中的container有误
|
2022-06-21 20:19:25 +08:00 |
|
roymondchen
|
154860c66c
|
feat: 支持配置updateDragEl方法来调制选中框
|
2022-06-15 14:22:14 +08:00 |
|
roymondchen
|
70292b92c8
|
feat(editor): contentmenu支持扩展
|
2022-06-06 15:28:47 +08:00 |
|
roymondchen
|
dbcd4201ea
|
fix(stage): 只有当组件不在视窗内才自动滚动,新增scrollIntoView配置
|
2022-05-25 14:22:28 +08:00 |
|
roymondchen
|
359fc5fdc6
|
feat(editor): 源代码编辑器支持扩展配置
|
2022-05-24 20:49:58 +08:00 |
|
roymondchen
|
ab3e113904
|
feat(editor): 画布自适应大小
|
2022-03-14 22:02:26 +08:00 |
|
roymondchen
|
bc8b9f5225
|
refactor: make it public
|
2022-02-17 14:47:39 +08:00 |
|