roymondchen
|
47c26ed189
|
fix(core): 一个组件配置多个相同的事件销毁后没有能成功移除事件绑定
|
2023-06-30 19:40:47 +08:00 |
|
roymondchen
|
74c9deaa29
|
feat(editor, core): 支持直接绑定整个数据源对象
|
2023-06-28 16:39:47 +08:00 |
|
roymondchen
|
649720079a
|
chore: release v1.3.0-alpha.8
|
2023-06-27 15:28:52 +08:00 |
|
roymondchen
|
b952e6efd1
|
feat(editor,core): 数据源模板改成使用 ES 分隔符
|
2023-06-26 20:30:38 +08:00 |
|
roymondchen
|
591c4d05b2
|
chore: release v1.3.0-alpha.7
|
2023-06-19 14:55:29 +08:00 |
|
roymondchen
|
50b058c3c5
|
chore: release v1.3.0-alpha.6
|
2023-06-12 19:49:00 +08:00 |
|
roymondchen
|
01d1dccbb6
|
feat(app,utils,runtime): 将resetcss.css移到utils,在runtime中引入
|
2023-06-08 17:44:06 +08:00 |
|
roymondchen
|
bdad1a41f9
|
chore: release v1.3.0-alpha.5
|
2023-06-06 19:15:57 +08:00 |
|
roymondchen
|
39033ca6fb
|
chore: release v1.3.0-alpha.4
|
2023-05-30 17:57:35 +08:00 |
|
roymondchen
|
4314e4adab
|
chore: release v1.3.0-alpha.3
|
2023-05-30 11:44:24 +08:00 |
|
roymondchen
|
aac478eebc
|
feat: 新增数据源
|
2023-05-29 11:33:44 +08:00 |
|
roymondchen
|
e4079d1e60
|
chore: release v1.2.15
|
2023-04-26 11:23:28 +08:00 |
|
roymondchen
|
bd0321fe2d
|
chore: release v1.2.14
|
2023-04-20 16:32:50 +08:00 |
|
roymondchen
|
abcac71826
|
fix(core): node events 为空时,应为空数组
fix #500
|
2023-04-10 16:50:13 +08:00 |
|
roymondchen
|
3d9f38781a
|
feat(core): 重新设置designWidth时,应该重新计算root font size
|
2023-04-10 16:40:20 +08:00 |
|
roymondchen
|
a60e067d4e
|
chore: 更新依赖版本
re #498
|
2023-04-10 14:49:18 +08:00 |
|
roymondchen
|
1b7d840e4d
|
chore: release v1.2.13
|
2023-03-30 17:11:50 +08:00 |
|
roymondchen
|
6340bcc04b
|
chore: release v1.2.12
|
2023-03-30 14:25:41 +08:00 |
|
roymondchen
|
fb026a134f
|
fix(core): style兼容hippy
|
2023-03-30 14:19:04 +08:00 |
|
roymondchen
|
44290b65ba
|
fix(core): 没有设置curPage,默认取第一个page
|
2023-03-30 12:14:52 +08:00 |
|
roymondchen
|
74ce204489
|
chore: release v1.2.11
|
2023-03-30 11:21:22 +08:00 |
|
roymondchen
|
5eb3b0dcae
|
chore(core): 页面变化时仅移除配置的事件
|
2023-03-29 16:34:20 +08:00 |
|
parisma
|
39468f3b95
|
feat(editor,form,core,schema): 事件支持触发代码块
|
2023-03-29 07:13:57 +00:00 |
|
roymondchen
|
cfd2a6eee3
|
feat(core,runtime): 删除App中pages,只留下当前page
|
2023-03-28 21:06:38 +08:00 |
|
roymondchen
|
3b3fbb288d
|
chore: release v1.2.10
|
2023-03-27 14:20:03 +08:00 |
|
roymondchen
|
36c4ffa02e
|
fix(core): 非浏览器环境屏蔽相关代码
|
2023-03-22 19:28:53 +08:00 |
|
roymondchen
|
f1f100f952
|
feat(core): 新增节点操作方法
|
2023-03-15 15:06:58 +08:00 |
|
roymondchen
|
b16c1fa5fc
|
chore: release v1.2.9
|
2023-03-13 15:18:01 +08:00 |
|
roymondchen
|
2a457c9553
|
chore: release v1.2.8
|
2023-03-06 16:41:58 +08:00 |
|
roymondchen
|
dc96720641
|
chore: release v1.2.7
|
2023-03-02 17:05:08 +08:00 |
|
roymondchen
|
174695b94c
|
chore: release v1.2.6
|
2023-02-21 15:43:39 +08:00 |
|
roymondchen
|
fcb69b7743
|
chore: release v1.2.5
|
2023-02-17 15:58:59 +08:00 |
|
roymondchen
|
8102aaeb12
|
chore: release v1.2.4
|
2023-02-17 14:24:14 +08:00 |
|
roymondchen
|
6637fdc92b
|
chore: release v1.2.3
|
2023-02-15 19:46:59 +08:00 |
|
roymondchen
|
ae5c627902
|
chore: release v1.2.2
|
2023-02-09 17:00:12 +08:00 |
|
roymondchen
|
89fa321088
|
chore: release v1.2.1
|
2023-02-09 16:32:02 +08:00 |
|
oceanzhu
|
23708e4644
|
chore: 更新版权年份
|
2023-01-04 16:11:51 +08:00 |
|
roymondchen
|
b13aaeb0e9
|
chore: release v1.2.0
|
2022-12-22 11:14:59 +08:00 |
|
roymondchen
|
9b324d17cc
|
chore: release v1.2.0-beta.27
|
2022-12-13 19:02:00 +08:00 |
|
roymondchen
|
ac11fc5926
|
chore: release v1.2.0-beta.26
|
2022-12-12 16:59:39 +08:00 |
|
roymondchen
|
9dec40805c
|
chore: release v1.2.0-beta.25
|
2022-12-07 20:08:02 +08:00 |
|
roymondchen
|
328b3135e5
|
chore: release v1.2.0-beta.24
|
2022-12-07 17:04:41 +08:00 |
|
roymondchen
|
14550ddc0f
|
chore: release v1.2.0-beta.23
|
2022-12-07 16:32:00 +08:00 |
|
roymondchen
|
8ab6cdb03c
|
chore: release v1.2.0-beta.22
|
2022-12-06 21:02:59 +08:00 |
|
roymondchen
|
f3574a5029
|
chore: release v1.2.0-beta.21
|
2022-12-06 20:35:10 +08:00 |
|
roymondchen
|
180252f3f5
|
chore: 添加type=module
|
2022-12-06 19:12:32 +08:00 |
|
roymondchen
|
51f7963197
|
chore: release v1.2.0-beta.20
|
2022-12-05 20:41:50 +08:00 |
|
roymondchen
|
f050ec1273
|
chore: release v1.2.0-beta.19
|
2022-12-01 20:38:37 +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
|
deeb55cd0b
|
chore: release v1.2.0-beta.18
|
2022-11-24 21:04:33 +08:00 |
|