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
|
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
|
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 |
|
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
|
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 |
|
roymondchen
|
31d60eb1ba
|
fix(playground): pc预览适配
|
2022-08-11 17:53:03 +08:00 |
|
roymondchen
|
1d8149b5eb
|
build: 修改runtime publicDir
|
2022-08-08 16:13:58 +08:00 |
|
roymondchen
|
a57fef4947
|
feat(runtime,playground): vue3使用tmagic-cli生成组件依赖入口
|
2022-08-04 15:39:19 +08:00 |
|
roymondchen
|
0e0e3ee310
|
refactor: 使用@element-plus/icons-vue替换@element-plus/icons
|
2022-07-14 20:39:11 +08:00 |
|
roymondchen
|
7dc0b4e261
|
fix(magic-admin): 修复发布页面资源路径错误,导致页面无法打开问题
|
2022-07-11 19:52:52 +08:00 |
|
roymondchen
|
a7afe057fb
|
chore: import type
|
2022-07-01 20:07:28 +08:00 |
|
roymondchen
|
9f23cd6361
|
feat(playground): 添加不同设备切换
|
2022-06-13 21:03:34 +08:00 |
|
roymondchen
|
f80825331e
|
feat(playground): 添加form、table playground入口
|
2022-06-13 21:03:34 +08:00 |
|
roymondchen
|
2319df727a
|
feat(playground): 添加弹窗组合
|
2022-06-13 16:52:14 +08:00 |
|
roymondchen
|
423059deac
|
feat(playground): playground支持旋转操作
|
2022-06-09 21:03:32 +08:00 |
|
roymondchen
|
44aa56bd52
|
feat: 新增蒙层组件
|
2022-05-27 18:48:55 +08:00 |
|
roymondchen
|
d84037e421
|
feat: 支持playground:vue2/playground:react命令
vue2 react runtime path 出错导致vue2 react playground运行出错;vue2中存在多个composition-api导致出错
fix #82 fix #68
|
2022-05-25 17:04:11 +08:00 |
|
roymondchen
|
8c287ecace
|
feat(ui): 添加二维码,图片组件
|
2022-05-25 14:22:28 +08:00 |
|
roymondchen
|
f9ae10bc9d
|
fix(playground): 预览检查是否保存
|
2022-04-22 13:24:31 +08:00 |
|
roymondchen
|
6dbda7b565
|
style(editor): 将节点类型改成枚举
|
2022-03-31 19:46:12 +08:00 |
|
roymondchen
|
344a032ac3
|
docs: add docs
|
2022-02-22 20:27:01 +08:00 |
|
roymondchen
|
bc8b9f5225
|
refactor: make it public
|
2022-02-17 14:47:39 +08:00 |
|