@tmagic/editor 1.1.0-beta.2 → 1.1.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +1 -1
- package/dist/tmagic-editor.es.js +78 -65
- package/dist/tmagic-editor.es.js.map +1 -1
- package/dist/tmagic-editor.umd.js +75 -63
- package/dist/tmagic-editor.umd.js.map +1 -1
- package/dist/types/src/services/props.d.ts +20 -2
- package/dist/types/src/type.d.ts +1 -0
- package/dist/types/src/utils/props.d.ts +0 -20
- package/package.json +7 -7
- package/src/components/ScrollViewer.vue +1 -1
- package/src/layouts/sidebar/ComponentListPanel.vue +4 -15
- package/src/layouts/sidebar/LayerPanel.vue +11 -2
- package/src/layouts/workspace/Stage.vue +2 -0
- package/src/services/BaseService.ts +4 -9
- package/src/services/editor.ts +8 -8
- package/src/services/props.ts +46 -7
- package/src/services/ui.ts +8 -2
- package/src/theme/framework.scss +1 -1
- package/src/theme/stage.scss +2 -2
- package/src/type.ts +1 -0
- package/src/utils/editor.ts +2 -1
- package/src/utils/props.ts +0 -22
|
@@ -479,17 +479,12 @@
|
|
|
479
479
|
try {
|
|
480
480
|
let beforeArgs = args;
|
|
481
481
|
for (const beforeMethod of scope.pluginOptionsList[beforeMethodName]) {
|
|
482
|
-
|
|
483
|
-
if (isError(
|
|
484
|
-
throw
|
|
485
|
-
if (!Array.isArray(
|
|
486
|
-
|
|
482
|
+
beforeArgs = await beforeMethod(...beforeArgs) || [];
|
|
483
|
+
if (isError(beforeArgs))
|
|
484
|
+
throw beforeArgs;
|
|
485
|
+
if (!Array.isArray(beforeArgs)) {
|
|
486
|
+
beforeArgs = [beforeArgs];
|
|
487
487
|
}
|
|
488
|
-
beforeArgs = beforeArgs.map((v, index) => {
|
|
489
|
-
if (typeof beforeReturnValue[index] === "undefined")
|
|
490
|
-
return v;
|
|
491
|
-
return beforeReturnValue[index];
|
|
492
|
-
});
|
|
493
488
|
}
|
|
494
489
|
let returnValue = await fn(beforeArgs, sourceMethod.bind(scope));
|
|
495
490
|
for (const afterMethod of scope.pluginOptionsList[afterMethodName]) {
|
|
@@ -645,7 +640,15 @@
|
|
|
645
640
|
|
|
646
641
|
class Props extends BaseService {
|
|
647
642
|
constructor() {
|
|
648
|
-
super([
|
|
643
|
+
super([
|
|
644
|
+
"setPropsConfig",
|
|
645
|
+
"getPropsConfig",
|
|
646
|
+
"setPropsValue",
|
|
647
|
+
"getPropsValue",
|
|
648
|
+
"createId",
|
|
649
|
+
"setNewItemId",
|
|
650
|
+
"getDefaultPropsValue"
|
|
651
|
+
]);
|
|
649
652
|
this.state = vue.reactive({
|
|
650
653
|
propsConfigMap: {},
|
|
651
654
|
propsValueMap: {}
|
|
@@ -674,7 +677,7 @@
|
|
|
674
677
|
setPropsValue(type, value) {
|
|
675
678
|
this.state.propsValueMap[type] = value;
|
|
676
679
|
}
|
|
677
|
-
async getPropsValue(type, defaultValue = {}) {
|
|
680
|
+
async getPropsValue(type, { inputEvent, ...defaultValue } = {}) {
|
|
678
681
|
if (type === "area") {
|
|
679
682
|
const value = await this.getPropsValue("button");
|
|
680
683
|
value.className = "action-area";
|
|
@@ -684,10 +687,17 @@
|
|
|
684
687
|
}
|
|
685
688
|
return value;
|
|
686
689
|
}
|
|
687
|
-
const data =
|
|
688
|
-
|
|
690
|
+
const [id, defaultPropsValue, data] = await Promise.all([
|
|
691
|
+
this.createId(type),
|
|
692
|
+
this.getDefaultPropsValue(type),
|
|
693
|
+
this.setNewItemId(lodashEs.cloneDeep({
|
|
694
|
+
type,
|
|
695
|
+
...defaultValue
|
|
696
|
+
}))
|
|
697
|
+
]);
|
|
689
698
|
return {
|
|
690
|
-
|
|
699
|
+
id,
|
|
700
|
+
...defaultPropsValue,
|
|
691
701
|
...lodashEs.mergeWith(lodashEs.cloneDeep(this.state.propsValueMap[type] || {}), data)
|
|
692
702
|
};
|
|
693
703
|
}
|
|
@@ -705,6 +715,20 @@
|
|
|
705
715
|
await this.setNewItemId(item, config);
|
|
706
716
|
}
|
|
707
717
|
}
|
|
718
|
+
return config;
|
|
719
|
+
}
|
|
720
|
+
async getDefaultPropsValue(type) {
|
|
721
|
+
return ["page", "container"].includes(type) ? {
|
|
722
|
+
type,
|
|
723
|
+
layout: "absolute",
|
|
724
|
+
style: {},
|
|
725
|
+
name: type,
|
|
726
|
+
items: []
|
|
727
|
+
} : {
|
|
728
|
+
type,
|
|
729
|
+
style: {},
|
|
730
|
+
name: type
|
|
731
|
+
};
|
|
708
732
|
}
|
|
709
733
|
}
|
|
710
734
|
const updatePopId = (oldId, popId, pageConfig) => {
|
|
@@ -879,23 +903,13 @@
|
|
|
879
903
|
return config.style?.left;
|
|
880
904
|
const el = doc.getElementById(`${config.id}`);
|
|
881
905
|
const parentEl = doc.getElementById(`${parent.id}`);
|
|
882
|
-
|
|
906
|
+
const left = Number(config.style?.left) || 0;
|
|
907
|
+
if (el && parentEl && el.offsetWidth + left > parentEl.offsetWidth) {
|
|
883
908
|
return parentEl.offsetWidth - el.offsetWidth;
|
|
884
909
|
}
|
|
885
910
|
return config.style.left;
|
|
886
911
|
};
|
|
887
912
|
|
|
888
|
-
const log = (...args) => {
|
|
889
|
-
};
|
|
890
|
-
const info = (...args) => {
|
|
891
|
-
};
|
|
892
|
-
const warn = (...args) => {
|
|
893
|
-
};
|
|
894
|
-
const debug = (...args) => {
|
|
895
|
-
};
|
|
896
|
-
const error = (...args) => {
|
|
897
|
-
};
|
|
898
|
-
|
|
899
913
|
class Editor$1 extends BaseService {
|
|
900
914
|
constructor() {
|
|
901
915
|
super([
|
|
@@ -1033,7 +1047,7 @@
|
|
|
1033
1047
|
this.set("highlightNode", node);
|
|
1034
1048
|
}
|
|
1035
1049
|
async add(addNode, parent) {
|
|
1036
|
-
const { type, ...config2 } = addNode;
|
|
1050
|
+
const { type, inputEvent, ...config2 } = addNode;
|
|
1037
1051
|
const curNode = this.get("node");
|
|
1038
1052
|
let parentNode;
|
|
1039
1053
|
const isPage2 = type === schema.NodeType.PAGE;
|
|
@@ -1057,7 +1071,7 @@
|
|
|
1057
1071
|
parentNode?.items?.push(newNode);
|
|
1058
1072
|
const stage = this.get("stage");
|
|
1059
1073
|
const root = this.get("root");
|
|
1060
|
-
await stage?.add({ config: lodashEs.cloneDeep(newNode), root: lodashEs.cloneDeep(root) });
|
|
1074
|
+
await stage?.add({ config: lodashEs.cloneDeep(newNode), parent: lodashEs.cloneDeep(parentNode), root: lodashEs.cloneDeep(root) });
|
|
1061
1075
|
if (layout === Layout.ABSOLUTE) {
|
|
1062
1076
|
const fixedLeft = fixNodeLeft(newNode, parentNode, stage?.renderer.contentWindow?.document);
|
|
1063
1077
|
if (typeof fixedLeft !== "undefined") {
|
|
@@ -1070,9 +1084,10 @@
|
|
|
1070
1084
|
if (!isPage2) {
|
|
1071
1085
|
this.pushHistoryState();
|
|
1072
1086
|
}
|
|
1073
|
-
stage?.select(newNode.id);
|
|
1074
1087
|
if (isPage2) {
|
|
1075
1088
|
this.state.pageLength += 1;
|
|
1089
|
+
} else {
|
|
1090
|
+
stage?.select(newNode.id);
|
|
1076
1091
|
}
|
|
1077
1092
|
this.emit("add", newNode);
|
|
1078
1093
|
return newNode;
|
|
@@ -1190,7 +1205,7 @@
|
|
|
1190
1205
|
console.error(e);
|
|
1191
1206
|
return;
|
|
1192
1207
|
}
|
|
1193
|
-
await propsService.setNewItemId(config, this.get("root"));
|
|
1208
|
+
config = await propsService.setNewItemId(config, this.get("root"));
|
|
1194
1209
|
if (config.style) {
|
|
1195
1210
|
config.style = {
|
|
1196
1211
|
...config.style,
|
|
@@ -1214,8 +1229,8 @@
|
|
|
1214
1229
|
const stage = this.get("stage");
|
|
1215
1230
|
const doc = stage?.renderer.contentWindow?.document;
|
|
1216
1231
|
if (doc) {
|
|
1217
|
-
const parentEl = doc.getElementById(`${parent.id}`);
|
|
1218
1232
|
const el = doc.getElementById(`${node.id}`);
|
|
1233
|
+
const parentEl = el?.offsetParent;
|
|
1219
1234
|
if (parentEl && el) {
|
|
1220
1235
|
node.style.left = (parentEl.clientWidth - el.clientWidth) / 2;
|
|
1221
1236
|
}
|
|
@@ -1628,18 +1643,16 @@
|
|
|
1628
1643
|
}
|
|
1629
1644
|
];
|
|
1630
1645
|
const DEFAULT_CONFIG = fillConfig([]);
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
style: {},
|
|
1642
|
-
name: type
|
|
1646
|
+
|
|
1647
|
+
const log = (...args) => {
|
|
1648
|
+
};
|
|
1649
|
+
const info = (...args) => {
|
|
1650
|
+
};
|
|
1651
|
+
const warn = (...args) => {
|
|
1652
|
+
};
|
|
1653
|
+
const debug = (...args) => {
|
|
1654
|
+
};
|
|
1655
|
+
const error = (...args) => {
|
|
1643
1656
|
};
|
|
1644
1657
|
|
|
1645
1658
|
const _sfc_main$i = vue.defineComponent({
|
|
@@ -2307,20 +2320,9 @@
|
|
|
2307
2320
|
}
|
|
2308
2321
|
return;
|
|
2309
2322
|
}
|
|
2310
|
-
if (timeout)
|
|
2323
|
+
if (timeout || !stage.value)
|
|
2311
2324
|
return;
|
|
2312
|
-
timeout =
|
|
2313
|
-
if (!stageOptions || !stage.value)
|
|
2314
|
-
return;
|
|
2315
|
-
const doc = stage.value.renderer.contentWindow?.document;
|
|
2316
|
-
const els = stage.value.getElementsFromPoint(e);
|
|
2317
|
-
for (const el of els) {
|
|
2318
|
-
if (doc && !el.id.startsWith(StageCore.GHOST_EL_ID_PREFIX) && await stageOptions.isContainer(el)) {
|
|
2319
|
-
utils.addClassName(el, doc, stageOptions?.containerHighlightClassName);
|
|
2320
|
-
break;
|
|
2321
|
-
}
|
|
2322
|
-
}
|
|
2323
|
-
}, stageOptions?.containerHighlightDuration);
|
|
2325
|
+
timeout = stage.value.getAddContainerHighlightClassNameTimeout(e);
|
|
2324
2326
|
}
|
|
2325
2327
|
};
|
|
2326
2328
|
}
|
|
@@ -2648,9 +2650,17 @@
|
|
|
2648
2650
|
return true;
|
|
2649
2651
|
return false;
|
|
2650
2652
|
},
|
|
2651
|
-
handleDragEnd() {
|
|
2653
|
+
async handleDragEnd(e) {
|
|
2652
2654
|
if (!tree.value)
|
|
2653
2655
|
return;
|
|
2656
|
+
const { data: node } = e;
|
|
2657
|
+
const parent = editorService?.getParentById(node.id, false);
|
|
2658
|
+
const layout = await editorService?.getLayout(parent);
|
|
2659
|
+
node.style.position = layout;
|
|
2660
|
+
if (layout === Layout.RELATIVE) {
|
|
2661
|
+
node.style.top = 0;
|
|
2662
|
+
node.style.left = 0;
|
|
2663
|
+
}
|
|
2654
2664
|
const { data } = tree.value;
|
|
2655
2665
|
const [page] = data;
|
|
2656
2666
|
editorService?.update(page);
|
|
@@ -3381,7 +3391,7 @@
|
|
|
3381
3391
|
el,
|
|
3382
3392
|
style: vue.computed(() => `
|
|
3383
3393
|
width: ${props.width}px;
|
|
3384
|
-
height: ${
|
|
3394
|
+
height: ${props.height}px;
|
|
3385
3395
|
position: absolute;
|
|
3386
3396
|
margin-top: 30px;
|
|
3387
3397
|
`)
|
|
@@ -3712,6 +3722,7 @@
|
|
|
3712
3722
|
top,
|
|
3713
3723
|
left
|
|
3714
3724
|
};
|
|
3725
|
+
config.inputEvent = e;
|
|
3715
3726
|
services?.editorService.add(config, parent);
|
|
3716
3727
|
}
|
|
3717
3728
|
}
|
|
@@ -4004,10 +4015,12 @@
|
|
|
4004
4015
|
const { height, width } = stageContainerRect;
|
|
4005
4016
|
if (!width || !height)
|
|
4006
4017
|
return 1;
|
|
4007
|
-
|
|
4018
|
+
const stageWidth = stageRect.width + 30;
|
|
4019
|
+
const stageHeight = stageRect.height + 30;
|
|
4020
|
+
if (width > stageWidth && height > stageHeight) {
|
|
4008
4021
|
return 1;
|
|
4009
4022
|
}
|
|
4010
|
-
return Math.min((width -
|
|
4023
|
+
return Math.min((width - 60) / stageWidth || 1, (height - 80) / stageHeight || 1);
|
|
4011
4024
|
}
|
|
4012
4025
|
}
|
|
4013
4026
|
var uiService = new Ui();
|
|
@@ -4221,7 +4234,7 @@
|
|
|
4221
4234
|
}
|
|
4222
4235
|
var Editor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
4223
4236
|
|
|
4224
|
-
var index$1 = /* #__PURE__ */ (() => ".m-editor-nav-menu {\n display: flex;\n z-index: 5;\n -webkit-box-pack: justify;\n justify-content: space-between;\n -webkit-box-align: center;\n align-items: center;\n background-color: #ffffff;\n font-size: 19.2px;\n color: #070303;\n font-weight: 400;\n box-sizing: border-box;\n margin: 0px;\n flex: 0 0 35px;\n border-bottom: 1px solid #d8dee8;\n}\n.m-editor-nav-menu > div {\n display: flex;\n height: 100%;\n z-index: 1;\n align-items: center;\n}\n.m-editor-nav-menu .menu-center {\n justify-content: center;\n}\n.m-editor-nav-menu .menu-right {\n justify-content: flex-end;\n}\n.m-editor-nav-menu .menu-item {\n flex-direction: row;\n -webkit-box-align: center;\n align-items: center;\n vertical-align: middle;\n font-size: 14px;\n line-height: 1;\n height: 100%;\n color: rgba(255, 255, 255, 0.7);\n box-sizing: inherit;\n z-index: 1;\n display: flex !important;\n transition: all 0.3s ease 0s;\n border-bottom: 2px solid transparent;\n margin: 0;\n}\n.m-editor-nav-menu .menu-item .is-disabled {\n opacity: 0.5;\n}\n.m-editor-nav-menu .menu-item .is-text {\n padding: 5px;\n}\n.m-editor-nav-menu .menu-item .is-text,\n.m-editor-nav-menu .menu-item i {\n color: #070303;\n}\n.m-editor-nav-menu .menu-item .icon {\n display: flex;\n -webkit-box-align: center;\n align-items: center;\n height: 100%;\n padding: 0px 8px;\n}\n.m-editor-nav-menu .menu-item .menu-item-text {\n color: #070303;\n}\n.m-editor {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n.m-editor-content {\n width: 100%;\n height: calc(100% - 35px);\n display: flex;\n justify-self: space-between;\n}\n.m-editor-framework-center {\n position: relative;\n transform: translateZ(0);\n flex: 1;\n}\n.m-editor-framework-left {\n background-color: #ffffff;\n}\n.m-editor-framework-center .el-scrollbar__view {\n height: 100%;\n min-height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.m-editor-empty-panel {\n display: flex;\n flex: 1;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n height: calc(100% - 32px);\n}\n.m-editor-empty-content {\n display: flex;\n justify-content: space-evenly;\n flex-direction: row;\n width: 100%;\n}\n.m-editor-empty-button {\n border: 3px solid rgba(0, 0, 0, 0.2);\n padding: 10px 40px;\n color: rgba(0, 0, 0, 0.6);\n cursor: pointer;\n}\n.m-editor-empty-button i {\n height: 180px;\n line-height: 180px;\n font-size: 100px;\n}\n.m-editor-empty-button p {\n text-align: center;\n font-size: 20px;\n margin-top: 5px;\n}\n.m-editor-empty-button:hover {\n border-color: #2882e0;\n color: #2882e0;\n}\n.m-editor-sidebar {\n height: 100%;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header {\n background: #2882e0;\n border: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header.is-left {\n width: 40px;\n margin-right: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__nav-wrap {\n margin: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__nav {\n border: 0;\n border-radius: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .tab-label {\n margin-left: 2px;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left {\n line-height: 15px;\n border: 0;\n height: auto;\n padding: 8px;\n color: rgb(255, 255, 255);\n box-sizing: border-box;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left.is-left.is-active {\n background: #ffffff;\n border: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left.is-left.is-active i {\n color: #353140;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left.is-left.is-active .magic-editor-tab-panel-title {\n color: #353140;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left.is-left:first-child {\n border-right: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header i {\n font-size: 25px;\n color: rgba(255, 255, 255, 0.6);\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header i:hover {\n color: rgb(255, 255, 255);\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .magic-editor-tab-panel-title {\n font-size: 12px;\n white-space: normal;\n}\n.m-editor-sidebar .el-scrollbar {\n height: 100%;\n}\n.m-editor-sidebar .el-tree {\n min-height: 100%;\n}\n.m-editor-sidebar .fold-icon {\n position: absolute;\n bottom: 8px;\n left: 0px;\n width: 45px;\n padding-left: 8px;\n color: #fff;\n font-size: 32px;\n opacity: 0.8;\n cursor: pointer;\n}\n.m-editor-sidebar .fold-icon:hover {\n background: rgba(0, 0, 0, 0.2);\n}\n.m-editor-sidebar .el-tabs__content,\n.m-editor-sidebar .el-tab-pane {\n height: 100%;\n}\n.magic-editor-layer-panel {\n background: #ffffff;\n}\n.magic-editor-layer-panel .search-input {\n background: #ffffff;\n color: #bbbbbb;\n padding: 10px;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1;\n}\n.magic-editor-layer-panel .search-input .el-input__suffix {\n padding: 10px 5px;\n}\n.magic-editor-layer-panel .node-content {\n flex: 1;\n display: flex;\n width: 100%;\n}\n.magic-editor-layer-panel .node-content > div {\n width: 8px;\n}\n.magic-editor-layer-panel .node-content > span {\n width: calc(100% - 68px);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.magic-editor-layer-panel .node-content > i {\n margin-right: 10px;\n font-size: 20px;\n}\n.magic-editor-layer-panel .node-content > i.lock {\n color: #bbb;\n}\n.magic-editor-layer-panel,\n.magic-editor-layer-panel .el-tree {\n background-color: #ffffff;\n color: #313a40;\n}\n.magic-editor-layer-panel .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {\n background-color: #2882e0;\n color: #fff;\n}\n.magic-editor-layer-panel .cus-tree-node {\n width: 100%;\n overflow: hidden;\n}\n.magic-editor-layer-panel .cus-tree-node-hover {\n background-color: #f3f5f9;\n width: 100%;\n}\n.magic-editor-layer-panel .el-tree-node:focus > .el-tree-node__content {\n background-color: #2882e0;\n color: #fff;\n}\n.ui-tree-tip {\n width: 100%;\n height: 25px;\n margin-left: 10px;\n background: #ffffff;\n font-style: italic;\n color: #555554;\n position: absolute;\n top: 40px;\n left: 0;\n z-index: 1;\n}\n.ui-component-panel {\n height: 100%;\n border-top: 0 !important;\n margin-top: 50px;\n background-color: #ffffff;\n}\n.ui-component-panel .search-input {\n background: #f8fbff;\n color: #bbbbbb;\n padding: 10px;\n position: absolute;\n top: 0;\n left: 0;\n box-sizing: border-box;\n z-index: 1;\n}\n.ui-component-panel .search-input .el-input__prefix {\n padding: 10px;\n}\n.ui-component-panel .search-input .el-input__suffix {\n padding: 10px 5px;\n}\n.ui-component-panel .el-collapse-item > div:first-of-type {\n border-bottom: 1px solid #d9dbdd;\n margin-bottom: 10px;\n}\n.ui-component-panel .el-collapse-item__header {\n background: #ffffff;\n color: #070303;\n height: 25px;\n line-height: 25px;\n padding-left: 10px;\n font-size: 12px;\n}\n.ui-component-panel .el-collapse-item__header i {\n margin-right: 5px;\n font-size: 14px;\n}\n.ui-component-panel .el-collapse-item__wrap {\n background: #ffffff;\n border-bottom: 0;\n}\n.ui-component-panel .el-collapse-item__wrap .el-collapse-item__content {\n padding: 10px;\n display: flex;\n flex-wrap: wrap;\n}\n.ui-component-panel .el-collapse-item__wrap .component-item {\n display: flex;\n overflow: hidden;\n text-overflow: ellipsis;\n margin: 5px 10px;\n box-sizing: border-box;\n color: #070303;\n flex-direction: column;\n width: 42px;\n cursor: pointer;\n}\n.ui-component-panel .el-collapse-item__wrap .component-item i {\n font-size: 20px;\n background: #fff;\n height: 40px;\n width: 40px;\n line-height: 40px;\n border-radius: 5px;\n color: #909090;\n border: 1px solid #d9dbdd;\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n margin-bottom: 5px;\n}\n.ui-component-panel .el-collapse-item__wrap .component-item i:hover {\n background: #2882e0;\n color: #fff;\n border-color: #4e8be1;\n}\n.ui-component-panel .el-collapse-item__wrap .component-item span {\n font-size: 12px;\n text-align: center;\n}\n.ui-component-panel .el-collapse-item__wrap .component-item .el-tooltip {\n width: 50px;\n height: 30px;\n line-height: 15px;\n display: block;\n white-space: normal;\n margin: 0;\n}\n.m-editor-resizer {\n border-left: 1px solid transparent;\n border-right: 1px solid transparent;\n width: 8px;\n margin: 0 -5px;\n height: 100%;\n opacity: 0.9;\n background: padding-box #d8dee8;\n box-sizing: border-box;\n cursor: col-resize;\n z-index: 1;\n}\n.m-editor-resizer:hover {\n border-color: #d8dee8;\n}\n.m-editor-resizer .icon-container {\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.4s;\n width: 20px;\n height: 120px;\n line-height: 120px;\n text-align: center;\n background: #d8dee8;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n cursor: pointer;\n}\n.m-editor-resizer .icon-container.position-left {\n transform: translate(calc(-100% - 4px), -50%);\n}\n.m-editor-resizer .icon-container.position-right {\n transform: translate(calc(100% + 4px), -50%);\n}\n.m-editor-resizer .icon {\n color: #fff;\n font-size: 18px;\n}\n.magic-editor-resizer:hover .icon-container {\n visibility: visible;\n opacity: 1;\n}\n.m-editor-workspace {\n height: 100%;\n width: 100%;\n user-select: none;\n}\n.m-editor-workspace:focus-visible {\n outline: 0;\n}\n.m-editor-page-bar {\n position: fixed;\n bottom: 0;\n left: 0;\n display: flex;\n width: 100%;\n height: 32px;\n line-height: 32px;\n color: #070303;\n background-color: #f3f3f3;\n border-top: 1px solid #d9dbdd;\n z-index: 2;\n overflow: hidden;\n}\n.m-editor-page-bar-items {\n display: flex;\n transition: transform 0.3s;\n}\n.m-editor-page-bar-item {\n padding: 0 10px;\n cursor: pointer;\n border-right: 1px solid #d9dbdd;\n display: flex;\n justify-items: center;\n align-items: center;\n background-color: #f3f3f3;\n white-space: nowrap;\n}\n.m-editor-page-bar-item.active {\n background-color: #fff;\n cursor: text;\n}\n.m-editor-page-bar-item.active .m-editor-page-bar-menu-icon {\n cursor: pointer;\n}\n.m-editor-page-bar-item-icon {\n position: relative;\n z-index: 1;\n}\n.m-editor-page-bar-item-title {\n max-width: 150px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n.page-bar-popover.el-popper.el-popover {\n padding: 10px 0;\n}\n.page-bar-popover .menu-item {\n cursor: pointer;\n transition: all 0.2s ease 0s;\n padding: 5px 14px;\n}\n.page-bar-popover .menu-item .el-button--text,\n.page-bar-popover .menu-item i {\n color: #070303;\n}\n.page-bar-popover .menu-item:hover {\n background-color: #f3f5f9;\n}\n.m-editor-props-panel {\n padding: 0 10px;\n}\n.m-editor-props-panel.small .el-form-item__label {\n font-size: 12px;\n}\n.m-editor-props-panel.small .m-fieldset legend {\n font-size: 12px;\n}\n.m-editor-props-panel.small .el-tabs__item {\n font-size: 12px;\n}\n.m-editor-props-panel .el-input__wrapper {\n border-radius: 0;\n}\n.m-editor-props-panel-popper.small span,\n.m-editor-props-panel-popper.small a,\n.m-editor-props-panel-popper.small p {\n font-size: 12px;\n}\n.magic-editor-content-menu {\n position: fixed;\n font-size: 12px;\n background: #fff;\n box-shadow: 0 2px 8px 2px rgba(68, 73, 77, 0.16);\n z-index: 9999;\n transform-origin: 0% 0%;\n font-weight: 600;\n padding: 4px 0px;\n overflow: auto;\n max-height: 100%;\n}\n.magic-editor-content-menu .menu-item {\n color: #333;\n display: flex;\n -webkit-box-align: center;\n align-items: center;\n cursor: pointer;\n min-width: 140px;\n transition: all 0.2s ease 0s;\n padding: 5px 14px;\n border-left: 2px solid transparent;\n}\n.magic-editor-content-menu .menu-item .el-button {\n width: 100%;\n justify-content: flex-start;\n}\n.magic-editor-content-menu .menu-item .el-button--text,\n.magic-editor-content-menu .menu-item i {\n color: #070303;\n}\n.magic-editor-content-menu .menu-item.divider {\n padding: 0 14px;\n}\n.magic-editor-content-menu .menu-item.divider .el-divider {\n margin: 0;\n}\n.magic-editor-content-menu .menu-item:hover {\n background-color: #f3f5f9;\n}\n.m-editor-stage {\n position: relative;\n width: 100%;\n height: calc(100% - 32px);\n overflow: hidden;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.m-editor-stage-container {\n width: 100%;\n height: 100%;\n z-index: 0;\n position: relative;\n border: 1px solid #d9dbdd;\n transition: transform 0.3s;\n box-sizing: content-box;\n}\n.m-editor-stage-container::-webkit-scrollbar {\n width: 0 !important;\n}\n.magic-code-editor {\n width: 100%;\n}\n.magic-code-editor .margin {\n margin: 0;\n}")();
|
|
4237
|
+
var index$1 = /* #__PURE__ */ (() => ".m-editor-nav-menu {\n display: flex;\n z-index: 5;\n -webkit-box-pack: justify;\n justify-content: space-between;\n -webkit-box-align: center;\n align-items: center;\n background-color: #ffffff;\n font-size: 19.2px;\n color: #070303;\n font-weight: 400;\n box-sizing: border-box;\n margin: 0px;\n flex: 0 0 35px;\n border-bottom: 1px solid #d8dee8;\n}\n.m-editor-nav-menu > div {\n display: flex;\n height: 100%;\n z-index: 1;\n align-items: center;\n}\n.m-editor-nav-menu .menu-center {\n justify-content: center;\n}\n.m-editor-nav-menu .menu-right {\n justify-content: flex-end;\n}\n.m-editor-nav-menu .menu-item {\n flex-direction: row;\n -webkit-box-align: center;\n align-items: center;\n vertical-align: middle;\n font-size: 14px;\n line-height: 1;\n height: 100%;\n color: rgba(255, 255, 255, 0.7);\n box-sizing: inherit;\n z-index: 1;\n display: flex !important;\n transition: all 0.3s ease 0s;\n border-bottom: 2px solid transparent;\n margin: 0;\n}\n.m-editor-nav-menu .menu-item .is-disabled {\n opacity: 0.5;\n}\n.m-editor-nav-menu .menu-item .is-text {\n padding: 5px;\n}\n.m-editor-nav-menu .menu-item .is-text,\n.m-editor-nav-menu .menu-item i {\n color: #070303;\n}\n.m-editor-nav-menu .menu-item .icon {\n display: flex;\n -webkit-box-align: center;\n align-items: center;\n height: 100%;\n padding: 0px 8px;\n}\n.m-editor-nav-menu .menu-item .menu-item-text {\n color: #070303;\n}\n.m-editor {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n.m-editor-content {\n width: 100%;\n height: calc(100% - 35px);\n display: flex;\n justify-self: space-between;\n}\n.m-editor-framework-center {\n position: relative;\n transform: translateZ(0);\n flex: 1;\n}\n.m-editor-framework-left {\n background-color: #ffffff;\n}\n.m-editor-framework-center .el-scrollbar__view {\n height: 100%;\n min-height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.m-editor-empty-panel {\n display: flex;\n flex: 1;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n height: calc(100% - 32px);\n}\n.m-editor-empty-content {\n display: flex;\n justify-content: space-evenly;\n flex-direction: row;\n width: 100%;\n}\n.m-editor-empty-button {\n border: 3px solid rgba(0, 0, 0, 0.2);\n padding: 10px 40px;\n color: rgba(0, 0, 0, 0.6);\n cursor: pointer;\n}\n.m-editor-empty-button i {\n height: 180px;\n line-height: 180px;\n font-size: 100px;\n}\n.m-editor-empty-button p {\n text-align: center;\n font-size: 20px;\n margin-top: 5px;\n}\n.m-editor-empty-button:hover {\n border-color: #2882e0;\n color: #2882e0;\n}\n.m-editor-sidebar {\n height: 100%;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header {\n background: #2882e0;\n border: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header.is-left {\n width: 40px;\n margin-right: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__nav-wrap {\n margin: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__nav {\n border: 0;\n border-radius: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .tab-label {\n margin-left: 2px;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left {\n line-height: 15px;\n border: 0;\n height: auto;\n padding: 8px;\n color: rgb(255, 255, 255);\n box-sizing: border-box;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left.is-left.is-active {\n background: #ffffff;\n border: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left.is-left.is-active i {\n color: #353140;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left.is-left.is-active .magic-editor-tab-panel-title {\n color: #353140;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left.is-left:first-child {\n border-right: 0;\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header i {\n font-size: 25px;\n color: rgba(255, 255, 255, 0.6);\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header i:hover {\n color: rgb(255, 255, 255);\n}\n.m-editor-sidebar.el-tabs--left .el-tabs__header .magic-editor-tab-panel-title {\n font-size: 12px;\n white-space: normal;\n}\n.m-editor-sidebar .el-scrollbar {\n height: 100%;\n}\n.m-editor-sidebar .el-tree {\n min-height: 100%;\n}\n.m-editor-sidebar .fold-icon {\n position: absolute;\n bottom: 8px;\n left: 0px;\n width: 45px;\n padding-left: 8px;\n color: #fff;\n font-size: 32px;\n opacity: 0.8;\n cursor: pointer;\n}\n.m-editor-sidebar .fold-icon:hover {\n background: rgba(0, 0, 0, 0.2);\n}\n.m-editor-sidebar .el-tabs__content,\n.m-editor-sidebar .el-tab-pane {\n height: 100%;\n}\n.magic-editor-layer-panel {\n background: #ffffff;\n}\n.magic-editor-layer-panel .search-input {\n background: #ffffff;\n color: #bbbbbb;\n padding: 10px;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1;\n}\n.magic-editor-layer-panel .search-input .el-input__suffix {\n padding: 10px 5px;\n}\n.magic-editor-layer-panel .node-content {\n flex: 1;\n display: flex;\n width: 100%;\n}\n.magic-editor-layer-panel .node-content > div {\n width: 8px;\n}\n.magic-editor-layer-panel .node-content > span {\n width: calc(100% - 68px);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.magic-editor-layer-panel .node-content > i {\n margin-right: 10px;\n font-size: 20px;\n}\n.magic-editor-layer-panel .node-content > i.lock {\n color: #bbb;\n}\n.magic-editor-layer-panel,\n.magic-editor-layer-panel .el-tree {\n background-color: #ffffff;\n color: #313a40;\n}\n.magic-editor-layer-panel .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {\n background-color: #2882e0;\n color: #fff;\n}\n.magic-editor-layer-panel .cus-tree-node {\n width: 100%;\n overflow: hidden;\n}\n.magic-editor-layer-panel .cus-tree-node-hover {\n background-color: #f3f5f9;\n width: 100%;\n}\n.magic-editor-layer-panel .el-tree-node:focus > .el-tree-node__content {\n background-color: #2882e0;\n color: #fff;\n}\n.ui-tree-tip {\n width: 100%;\n height: 25px;\n margin-left: 10px;\n background: #ffffff;\n font-style: italic;\n color: #555554;\n position: absolute;\n top: 40px;\n left: 0;\n z-index: 1;\n}\n.ui-component-panel {\n height: 100%;\n border-top: 0 !important;\n margin-top: 50px;\n background-color: #ffffff;\n}\n.ui-component-panel .search-input {\n background: #f8fbff;\n color: #bbbbbb;\n padding: 10px;\n position: absolute;\n top: 0;\n left: 0;\n box-sizing: border-box;\n z-index: 1;\n}\n.ui-component-panel .search-input .el-input__prefix {\n padding: 10px;\n}\n.ui-component-panel .search-input .el-input__suffix {\n padding: 10px 5px;\n}\n.ui-component-panel .el-collapse-item > div:first-of-type {\n border-bottom: 1px solid #d9dbdd;\n margin-bottom: 10px;\n}\n.ui-component-panel .el-collapse-item__header {\n background: #ffffff;\n color: #070303;\n height: 25px;\n line-height: 25px;\n padding-left: 10px;\n font-size: 12px;\n}\n.ui-component-panel .el-collapse-item__header i {\n margin-right: 5px;\n font-size: 14px;\n}\n.ui-component-panel .el-collapse-item__wrap {\n background: #ffffff;\n border-bottom: 0;\n}\n.ui-component-panel .el-collapse-item__wrap .el-collapse-item__content {\n padding: 10px;\n display: flex;\n flex-wrap: wrap;\n}\n.ui-component-panel .el-collapse-item__wrap .component-item {\n display: flex;\n overflow: hidden;\n text-overflow: ellipsis;\n margin: 5px 10px;\n box-sizing: border-box;\n color: #070303;\n flex-direction: column;\n width: 42px;\n cursor: pointer;\n}\n.ui-component-panel .el-collapse-item__wrap .component-item i {\n font-size: 20px;\n background: #fff;\n height: 40px;\n width: 40px;\n line-height: 40px;\n border-radius: 5px;\n color: #909090;\n border: 1px solid #d9dbdd;\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n margin-bottom: 5px;\n}\n.ui-component-panel .el-collapse-item__wrap .component-item i:hover {\n background: #2882e0;\n color: #fff;\n border-color: #4e8be1;\n}\n.ui-component-panel .el-collapse-item__wrap .component-item span {\n font-size: 12px;\n text-align: center;\n}\n.ui-component-panel .el-collapse-item__wrap .component-item .el-tooltip {\n width: 50px;\n height: 30px;\n line-height: 15px;\n display: block;\n white-space: normal;\n margin: 0;\n}\n.m-editor-resizer {\n border-left: 1px solid transparent;\n border-right: 1px solid transparent;\n width: 8px;\n margin: 0 -5px;\n height: 100%;\n opacity: 0.9;\n background: padding-box #d8dee8;\n box-sizing: border-box;\n cursor: col-resize;\n z-index: 1;\n}\n.m-editor-resizer:hover {\n border-color: #d8dee8;\n}\n.m-editor-resizer .icon-container {\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.4s;\n width: 20px;\n height: 120px;\n line-height: 120px;\n text-align: center;\n background: #d8dee8;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n cursor: pointer;\n}\n.m-editor-resizer .icon-container.position-left {\n transform: translate(calc(-100% - 4px), -50%);\n}\n.m-editor-resizer .icon-container.position-right {\n transform: translate(calc(100% + 4px), -50%);\n}\n.m-editor-resizer .icon {\n color: #fff;\n font-size: 18px;\n}\n.magic-editor-resizer:hover .icon-container {\n visibility: visible;\n opacity: 1;\n}\n.m-editor-workspace {\n height: 100%;\n width: 100%;\n user-select: none;\n}\n.m-editor-workspace:focus-visible {\n outline: 0;\n}\n.m-editor-page-bar {\n position: fixed;\n bottom: 0;\n left: 0;\n display: flex;\n width: 100%;\n height: 32px;\n line-height: 32px;\n color: #070303;\n background-color: #f3f3f3;\n border-top: 1px solid #d9dbdd;\n z-index: 2;\n overflow: hidden;\n}\n.m-editor-page-bar-items {\n display: flex;\n transition: transform 0.3s;\n}\n.m-editor-page-bar-item {\n padding: 0 10px;\n cursor: pointer;\n border-right: 1px solid #d9dbdd;\n display: flex;\n justify-items: center;\n align-items: center;\n background-color: #f3f3f3;\n white-space: nowrap;\n}\n.m-editor-page-bar-item.active {\n background-color: #fff;\n cursor: text;\n}\n.m-editor-page-bar-item.active .m-editor-page-bar-menu-icon {\n cursor: pointer;\n}\n.m-editor-page-bar-item-icon {\n position: relative;\n z-index: 1;\n}\n.m-editor-page-bar-item-title {\n max-width: 150px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n.page-bar-popover.el-popper.el-popover {\n padding: 10px 0;\n}\n.page-bar-popover .menu-item {\n cursor: pointer;\n transition: all 0.2s ease 0s;\n padding: 5px 14px;\n}\n.page-bar-popover .menu-item .el-button--text,\n.page-bar-popover .menu-item i {\n color: #070303;\n}\n.page-bar-popover .menu-item:hover {\n background-color: #f3f5f9;\n}\n.m-editor-props-panel {\n padding: 0 10px;\n}\n.m-editor-props-panel.small .el-form-item__label {\n font-size: 12px;\n}\n.m-editor-props-panel.small .m-fieldset legend {\n font-size: 12px;\n}\n.m-editor-props-panel.small .el-tabs__item {\n font-size: 12px;\n}\n.m-editor-props-panel .el-input__wrapper {\n border-radius: 0;\n}\n.m-editor-props-panel-popper.small span,\n.m-editor-props-panel-popper.small a,\n.m-editor-props-panel-popper.small p {\n font-size: 12px;\n}\n.magic-editor-content-menu {\n position: fixed;\n font-size: 12px;\n background: #fff;\n box-shadow: 0 2px 8px 2px rgba(68, 73, 77, 0.16);\n z-index: 9999;\n transform-origin: 0% 0%;\n font-weight: 600;\n padding: 4px 0px;\n overflow: auto;\n max-height: 100%;\n}\n.magic-editor-content-menu .menu-item {\n color: #333;\n display: flex;\n -webkit-box-align: center;\n align-items: center;\n cursor: pointer;\n min-width: 140px;\n transition: all 0.2s ease 0s;\n padding: 5px 14px;\n border-left: 2px solid transparent;\n}\n.magic-editor-content-menu .menu-item .el-button {\n width: 100%;\n justify-content: flex-start;\n}\n.magic-editor-content-menu .menu-item .el-button--text,\n.magic-editor-content-menu .menu-item i {\n color: #070303;\n}\n.magic-editor-content-menu .menu-item.divider {\n padding: 0 14px;\n}\n.magic-editor-content-menu .menu-item.divider .el-divider {\n margin: 0;\n}\n.magic-editor-content-menu .menu-item:hover {\n background-color: #f3f5f9;\n}\n.m-editor-stage {\n position: relative;\n width: 100%;\n height: calc(100% - 32px);\n overflow: hidden;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.m-editor-stage-container {\n width: 100%;\n height: 100%;\n z-index: 0;\n position: relative;\n transition: transform 0.3s;\n box-sizing: content-box;\n box-shadow: rgba(0, 0, 0, 0.04) 0px 3px 5px;\n}\n.m-editor-stage-container::-webkit-scrollbar {\n width: 0 !important;\n}\n.magic-code-editor {\n width: 100%;\n}\n.magic-code-editor .margin {\n margin: 0;\n}")();
|
|
4225
4238
|
|
|
4226
4239
|
const defaultInstallOpt = {};
|
|
4227
4240
|
var index = {
|
|
@@ -4262,7 +4275,6 @@
|
|
|
4262
4275
|
exports.generatePageName = generatePageName;
|
|
4263
4276
|
exports.generatePageNameByApp = generatePageNameByApp;
|
|
4264
4277
|
exports.getConfig = getConfig;
|
|
4265
|
-
exports.getDefaultPropsValue = getDefaultPropsValue;
|
|
4266
4278
|
exports.getGuideLineFromCache = getGuideLineFromCache;
|
|
4267
4279
|
exports.getInitPositionStyle = getInitPositionStyle;
|
|
4268
4280
|
exports.getNodeIndex = getNodeIndex;
|