@tmagic/editor 1.3.0-beta.0 → 1.3.0-beta.2
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 +30 -2
- package/dist/tmagic-editor.js +1053 -647
- package/dist/tmagic-editor.js.map +1 -1
- package/dist/tmagic-editor.umd.cjs +1071 -665
- package/dist/tmagic-editor.umd.cjs.map +1 -1
- package/package.json +10 -10
- package/src/components/CodeBlockEditor.vue +15 -6
- package/src/components/ContentMenu.vue +88 -42
- package/src/components/Resizer.vue +8 -30
- package/src/components/SplitView.vue +3 -2
- package/src/components/ToolButton.vue +1 -1
- package/src/fields/DataSourceFields.vue +10 -0
- package/src/fields/DataSourceMethods.vue +1 -0
- package/src/fields/EventSelect.vue +15 -3
- package/src/hooks/use-getso.ts +35 -0
- package/src/icons/PinIcon.vue +25 -0
- package/src/icons/PinnedIcon.vue +25 -0
- package/src/index.ts +2 -0
- package/src/layouts/workspace/Workspace.vue +1 -1
- package/src/layouts/workspace/viewer/NodeListMenu.vue +166 -0
- package/src/layouts/workspace/viewer/NodeListMenuTitle.vue +68 -0
- package/src/layouts/workspace/{Stage.vue → viewer/Stage.vue} +2 -0
- package/src/layouts/workspace/{ViewerMenu.vue → viewer/ViewerMenu.vue} +1 -1
- package/src/services/dataSource.ts +11 -0
- package/src/theme/content-menu.scss +29 -3
- package/src/theme/index.scss +8 -0
- package/src/type.ts +3 -0
- package/src/utils/data-source/formConfigs/http.ts +9 -0
- package/src/utils/data-source/index.ts +12 -0
- package/src/utils/props.ts +21 -10
- package/types/components/CodeBlockEditor.vue.d.ts +2 -0
- package/types/components/ContentMenu.vue.d.ts +27 -8
- package/types/components/Resizer.vue.d.ts +1 -3
- package/types/hooks/use-code-block-edit.d.ts +7 -0
- package/types/hooks/use-data-source-method.d.ts +7 -0
- package/types/hooks/use-getso.d.ts +5 -0
- package/types/icons/PinIcon.vue.d.ts +2 -0
- package/types/icons/PinnedIcon.vue.d.ts +2 -0
- package/types/index.d.ts +1 -0
- package/types/layouts/PropsPanel.vue.d.ts +1 -1
- package/types/layouts/workspace/viewer/NodeListMenu.vue.d.ts +15 -0
- package/types/layouts/workspace/viewer/NodeListMenuTitle.vue.d.ts +15 -0
- package/types/layouts/workspace/{Stage.vue.d.ts → viewer/Stage.vue.d.ts} +1 -1
- package/types/layouts/workspace/{ViewerMenu.vue.d.ts → viewer/ViewerMenu.vue.d.ts} +1 -1
- package/types/services/dataSource.d.ts +4 -0
- package/types/type.d.ts +3 -0
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
|
|
24
24
|
const monaco__namespace = /*#__PURE__*/_interopNamespaceDefault(monaco);
|
|
25
25
|
|
|
26
|
-
const _hoisted_1$
|
|
26
|
+
const _hoisted_1$w = {
|
|
27
27
|
class: /* @__PURE__ */ vue.normalizeClass(`magic-code-editor`)
|
|
28
28
|
};
|
|
29
|
-
const _sfc_main$
|
|
29
|
+
const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
|
|
30
30
|
...{
|
|
31
31
|
name: "MEditorCodeEditor"
|
|
32
32
|
},
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
}
|
|
174
174
|
});
|
|
175
175
|
return (_ctx, _cache) => {
|
|
176
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
176
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$w, [
|
|
177
177
|
(vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
178
178
|
to: "body",
|
|
179
179
|
disabled: !fullScreen.value
|
|
@@ -201,7 +201,7 @@
|
|
|
201
201
|
}
|
|
202
202
|
});
|
|
203
203
|
|
|
204
|
-
const _sfc_main$
|
|
204
|
+
const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
|
|
205
205
|
...{
|
|
206
206
|
name: "MEditorCode"
|
|
207
207
|
},
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
emit("change", v);
|
|
226
226
|
};
|
|
227
227
|
return (_ctx, _cache) => {
|
|
228
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
228
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$Q, {
|
|
229
229
|
height: _ctx.config.height,
|
|
230
230
|
"init-values": _ctx.model[_ctx.name],
|
|
231
231
|
language: _ctx.config.language,
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
};
|
|
246
246
|
const getConfig = (key) => $TMAGIC_EDITOR[key];
|
|
247
247
|
|
|
248
|
-
const _sfc_main$
|
|
248
|
+
const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
|
|
249
249
|
...{
|
|
250
250
|
name: "MEditorCodeLink"
|
|
251
251
|
},
|
|
@@ -324,7 +324,7 @@
|
|
|
324
324
|
}
|
|
325
325
|
});
|
|
326
326
|
|
|
327
|
-
const _sfc_main$
|
|
327
|
+
const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
|
|
328
328
|
...{
|
|
329
329
|
name: "MEditorCodeSelect"
|
|
330
330
|
},
|
|
@@ -396,11 +396,11 @@
|
|
|
396
396
|
}
|
|
397
397
|
});
|
|
398
398
|
|
|
399
|
-
const _hoisted_1$
|
|
400
|
-
const _hoisted_2$
|
|
401
|
-
const _hoisted_3$
|
|
402
|
-
const _hoisted_4$
|
|
403
|
-
const _sfc_main$
|
|
399
|
+
const _hoisted_1$v = { style: { "display": "flex", "margin-bottom": "10px" } };
|
|
400
|
+
const _hoisted_2$n = { style: { "flex": "1" } };
|
|
401
|
+
const _hoisted_3$a = { style: { "flex": "1" } };
|
|
402
|
+
const _hoisted_4$6 = { class: "dialog-footer" };
|
|
403
|
+
const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
404
404
|
...{
|
|
405
405
|
name: "MEditorCodeBlockEditor"
|
|
406
406
|
},
|
|
@@ -408,7 +408,8 @@
|
|
|
408
408
|
props: {
|
|
409
409
|
content: {},
|
|
410
410
|
disabled: { type: Boolean },
|
|
411
|
-
isDataSource: { type: Boolean }
|
|
411
|
+
isDataSource: { type: Boolean },
|
|
412
|
+
dataSourceType: {}
|
|
412
413
|
},
|
|
413
414
|
emits: ["submit"],
|
|
414
415
|
setup(__props, { expose: __expose, emit }) {
|
|
@@ -468,7 +469,8 @@
|
|
|
468
469
|
const functionConfig = vue.computed(() => [
|
|
469
470
|
{
|
|
470
471
|
text: "名称",
|
|
471
|
-
name: "name"
|
|
472
|
+
name: "name",
|
|
473
|
+
rules: [{ required: true, message: "请输入名称", trigger: "blur" }]
|
|
472
474
|
},
|
|
473
475
|
{
|
|
474
476
|
text: "描述",
|
|
@@ -478,10 +480,17 @@
|
|
|
478
480
|
text: "执行时机",
|
|
479
481
|
name: "timing",
|
|
480
482
|
type: "select",
|
|
481
|
-
options:
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
483
|
+
options: () => {
|
|
484
|
+
const options = [
|
|
485
|
+
{ text: "初始化前", value: "beforeInit" },
|
|
486
|
+
{ text: "初始化后", value: "afterInit" }
|
|
487
|
+
];
|
|
488
|
+
if (props.dataSourceType !== "base") {
|
|
489
|
+
options.push({ text: "请求前", value: "beforeRequest" });
|
|
490
|
+
options.push({ text: "请求后", value: "afterRequest" });
|
|
491
|
+
}
|
|
492
|
+
return options;
|
|
493
|
+
},
|
|
485
494
|
display: () => props.isDataSource
|
|
486
495
|
},
|
|
487
496
|
{
|
|
@@ -610,7 +619,7 @@
|
|
|
610
619
|
fullscreen: ""
|
|
611
620
|
}, {
|
|
612
621
|
footer: vue.withCtx(() => [
|
|
613
|
-
vue.createElementVNode("span", _hoisted_4$
|
|
622
|
+
vue.createElementVNode("span", _hoisted_4$6, [
|
|
614
623
|
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
615
624
|
size: "small",
|
|
616
625
|
onClick: _cache[1] || (_cache[1] = ($event) => difVisible.value = false)
|
|
@@ -633,8 +642,8 @@
|
|
|
633
642
|
])
|
|
634
643
|
]),
|
|
635
644
|
default: vue.withCtx(() => [
|
|
636
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
637
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
645
|
+
vue.createElementVNode("div", _hoisted_1$v, [
|
|
646
|
+
vue.createElementVNode("div", _hoisted_2$n, [
|
|
638
647
|
vue.createVNode(vue.unref(design.TMagicTag), {
|
|
639
648
|
size: "small",
|
|
640
649
|
type: "info"
|
|
@@ -645,7 +654,7 @@
|
|
|
645
654
|
_: 1
|
|
646
655
|
})
|
|
647
656
|
]),
|
|
648
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
657
|
+
vue.createElementVNode("div", _hoisted_3$a, [
|
|
649
658
|
vue.createVNode(vue.unref(design.TMagicTag), {
|
|
650
659
|
size: "small",
|
|
651
660
|
type: "success"
|
|
@@ -657,7 +666,7 @@
|
|
|
657
666
|
})
|
|
658
667
|
])
|
|
659
668
|
]),
|
|
660
|
-
difVisible.value ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
669
|
+
difVisible.value ? (vue.openBlock(), vue.createBlock(_sfc_main$Q, {
|
|
661
670
|
key: 0,
|
|
662
671
|
ref_key: "magicVsEditor",
|
|
663
672
|
ref: magicVsEditor,
|
|
@@ -711,6 +720,15 @@
|
|
|
711
720
|
type: "switch",
|
|
712
721
|
defaultValue: true
|
|
713
722
|
},
|
|
723
|
+
{
|
|
724
|
+
name: "responseOptions",
|
|
725
|
+
items: [
|
|
726
|
+
{
|
|
727
|
+
name: "dataPath",
|
|
728
|
+
text: "数据路径"
|
|
729
|
+
}
|
|
730
|
+
]
|
|
731
|
+
},
|
|
714
732
|
{
|
|
715
733
|
type: "fieldset",
|
|
716
734
|
name: "options",
|
|
@@ -777,6 +795,18 @@
|
|
|
777
795
|
defaultValue: () => []
|
|
778
796
|
}
|
|
779
797
|
]
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
type: "panel",
|
|
801
|
+
title: "事件配置",
|
|
802
|
+
display: false,
|
|
803
|
+
items: [
|
|
804
|
+
{
|
|
805
|
+
name: "events",
|
|
806
|
+
src: "datasource",
|
|
807
|
+
type: "event-select"
|
|
808
|
+
}
|
|
809
|
+
]
|
|
780
810
|
}
|
|
781
811
|
];
|
|
782
812
|
const getFormConfig = (type, configs) => {
|
|
@@ -957,7 +987,8 @@
|
|
|
957
987
|
dataSources: [],
|
|
958
988
|
editable: true,
|
|
959
989
|
configs: {},
|
|
960
|
-
values: {}
|
|
990
|
+
values: {},
|
|
991
|
+
events: {}
|
|
961
992
|
});
|
|
962
993
|
set(name, value) {
|
|
963
994
|
this.state[name] = value;
|
|
@@ -977,6 +1008,12 @@
|
|
|
977
1008
|
setFormValue(type, value) {
|
|
978
1009
|
this.get("values")[type] = value;
|
|
979
1010
|
}
|
|
1011
|
+
getFormEvent(type = "base") {
|
|
1012
|
+
return this.get("events")[type] || [];
|
|
1013
|
+
}
|
|
1014
|
+
setFormEvent(type, value = []) {
|
|
1015
|
+
this.get("events")[type] = value;
|
|
1016
|
+
}
|
|
980
1017
|
add(config) {
|
|
981
1018
|
const newConfig = {
|
|
982
1019
|
...config,
|
|
@@ -1193,6 +1230,7 @@
|
|
|
1193
1230
|
items: [
|
|
1194
1231
|
{
|
|
1195
1232
|
name: "events",
|
|
1233
|
+
src: "component",
|
|
1196
1234
|
type: "event-select"
|
|
1197
1235
|
}
|
|
1198
1236
|
]
|
|
@@ -1263,21 +1301,28 @@
|
|
|
1263
1301
|
items: [
|
|
1264
1302
|
{
|
|
1265
1303
|
name: "value",
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1304
|
+
type: (mForm, { model }) => {
|
|
1305
|
+
const [id, field] = model.field;
|
|
1306
|
+
const ds = dataSourceService.getDataSourceById(id);
|
|
1307
|
+
const type = ds?.fields.find((f) => f.name === field)?.type;
|
|
1308
|
+
if (type === "number") {
|
|
1309
|
+
return "number";
|
|
1310
|
+
}
|
|
1311
|
+
if (type === "boolean") {
|
|
1312
|
+
return "select";
|
|
1313
|
+
}
|
|
1314
|
+
return "text";
|
|
1315
|
+
},
|
|
1271
1316
|
options: [
|
|
1272
1317
|
{ text: "true", value: true },
|
|
1273
1318
|
{ text: "false", value: false }
|
|
1274
1319
|
],
|
|
1275
|
-
display: (vm, { model }) => ["
|
|
1320
|
+
display: (vm, { model }) => !["between", "not_between"].includes(model.op)
|
|
1276
1321
|
},
|
|
1277
1322
|
{
|
|
1278
1323
|
name: "range",
|
|
1279
1324
|
type: "number-range",
|
|
1280
|
-
display: (vm, { model }) => ["between", "not_between"].includes(model.op)
|
|
1325
|
+
display: (vm, { model }) => ["between", "not_between"].includes(model.op)
|
|
1281
1326
|
}
|
|
1282
1327
|
]
|
|
1283
1328
|
}
|
|
@@ -2757,7 +2802,7 @@
|
|
|
2757
2802
|
return newNode;
|
|
2758
2803
|
};
|
|
2759
2804
|
|
|
2760
|
-
const _sfc_main$
|
|
2805
|
+
const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
|
|
2761
2806
|
...{
|
|
2762
2807
|
name: "MEditorCodeParams"
|
|
2763
2808
|
},
|
|
@@ -2806,8 +2851,8 @@
|
|
|
2806
2851
|
}
|
|
2807
2852
|
});
|
|
2808
2853
|
|
|
2809
|
-
const _hoisted_1$
|
|
2810
|
-
const _sfc_main$
|
|
2854
|
+
const _hoisted_1$u = ["src"];
|
|
2855
|
+
const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
|
|
2811
2856
|
...{
|
|
2812
2857
|
name: "MEditorIcon"
|
|
2813
2858
|
},
|
|
@@ -2830,7 +2875,7 @@
|
|
|
2830
2875
|
class: "magic-editor-icon"
|
|
2831
2876
|
}, {
|
|
2832
2877
|
default: vue.withCtx(() => [
|
|
2833
|
-
vue.createElementVNode("img", { src: _ctx.icon }, null, 8, _hoisted_1$
|
|
2878
|
+
vue.createElementVNode("img", { src: _ctx.icon }, null, 8, _hoisted_1$u)
|
|
2834
2879
|
]),
|
|
2835
2880
|
_: 1
|
|
2836
2881
|
})) : typeof _ctx.icon === "string" ? (vue.openBlock(), vue.createElementBlock("i", {
|
|
@@ -2907,9 +2952,9 @@
|
|
|
2907
2952
|
};
|
|
2908
2953
|
};
|
|
2909
2954
|
|
|
2910
|
-
const _hoisted_1$
|
|
2911
|
-
const _hoisted_2$
|
|
2912
|
-
const _sfc_main$
|
|
2955
|
+
const _hoisted_1$t = { class: "m-fields-code-select-col" };
|
|
2956
|
+
const _hoisted_2$m = { class: "code-select-container" };
|
|
2957
|
+
const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
|
|
2913
2958
|
...{
|
|
2914
2959
|
name: "MEditorCodeSelectCol"
|
|
2915
2960
|
},
|
|
@@ -2983,22 +3028,22 @@
|
|
|
2983
3028
|
const { codeBlockEditor, codeConfig, editCode, submitCodeBlockHandler } = useCodeBlockEdit(services?.codeBlockService);
|
|
2984
3029
|
return (_ctx, _cache) => {
|
|
2985
3030
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
2986
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2987
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3031
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$t, [
|
|
3032
|
+
vue.createElementVNode("div", _hoisted_2$m, [
|
|
2988
3033
|
vue.createVNode(_component_m_form_container, {
|
|
2989
3034
|
class: "select",
|
|
2990
3035
|
config: selectConfig,
|
|
2991
3036
|
model: _ctx.model,
|
|
2992
3037
|
onChange: onParamsChangeHandler
|
|
2993
3038
|
}, null, 8, ["model"]),
|
|
2994
|
-
_ctx.model[_ctx.name] ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3039
|
+
_ctx.model[_ctx.name] ? (vue.openBlock(), vue.createBlock(_sfc_main$K, {
|
|
2995
3040
|
key: 0,
|
|
2996
3041
|
class: "icon",
|
|
2997
3042
|
icon: !_ctx.disabled ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
|
|
2998
3043
|
onClick: _cache[0] || (_cache[0] = ($event) => vue.unref(editCode)(_ctx.model[_ctx.name]))
|
|
2999
3044
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true)
|
|
3000
3045
|
]),
|
|
3001
|
-
paramsConfig.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3046
|
+
paramsConfig.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$L, {
|
|
3002
3047
|
key: 0,
|
|
3003
3048
|
name: "params",
|
|
3004
3049
|
model: _ctx.model,
|
|
@@ -3006,7 +3051,7 @@
|
|
|
3006
3051
|
"params-config": paramsConfig.value,
|
|
3007
3052
|
onChange: onParamsChangeHandler
|
|
3008
3053
|
}, null, 8, ["model", "size", "params-config"])) : vue.createCommentVNode("", true),
|
|
3009
|
-
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3054
|
+
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$M, {
|
|
3010
3055
|
key: 1,
|
|
3011
3056
|
ref_key: "codeBlockEditor",
|
|
3012
3057
|
ref: codeBlockEditor,
|
|
@@ -3019,9 +3064,9 @@
|
|
|
3019
3064
|
}
|
|
3020
3065
|
});
|
|
3021
3066
|
|
|
3022
|
-
const _hoisted_1$
|
|
3023
|
-
const _hoisted_2$
|
|
3024
|
-
const _sfc_main$
|
|
3067
|
+
const _hoisted_1$s = { class: "m-editor-data-source-fields" };
|
|
3068
|
+
const _hoisted_2$l = { class: "m-editor-data-source-fields-footer" };
|
|
3069
|
+
const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
|
|
3025
3070
|
...{
|
|
3026
3071
|
name: "MEditorDataSourceFields"
|
|
3027
3072
|
},
|
|
@@ -3156,7 +3201,18 @@
|
|
|
3156
3201
|
},
|
|
3157
3202
|
{
|
|
3158
3203
|
name: "defaultValue",
|
|
3159
|
-
text: "默认值"
|
|
3204
|
+
text: "默认值",
|
|
3205
|
+
type: (mForm, { model }) => {
|
|
3206
|
+
if (model.type === "number")
|
|
3207
|
+
return "number";
|
|
3208
|
+
if (model.type === "boolean")
|
|
3209
|
+
return "select";
|
|
3210
|
+
return "text";
|
|
3211
|
+
},
|
|
3212
|
+
options: [
|
|
3213
|
+
{ text: "true", value: true },
|
|
3214
|
+
{ text: "false", value: false }
|
|
3215
|
+
]
|
|
3160
3216
|
},
|
|
3161
3217
|
{
|
|
3162
3218
|
name: "enable",
|
|
@@ -3172,12 +3228,12 @@
|
|
|
3172
3228
|
}
|
|
3173
3229
|
];
|
|
3174
3230
|
return (_ctx, _cache) => {
|
|
3175
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
3231
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$s, [
|
|
3176
3232
|
vue.createVNode(vue.unref(table.MagicTable), {
|
|
3177
3233
|
data: _ctx.model[_ctx.name],
|
|
3178
3234
|
columns: fieldColumns
|
|
3179
3235
|
}, null, 8, ["data"]),
|
|
3180
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3236
|
+
vue.createElementVNode("div", _hoisted_2$l, [
|
|
3181
3237
|
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
3182
3238
|
size: "small",
|
|
3183
3239
|
type: "primary",
|
|
@@ -3208,7 +3264,7 @@
|
|
|
3208
3264
|
}
|
|
3209
3265
|
});
|
|
3210
3266
|
|
|
3211
|
-
const _sfc_main$
|
|
3267
|
+
const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
|
|
3212
3268
|
__name: "DataSourceFieldSelect",
|
|
3213
3269
|
props: {
|
|
3214
3270
|
config: {},
|
|
@@ -3255,10 +3311,10 @@
|
|
|
3255
3311
|
}
|
|
3256
3312
|
});
|
|
3257
3313
|
|
|
3258
|
-
const _hoisted_1$
|
|
3259
|
-
const _hoisted_2$
|
|
3260
|
-
const _hoisted_3$
|
|
3261
|
-
const _sfc_main$
|
|
3314
|
+
const _hoisted_1$r = { style: { "display": "flex", "flex-direction": "column", "line-height": "1.2em" } };
|
|
3315
|
+
const _hoisted_2$k = { style: { "font-size": "10px", "color": "rgba(0, 0, 0, 0.6)" } };
|
|
3316
|
+
const _hoisted_3$9 = { class: "el-input__inner" };
|
|
3317
|
+
const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
|
|
3262
3318
|
...{
|
|
3263
3319
|
name: "MEditorDataSourceInput"
|
|
3264
3320
|
},
|
|
@@ -3447,12 +3503,12 @@
|
|
|
3447
3503
|
}
|
|
3448
3504
|
), {
|
|
3449
3505
|
suffix: vue.withCtx(() => [
|
|
3450
|
-
vue.createVNode(_sfc_main$
|
|
3506
|
+
vue.createVNode(_sfc_main$K, { icon: vue.unref(iconsVue.Coin) }, null, 8, ["icon"])
|
|
3451
3507
|
]),
|
|
3452
3508
|
default: vue.withCtx(({ item }) => [
|
|
3453
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
3509
|
+
vue.createElementVNode("div", _hoisted_1$r, [
|
|
3454
3510
|
vue.createElementVNode("div", null, vue.toDisplayString(item.text), 1),
|
|
3455
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
3511
|
+
vue.createElementVNode("span", _hoisted_2$k, vue.toDisplayString(item.value), 1)
|
|
3456
3512
|
])
|
|
3457
3513
|
]),
|
|
3458
3514
|
_: 1
|
|
@@ -3464,7 +3520,7 @@
|
|
|
3464
3520
|
vue.createElementVNode("div", {
|
|
3465
3521
|
class: vue.normalizeClass(`tmagic-data-source-input-text-wrapper el-input__wrapper ${isFocused.value ? " is-focus" : ""}`)
|
|
3466
3522
|
}, [
|
|
3467
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
3523
|
+
vue.createElementVNode("div", _hoisted_3$9, [
|
|
3468
3524
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(displayState.value, (item, index) => {
|
|
3469
3525
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
3470
3526
|
item.type === "text" ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
@@ -3482,7 +3538,7 @@
|
|
|
3482
3538
|
}, 1032, ["size"])) : vue.createCommentVNode("", true)
|
|
3483
3539
|
], 64);
|
|
3484
3540
|
}), 256)),
|
|
3485
|
-
vue.createVNode(_sfc_main$
|
|
3541
|
+
vue.createVNode(_sfc_main$K, {
|
|
3486
3542
|
class: "tmagic-data-source-input-icon",
|
|
3487
3543
|
icon: vue.unref(iconsVue.Coin)
|
|
3488
3544
|
}, null, 8, ["icon"])
|
|
@@ -3565,9 +3621,9 @@
|
|
|
3565
3621
|
};
|
|
3566
3622
|
};
|
|
3567
3623
|
|
|
3568
|
-
const _hoisted_1$
|
|
3569
|
-
const _hoisted_2$
|
|
3570
|
-
const _sfc_main$
|
|
3624
|
+
const _hoisted_1$q = { class: "m-editor-data-source-methods" };
|
|
3625
|
+
const _hoisted_2$j = { class: "m-editor-data-source-methods-footer" };
|
|
3626
|
+
const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
3571
3627
|
...{
|
|
3572
3628
|
name: "MEditorDataSourceMethods"
|
|
3573
3629
|
},
|
|
@@ -3636,12 +3692,12 @@
|
|
|
3636
3692
|
emit("change", props.model[props.name]);
|
|
3637
3693
|
};
|
|
3638
3694
|
return (_ctx, _cache) => {
|
|
3639
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
3695
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$q, [
|
|
3640
3696
|
vue.createVNode(vue.unref(table.MagicTable), {
|
|
3641
3697
|
data: _ctx.model[_ctx.name],
|
|
3642
3698
|
columns: methodColumns
|
|
3643
3699
|
}, null, 8, ["data"]),
|
|
3644
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3700
|
+
vue.createElementVNode("div", _hoisted_2$j, [
|
|
3645
3701
|
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
3646
3702
|
size: "small",
|
|
3647
3703
|
type: "primary",
|
|
@@ -3655,23 +3711,24 @@
|
|
|
3655
3711
|
_: 1
|
|
3656
3712
|
}, 8, ["disabled"])
|
|
3657
3713
|
]),
|
|
3658
|
-
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3714
|
+
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$M, {
|
|
3659
3715
|
key: 0,
|
|
3660
3716
|
ref_key: "codeBlockEditor",
|
|
3661
3717
|
ref: codeBlockEditor,
|
|
3662
3718
|
disabled: _ctx.disabled,
|
|
3663
3719
|
content: vue.unref(codeConfig),
|
|
3664
3720
|
"is-data-source": true,
|
|
3721
|
+
"data-source-type": _ctx.model.type,
|
|
3665
3722
|
onSubmit: submitCodeHandler
|
|
3666
|
-
}, null, 8, ["disabled", "content"])) : vue.createCommentVNode("", true)
|
|
3723
|
+
}, null, 8, ["disabled", "content", "data-source-type"])) : vue.createCommentVNode("", true)
|
|
3667
3724
|
]);
|
|
3668
3725
|
};
|
|
3669
3726
|
}
|
|
3670
3727
|
});
|
|
3671
3728
|
|
|
3672
|
-
const _hoisted_1$
|
|
3673
|
-
const _hoisted_2$
|
|
3674
|
-
const _sfc_main$
|
|
3729
|
+
const _hoisted_1$p = { class: "m-fields-data-source-method-select" };
|
|
3730
|
+
const _hoisted_2$i = { class: "data-source-method-select-container" };
|
|
3731
|
+
const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
3675
3732
|
...{
|
|
3676
3733
|
name: "MEditorDataSourceMethodSelect"
|
|
3677
3734
|
},
|
|
@@ -3749,22 +3806,22 @@
|
|
|
3749
3806
|
};
|
|
3750
3807
|
return (_ctx, _cache) => {
|
|
3751
3808
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
3752
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
3753
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3809
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$p, [
|
|
3810
|
+
vue.createElementVNode("div", _hoisted_2$i, [
|
|
3754
3811
|
vue.createVNode(_component_m_form_container, {
|
|
3755
3812
|
class: "select",
|
|
3756
3813
|
config: cascaderConfig,
|
|
3757
3814
|
model: _ctx.model,
|
|
3758
3815
|
onChange: onChangeHandler
|
|
3759
3816
|
}, null, 8, ["model"]),
|
|
3760
|
-
_ctx.model[_ctx.name] ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3817
|
+
_ctx.model[_ctx.name] ? (vue.openBlock(), vue.createBlock(_sfc_main$K, {
|
|
3761
3818
|
key: 0,
|
|
3762
3819
|
class: "icon",
|
|
3763
3820
|
icon: !_ctx.disabled ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
|
|
3764
3821
|
onClick: editCodeHandler
|
|
3765
3822
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true)
|
|
3766
3823
|
]),
|
|
3767
|
-
paramsConfig.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3824
|
+
paramsConfig.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$L, {
|
|
3768
3825
|
key: 0,
|
|
3769
3826
|
name: "params",
|
|
3770
3827
|
model: _ctx.model,
|
|
@@ -3773,7 +3830,7 @@
|
|
|
3773
3830
|
"params-config": paramsConfig.value,
|
|
3774
3831
|
onChange: onChangeHandler
|
|
3775
3832
|
}, null, 8, ["model", "size", "disabled", "params-config"])) : vue.createCommentVNode("", true),
|
|
3776
|
-
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3833
|
+
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$M, {
|
|
3777
3834
|
key: 1,
|
|
3778
3835
|
ref_key: "codeBlockEditor",
|
|
3779
3836
|
ref: codeBlockEditor,
|
|
@@ -3786,7 +3843,7 @@
|
|
|
3786
3843
|
}
|
|
3787
3844
|
});
|
|
3788
3845
|
|
|
3789
|
-
const _sfc_main$
|
|
3846
|
+
const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
3790
3847
|
...{
|
|
3791
3848
|
name: "MEditorDataSourceSelect"
|
|
3792
3849
|
},
|
|
@@ -3841,12 +3898,12 @@
|
|
|
3841
3898
|
}
|
|
3842
3899
|
});
|
|
3843
3900
|
|
|
3844
|
-
const _hoisted_1$
|
|
3845
|
-
const _hoisted_2$
|
|
3901
|
+
const _hoisted_1$o = { class: "m-fields-event-select" };
|
|
3902
|
+
const _hoisted_2$h = {
|
|
3846
3903
|
key: 1,
|
|
3847
3904
|
class: "fullWidth"
|
|
3848
3905
|
};
|
|
3849
|
-
const _sfc_main$
|
|
3906
|
+
const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
3850
3907
|
...{
|
|
3851
3908
|
name: "MEditorEventSelect"
|
|
3852
3909
|
},
|
|
@@ -3872,10 +3929,20 @@
|
|
|
3872
3929
|
text: "事件",
|
|
3873
3930
|
type: "select",
|
|
3874
3931
|
labelWidth: "40px",
|
|
3875
|
-
options: (mForm, { formValue }) =>
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3932
|
+
options: (mForm, { formValue }) => {
|
|
3933
|
+
let events = [];
|
|
3934
|
+
if (!services)
|
|
3935
|
+
return events;
|
|
3936
|
+
if (props.config.src === "component") {
|
|
3937
|
+
events = services.eventsService.getEvent(formValue.type);
|
|
3938
|
+
} else if (props.config.src === "datasource") {
|
|
3939
|
+
events = services.dataSourceService.getFormEvent(formValue.type);
|
|
3940
|
+
}
|
|
3941
|
+
return events.map((option) => ({
|
|
3942
|
+
text: option.label,
|
|
3943
|
+
value: option.value
|
|
3944
|
+
}));
|
|
3945
|
+
}
|
|
3879
3946
|
};
|
|
3880
3947
|
return { ...defaultEventNameConfig, ...props.config.eventNameConfig };
|
|
3881
3948
|
});
|
|
@@ -4036,7 +4103,7 @@
|
|
|
4036
4103
|
const _component_m_form_table = vue.resolveComponent("m-form-table");
|
|
4037
4104
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
4038
4105
|
const _component_m_form_panel = vue.resolveComponent("m-form-panel");
|
|
4039
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
4106
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$o, [
|
|
4040
4107
|
isOldVersion.value ? (vue.openBlock(), vue.createBlock(_component_m_form_table, {
|
|
4041
4108
|
key: 0,
|
|
4042
4109
|
ref: "eventForm",
|
|
@@ -4046,7 +4113,7 @@
|
|
|
4046
4113
|
model: _ctx.model,
|
|
4047
4114
|
config: tableConfig.value,
|
|
4048
4115
|
onChange: onChangeHandler
|
|
4049
|
-
}, null, 8, ["size", "disabled", "model", "config"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
4116
|
+
}, null, 8, ["size", "disabled", "model", "config"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$h, [
|
|
4050
4117
|
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
4051
4118
|
class: "create-button",
|
|
4052
4119
|
type: "primary",
|
|
@@ -4095,9 +4162,9 @@
|
|
|
4095
4162
|
}
|
|
4096
4163
|
});
|
|
4097
4164
|
|
|
4098
|
-
const _hoisted_1$
|
|
4099
|
-
const _hoisted_2$
|
|
4100
|
-
const _sfc_main$
|
|
4165
|
+
const _hoisted_1$n = { class: "m-fields-key-value" };
|
|
4166
|
+
const _hoisted_2$g = /* @__PURE__ */ vue.createElementVNode("span", { class: "m-fileds-key-value-delimiter" }, ":", -1);
|
|
4167
|
+
const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
|
|
4101
4168
|
...{
|
|
4102
4169
|
name: "MEditorKeyValue"
|
|
4103
4170
|
},
|
|
@@ -4142,7 +4209,7 @@
|
|
|
4142
4209
|
records.value.splice(index, 1);
|
|
4143
4210
|
};
|
|
4144
4211
|
return (_ctx, _cache) => {
|
|
4145
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
4212
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$n, [
|
|
4146
4213
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(records.value, (item, index) => {
|
|
4147
4214
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
4148
4215
|
class: "m-fields-key-value-item",
|
|
@@ -4156,7 +4223,7 @@
|
|
|
4156
4223
|
size: _ctx.size,
|
|
4157
4224
|
onChange: keyChangeHandler
|
|
4158
4225
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "size"]),
|
|
4159
|
-
_hoisted_2$
|
|
4226
|
+
_hoisted_2$g,
|
|
4160
4227
|
vue.createVNode(vue.unref(design.TMagicInput), {
|
|
4161
4228
|
placeholder: "value",
|
|
4162
4229
|
modelValue: records.value[index][1],
|
|
@@ -4195,12 +4262,12 @@
|
|
|
4195
4262
|
}
|
|
4196
4263
|
});
|
|
4197
4264
|
|
|
4198
|
-
const _hoisted_1$
|
|
4265
|
+
const _hoisted_1$m = {
|
|
4199
4266
|
key: 1,
|
|
4200
4267
|
class: "m-fields-ui-select",
|
|
4201
4268
|
style: { "display": "flex" }
|
|
4202
4269
|
};
|
|
4203
|
-
const _sfc_main$
|
|
4270
|
+
const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
|
|
4204
4271
|
...{
|
|
4205
4272
|
name: "MEditorUISelect"
|
|
4206
4273
|
},
|
|
@@ -4289,7 +4356,7 @@
|
|
|
4289
4356
|
]),
|
|
4290
4357
|
_: 1
|
|
4291
4358
|
}, 8, ["icon", "disabled", "size"])
|
|
4292
|
-
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
4359
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$m, [
|
|
4293
4360
|
val.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
4294
4361
|
vue.createVNode(vue.unref(design.TMagicTooltip), {
|
|
4295
4362
|
content: "清除",
|
|
@@ -4358,7 +4425,35 @@
|
|
|
4358
4425
|
|
|
4359
4426
|
const UISelect_vue_vue_type_style_index_0_lang = '';
|
|
4360
4427
|
|
|
4361
|
-
const
|
|
4428
|
+
const useGetSo = (target, emit) => {
|
|
4429
|
+
let getso;
|
|
4430
|
+
const isDraging = vue.ref(false);
|
|
4431
|
+
vue.onMounted(() => {
|
|
4432
|
+
if (!target.value)
|
|
4433
|
+
return;
|
|
4434
|
+
getso = new Gesto(target.value, {
|
|
4435
|
+
container: window,
|
|
4436
|
+
pinchOutside: true
|
|
4437
|
+
}).on("drag", (e) => {
|
|
4438
|
+
if (!target.value)
|
|
4439
|
+
return;
|
|
4440
|
+
emit("change", e);
|
|
4441
|
+
}).on("dragStart", () => {
|
|
4442
|
+
isDraging.value = true;
|
|
4443
|
+
}).on("dragEnd", () => {
|
|
4444
|
+
isDraging.value = false;
|
|
4445
|
+
});
|
|
4446
|
+
});
|
|
4447
|
+
vue.onUnmounted(() => {
|
|
4448
|
+
getso?.unset();
|
|
4449
|
+
isDraging.value = false;
|
|
4450
|
+
});
|
|
4451
|
+
return {
|
|
4452
|
+
isDraging
|
|
4453
|
+
};
|
|
4454
|
+
};
|
|
4455
|
+
|
|
4456
|
+
const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
|
|
4362
4457
|
...{
|
|
4363
4458
|
name: "MEditorResizer"
|
|
4364
4459
|
},
|
|
@@ -4366,33 +4461,12 @@
|
|
|
4366
4461
|
emits: ["change"],
|
|
4367
4462
|
setup(__props, { emit }) {
|
|
4368
4463
|
const target = vue.ref();
|
|
4369
|
-
const isDraging =
|
|
4370
|
-
let getso;
|
|
4371
|
-
vue.onMounted(() => {
|
|
4372
|
-
if (!target.value)
|
|
4373
|
-
return;
|
|
4374
|
-
getso = new Gesto(target.value, {
|
|
4375
|
-
container: window,
|
|
4376
|
-
pinchOutside: true
|
|
4377
|
-
}).on("drag", (e) => {
|
|
4378
|
-
if (!target.value)
|
|
4379
|
-
return;
|
|
4380
|
-
emit("change", e.deltaX);
|
|
4381
|
-
}).on("dragStart", () => {
|
|
4382
|
-
isDraging.value = true;
|
|
4383
|
-
}).on("dragEnd", () => {
|
|
4384
|
-
isDraging.value = false;
|
|
4385
|
-
});
|
|
4386
|
-
});
|
|
4387
|
-
vue.onUnmounted(() => {
|
|
4388
|
-
getso?.unset();
|
|
4389
|
-
isDraging.value = false;
|
|
4390
|
-
});
|
|
4464
|
+
const { isDraging } = useGetSo(target, emit);
|
|
4391
4465
|
return (_ctx, _cache) => {
|
|
4392
4466
|
return vue.openBlock(), vue.createElementBlock("span", {
|
|
4393
4467
|
ref_key: "target",
|
|
4394
4468
|
ref: target,
|
|
4395
|
-
class: vue.normalizeClass(["m-editor-resizer", { "m-editor-resizer-draging": isDraging
|
|
4469
|
+
class: vue.normalizeClass(["m-editor-resizer", { "m-editor-resizer-draging": vue.unref(isDraging) }])
|
|
4396
4470
|
}, [
|
|
4397
4471
|
vue.renderSlot(_ctx.$slots, "default")
|
|
4398
4472
|
], 2);
|
|
@@ -4400,7 +4474,7 @@
|
|
|
4400
4474
|
}
|
|
4401
4475
|
});
|
|
4402
4476
|
|
|
4403
|
-
const _sfc_main$
|
|
4477
|
+
const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
4404
4478
|
...{
|
|
4405
4479
|
name: "MEditorLayout"
|
|
4406
4480
|
},
|
|
@@ -4467,7 +4541,7 @@
|
|
|
4467
4541
|
resizerObserver.disconnect();
|
|
4468
4542
|
});
|
|
4469
4543
|
const center = vue.ref(0);
|
|
4470
|
-
const changeLeft = (deltaX) => {
|
|
4544
|
+
const changeLeft = ({ deltaX }) => {
|
|
4471
4545
|
if (typeof props.left === "undefined")
|
|
4472
4546
|
return;
|
|
4473
4547
|
let left = Math.max(props.left + deltaX, props.minLeft) || 0;
|
|
@@ -4483,7 +4557,7 @@
|
|
|
4483
4557
|
right: columnWidth.right
|
|
4484
4558
|
});
|
|
4485
4559
|
};
|
|
4486
|
-
const changeRight = (deltaX) => {
|
|
4560
|
+
const changeRight = ({ deltaX }) => {
|
|
4487
4561
|
if (typeof props.right === "undefined")
|
|
4488
4562
|
return;
|
|
4489
4563
|
let right = Math.max(props.right - deltaX, props.minRight) || 0;
|
|
@@ -4512,7 +4586,7 @@
|
|
|
4512
4586
|
}, [
|
|
4513
4587
|
vue.renderSlot(_ctx.$slots, "left")
|
|
4514
4588
|
], 6),
|
|
4515
|
-
vue.createVNode(_sfc_main$
|
|
4589
|
+
vue.createVNode(_sfc_main$z, { onChange: changeLeft })
|
|
4516
4590
|
], 64)) : vue.createCommentVNode("", true),
|
|
4517
4591
|
vue.createElementVNode("div", {
|
|
4518
4592
|
class: vue.normalizeClass(["m-editor-layout-center", _ctx.centerClass]),
|
|
@@ -4521,7 +4595,7 @@
|
|
|
4521
4595
|
vue.renderSlot(_ctx.$slots, "center")
|
|
4522
4596
|
], 6),
|
|
4523
4597
|
hasRight.value && _ctx.$slots.right ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
4524
|
-
vue.createVNode(_sfc_main$
|
|
4598
|
+
vue.createVNode(_sfc_main$z, { onChange: changeRight }),
|
|
4525
4599
|
vue.createElementVNode("div", {
|
|
4526
4600
|
class: vue.normalizeClass(["m-editor-layout-right", _ctx.rightClass]),
|
|
4527
4601
|
style: vue.normalizeStyle(`width: ${_ctx.right}px`)
|
|
@@ -4534,10 +4608,10 @@
|
|
|
4534
4608
|
}
|
|
4535
4609
|
});
|
|
4536
4610
|
|
|
4537
|
-
const _hoisted_1$
|
|
4538
|
-
const _hoisted_2$
|
|
4539
|
-
const _hoisted_3$
|
|
4540
|
-
const _sfc_main$
|
|
4611
|
+
const _hoisted_1$l = { class: "m-editor-empty-panel" };
|
|
4612
|
+
const _hoisted_2$f = { class: "m-editor-empty-content" };
|
|
4613
|
+
const _hoisted_3$8 = /* @__PURE__ */ vue.createElementVNode("p", null, "新增页面", -1);
|
|
4614
|
+
const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
|
|
4541
4615
|
...{
|
|
4542
4616
|
name: "MEditorAddPageBox"
|
|
4543
4617
|
},
|
|
@@ -4557,16 +4631,16 @@
|
|
|
4557
4631
|
});
|
|
4558
4632
|
};
|
|
4559
4633
|
return (_ctx, _cache) => {
|
|
4560
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
4561
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
4634
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$l, [
|
|
4635
|
+
vue.createElementVNode("div", _hoisted_2$f, [
|
|
4562
4636
|
vue.createElementVNode("div", {
|
|
4563
4637
|
class: "m-editor-empty-button",
|
|
4564
4638
|
onClick: clickHandler
|
|
4565
4639
|
}, [
|
|
4566
4640
|
vue.createElementVNode("div", null, [
|
|
4567
|
-
vue.createVNode(_sfc_main$
|
|
4641
|
+
vue.createVNode(_sfc_main$K, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
|
|
4568
4642
|
]),
|
|
4569
|
-
_hoisted_3$
|
|
4643
|
+
_hoisted_3$8
|
|
4570
4644
|
])
|
|
4571
4645
|
])
|
|
4572
4646
|
]);
|
|
@@ -4578,7 +4652,7 @@
|
|
|
4578
4652
|
const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
|
|
4579
4653
|
const LEFT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorLeftColumnWidthData";
|
|
4580
4654
|
const RIGHT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorRightColumnWidthData";
|
|
4581
|
-
const _sfc_main$
|
|
4655
|
+
const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
|
|
4582
4656
|
...{
|
|
4583
4657
|
name: "MEditorFramework"
|
|
4584
4658
|
},
|
|
@@ -4655,13 +4729,13 @@
|
|
|
4655
4729
|
vue.renderSlot(_ctx.$slots, "nav"),
|
|
4656
4730
|
vue.renderSlot(_ctx.$slots, "content-before"),
|
|
4657
4731
|
showSrc.value ? vue.renderSlot(_ctx.$slots, "src-code", { key: 0 }, () => [
|
|
4658
|
-
vue.createVNode(_sfc_main$
|
|
4732
|
+
vue.createVNode(_sfc_main$Q, {
|
|
4659
4733
|
class: "m-editor-content",
|
|
4660
4734
|
"init-values": root.value,
|
|
4661
4735
|
options: vue.unref(codeOptions),
|
|
4662
4736
|
onSave: saveCode
|
|
4663
4737
|
}, null, 8, ["init-values", "options"])
|
|
4664
|
-
]) : (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
4738
|
+
]) : (vue.openBlock(), vue.createBlock(_sfc_main$y, {
|
|
4665
4739
|
key: 1,
|
|
4666
4740
|
class: "m-editor-content",
|
|
4667
4741
|
"left-class": "m-editor-framework-left",
|
|
@@ -4680,7 +4754,7 @@
|
|
|
4680
4754
|
]),
|
|
4681
4755
|
center: vue.withCtx(() => [
|
|
4682
4756
|
pageLength.value > 0 ? vue.renderSlot(_ctx.$slots, "workspace", { key: 0 }) : vue.renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
|
|
4683
|
-
vue.createVNode(_sfc_main$
|
|
4757
|
+
vue.createVNode(_sfc_main$x)
|
|
4684
4758
|
])
|
|
4685
4759
|
]),
|
|
4686
4760
|
_: 2
|
|
@@ -4705,12 +4779,12 @@
|
|
|
4705
4779
|
}
|
|
4706
4780
|
});
|
|
4707
4781
|
|
|
4708
|
-
const _hoisted_1$
|
|
4782
|
+
const _hoisted_1$k = {
|
|
4709
4783
|
key: 1,
|
|
4710
4784
|
class: "menu-item-text"
|
|
4711
4785
|
};
|
|
4712
|
-
const _hoisted_2$
|
|
4713
|
-
const _sfc_main$
|
|
4786
|
+
const _hoisted_2$e = { class: "el-dropdown-link menubar-menu-button" };
|
|
4787
|
+
const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
4714
4788
|
...{
|
|
4715
4789
|
name: "MEditorToolButton"
|
|
4716
4790
|
},
|
|
@@ -4789,7 +4863,7 @@
|
|
|
4789
4863
|
_ctx.data.type === "divider" ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicDivider), {
|
|
4790
4864
|
key: 0,
|
|
4791
4865
|
direction: _ctx.data.direction || "vertical"
|
|
4792
|
-
}, null, 8, ["direction"])) : _ctx.data.type === "text" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
4866
|
+
}, null, 8, ["direction"])) : _ctx.data.type === "text" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$k, vue.toDisplayString(_ctx.data.text), 1)) : _ctx.data.type === "button" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
4793
4867
|
_ctx.data.tooltip ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTooltip), {
|
|
4794
4868
|
key: 0,
|
|
4795
4869
|
effect: "dark",
|
|
@@ -4803,7 +4877,7 @@
|
|
|
4803
4877
|
disabled: disabled.value
|
|
4804
4878
|
}, {
|
|
4805
4879
|
default: vue.withCtx(() => [
|
|
4806
|
-
_ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
4880
|
+
_ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$K, {
|
|
4807
4881
|
key: 0,
|
|
4808
4882
|
icon: _ctx.data.icon
|
|
4809
4883
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
@@ -4817,17 +4891,18 @@
|
|
|
4817
4891
|
key: 1,
|
|
4818
4892
|
size: "small",
|
|
4819
4893
|
text: "",
|
|
4820
|
-
disabled: disabled.value
|
|
4894
|
+
disabled: disabled.value,
|
|
4895
|
+
title: _ctx.data.text
|
|
4821
4896
|
}, {
|
|
4822
4897
|
default: vue.withCtx(() => [
|
|
4823
|
-
_ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
4898
|
+
_ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$K, {
|
|
4824
4899
|
key: 0,
|
|
4825
4900
|
icon: _ctx.data.icon
|
|
4826
4901
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
4827
4902
|
vue.createElementVNode("span", null, vue.toDisplayString(_ctx.data.text), 1)
|
|
4828
4903
|
]),
|
|
4829
4904
|
_: 1
|
|
4830
|
-
}, 8, ["disabled"]))
|
|
4905
|
+
}, 8, ["disabled", "title"]))
|
|
4831
4906
|
], 64)) : _ctx.data.type === "dropdown" ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicDropdown), {
|
|
4832
4907
|
key: 3,
|
|
4833
4908
|
trigger: "click",
|
|
@@ -4853,7 +4928,7 @@
|
|
|
4853
4928
|
})) : vue.createCommentVNode("", true)
|
|
4854
4929
|
]),
|
|
4855
4930
|
default: vue.withCtx(() => [
|
|
4856
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
4931
|
+
vue.createElementVNode("span", _hoisted_2$e, [
|
|
4857
4932
|
vue.createTextVNode(vue.toDisplayString(_ctx.data.text), 1),
|
|
4858
4933
|
vue.createVNode(vue.unref(design.TMagicIcon), { class: "el-icon--right" }, {
|
|
4859
4934
|
default: vue.withCtx(() => [
|
|
@@ -4870,7 +4945,7 @@
|
|
|
4870
4945
|
}
|
|
4871
4946
|
});
|
|
4872
4947
|
|
|
4873
|
-
const _sfc_main$
|
|
4948
|
+
const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
4874
4949
|
...{
|
|
4875
4950
|
name: "MEditorNavMenu"
|
|
4876
4951
|
},
|
|
@@ -5032,7 +5107,7 @@
|
|
|
5032
5107
|
style: vue.normalizeStyle(`width: ${columnWidth.value?.[key]}px`)
|
|
5033
5108
|
}, [
|
|
5034
5109
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(buttons.value[key], (item, index) => {
|
|
5035
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5110
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$v, {
|
|
5036
5111
|
data: item,
|
|
5037
5112
|
key: index
|
|
5038
5113
|
}, null, 8, ["data"]);
|
|
@@ -5044,8 +5119,8 @@
|
|
|
5044
5119
|
}
|
|
5045
5120
|
});
|
|
5046
5121
|
|
|
5047
|
-
const _hoisted_1$
|
|
5048
|
-
const _sfc_main$
|
|
5122
|
+
const _hoisted_1$j = { class: "m-editor-props-panel" };
|
|
5123
|
+
const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
5049
5124
|
...{
|
|
5050
5125
|
name: "MEditorPropsPanel"
|
|
5051
5126
|
},
|
|
@@ -5098,7 +5173,7 @@
|
|
|
5098
5173
|
};
|
|
5099
5174
|
__expose({ configForm, submit });
|
|
5100
5175
|
return (_ctx, _cache) => {
|
|
5101
|
-
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
5176
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_1$j, [
|
|
5102
5177
|
vue.renderSlot(_ctx.$slots, "props-panel-header"),
|
|
5103
5178
|
vue.createVNode(vue.unref(form.MForm), {
|
|
5104
5179
|
ref_key: "configForm",
|
|
@@ -5118,7 +5193,7 @@
|
|
|
5118
5193
|
}
|
|
5119
5194
|
});
|
|
5120
5195
|
|
|
5121
|
-
const _sfc_main$
|
|
5196
|
+
const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
5122
5197
|
...{
|
|
5123
5198
|
name: "MEditorSearchInput"
|
|
5124
5199
|
},
|
|
@@ -5153,8 +5228,8 @@
|
|
|
5153
5228
|
}
|
|
5154
5229
|
});
|
|
5155
5230
|
|
|
5156
|
-
const _hoisted_1$
|
|
5157
|
-
const _hoisted_2$
|
|
5231
|
+
const _hoisted_1$i = { xmlns: "http://www.w3.org/2000/svg" };
|
|
5232
|
+
const _hoisted_2$d = /* @__PURE__ */ vue.createElementVNode("g", {
|
|
5158
5233
|
fill: "#7C878E",
|
|
5159
5234
|
"fill-rule": "evenodd"
|
|
5160
5235
|
}, [
|
|
@@ -5164,50 +5239,50 @@
|
|
|
5164
5239
|
}),
|
|
5165
5240
|
/* @__PURE__ */ vue.createElementVNode("path", { d: "M8 13.5L2.3 9.2 0.7 10.5 8 16 15.3 10.5 13.7 9.2z" })
|
|
5166
5241
|
], -1);
|
|
5167
|
-
const _hoisted_3$
|
|
5168
|
-
_hoisted_2$
|
|
5242
|
+
const _hoisted_3$7 = [
|
|
5243
|
+
_hoisted_2$d
|
|
5169
5244
|
];
|
|
5170
|
-
const _sfc_main$
|
|
5245
|
+
const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
5171
5246
|
...{
|
|
5172
5247
|
name: "MEditorAppManageIcon"
|
|
5173
5248
|
},
|
|
5174
5249
|
__name: "AppManageIcon",
|
|
5175
5250
|
setup(__props) {
|
|
5176
5251
|
return (_ctx, _cache) => {
|
|
5177
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
5252
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$i, _hoisted_3$7);
|
|
5178
5253
|
};
|
|
5179
5254
|
}
|
|
5180
5255
|
});
|
|
5181
5256
|
|
|
5182
|
-
const _hoisted_1$
|
|
5257
|
+
const _hoisted_1$h = {
|
|
5183
5258
|
viewBox: "0 0 32 32",
|
|
5184
5259
|
version: "1.1",
|
|
5185
5260
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5186
5261
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
5187
5262
|
};
|
|
5188
|
-
const _hoisted_2$
|
|
5189
|
-
const _hoisted_4$
|
|
5190
|
-
_hoisted_2$
|
|
5263
|
+
const _hoisted_2$c = /* @__PURE__ */ vue.createStaticVNode('<defs><rect id="path-1" x="0" y="0" width="32" height="32"></rect></defs><g id="组件规范" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="03图标" transform="translate(-561.000000, -2356.000000)"><g id="icon/line/Universal/code" transform="translate(561.000000, 2356.000000)"><g id="路径"><mask id="mask-2" fill="white"><use xlink:href="#path-1"></use></mask><use id="蒙版" fill="#D8D8D8" opacity="0" xlink:href="#path-1"></use><path d="M21.9284587,7.9482233 L29.8079004,15.827665 C29.9055315,15.9252961 29.9055315,16.0835874 29.8079004,16.1812184 L21.9284587,24.0606602 C21.8308276,24.1582912 21.6725364,24.1582912 21.5749053,24.0606602 L20.3374684,22.8232233 C20.2419143,22.7276698 20.2398813,22.5740096 20.331369,22.4759832 L20.3374687,22.4696702 L26.8027181,16.0044417 L20.3374687,9.53921328 C20.2398372,9.44158265 20.2398369,9.2832914 20.3374679,9.18566017 L21.5749053,7.9482233 C21.6725364,7.85059223 21.8308276,7.85059223 21.9284587,7.9482233 Z M10.3999684,7.9482233 L11.6374053,9.18566017 C11.7329594,9.28121371 11.7349925,9.43487387 11.6435048,9.53290029 L11.637405,9.53921328 L5.17215562,16.0044417 L11.637405,22.4696702 C11.7329593,22.5652236 11.7349926,22.7188837 11.643505,22.8169103 L11.6374053,22.8232233 L10.3999684,24.0606602 C10.3023374,24.1582912 10.1440461,24.1582912 10.046415,24.0606602 L2.1669733,16.1812184 C2.06934223,16.0835874 2.06934223,15.9252961 2.1669733,15.827665 L10.046415,7.9482233 C10.1440461,7.85059223 10.3023374,7.85059223 10.3999684,7.9482233 Z M17.2612532,9.29310422 L18.9262468,9.83189578 C19.0576112,9.87440526 19.1296423,10.0153579 19.0871328,10.1467222 L15.0848232,22.514807 C15.0423138,22.6461714 14.9013612,22.7182025 14.7699968,22.675693 L13.1050032,22.1369014 C12.9736388,22.0943919 12.9016077,21.9534393 12.9441172,21.822075 L16.9464268,9.45399022 C16.9889362,9.32262585 17.1298888,9.25059474 17.2612532,9.29310422 Z" id="形状" fill="#1D1F24" mask="url(#mask-2)"></path></g></g><g id="icon切图" transform="translate(226.000000, 1782.000000)"></g></g></g>', 2);
|
|
5264
|
+
const _hoisted_4$5 = [
|
|
5265
|
+
_hoisted_2$c
|
|
5191
5266
|
];
|
|
5192
|
-
const _sfc_main$
|
|
5267
|
+
const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
5193
5268
|
...{
|
|
5194
5269
|
name: "MEditorCodeIcon"
|
|
5195
5270
|
},
|
|
5196
5271
|
__name: "CodeIcon",
|
|
5197
5272
|
setup(__props) {
|
|
5198
5273
|
return (_ctx, _cache) => {
|
|
5199
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
5274
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$h, _hoisted_4$5);
|
|
5200
5275
|
};
|
|
5201
5276
|
}
|
|
5202
5277
|
});
|
|
5203
5278
|
|
|
5204
|
-
const _hoisted_1$
|
|
5205
|
-
const _hoisted_2$
|
|
5206
|
-
const _hoisted_3$
|
|
5279
|
+
const _hoisted_1$g = ["id"];
|
|
5280
|
+
const _hoisted_2$b = { class: "list-item" };
|
|
5281
|
+
const _hoisted_3$6 = {
|
|
5207
5282
|
key: 2,
|
|
5208
5283
|
class: "right-tool"
|
|
5209
5284
|
};
|
|
5210
|
-
const _sfc_main$
|
|
5285
|
+
const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
5211
5286
|
...{
|
|
5212
5287
|
name: "MEditorCodeBlockList"
|
|
5213
5288
|
},
|
|
@@ -5308,26 +5383,26 @@
|
|
|
5308
5383
|
id: data.id,
|
|
5309
5384
|
class: "list-container"
|
|
5310
5385
|
}, [
|
|
5311
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5312
|
-
data.type === "code" ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5386
|
+
vue.createElementVNode("div", _hoisted_2$b, [
|
|
5387
|
+
data.type === "code" ? (vue.openBlock(), vue.createBlock(_sfc_main$q, {
|
|
5313
5388
|
key: 0,
|
|
5314
5389
|
class: "codeIcon"
|
|
5315
5390
|
})) : vue.createCommentVNode("", true),
|
|
5316
|
-
data.type === "node" ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5391
|
+
data.type === "node" ? (vue.openBlock(), vue.createBlock(_sfc_main$r, {
|
|
5317
5392
|
key: 1,
|
|
5318
5393
|
class: "compIcon"
|
|
5319
5394
|
})) : vue.createCommentVNode("", true),
|
|
5320
5395
|
vue.createElementVNode("span", {
|
|
5321
5396
|
class: vue.normalizeClass(["name", { code: data.type === "code", hook: data.type === "key" }])
|
|
5322
5397
|
}, vue.toDisplayString(data.name) + " (" + vue.toDisplayString(data.id) + ")", 3),
|
|
5323
|
-
data.type === "code" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
5398
|
+
data.type === "code" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$6, [
|
|
5324
5399
|
vue.createVNode(vue.unref(design.TMagicTooltip), {
|
|
5325
5400
|
effect: "dark",
|
|
5326
5401
|
content: editable.value ? "编辑" : "查看",
|
|
5327
5402
|
placement: "bottom"
|
|
5328
5403
|
}, {
|
|
5329
5404
|
default: vue.withCtx(() => [
|
|
5330
|
-
vue.createVNode(_sfc_main$
|
|
5405
|
+
vue.createVNode(_sfc_main$K, {
|
|
5331
5406
|
icon: editable.value ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
|
|
5332
5407
|
class: "edit-icon",
|
|
5333
5408
|
onClick: vue.withModifiers(($event) => editCode(data.id), ["stop"])
|
|
@@ -5342,7 +5417,7 @@
|
|
|
5342
5417
|
placement: "bottom"
|
|
5343
5418
|
}, {
|
|
5344
5419
|
default: vue.withCtx(() => [
|
|
5345
|
-
vue.createVNode(_sfc_main$
|
|
5420
|
+
vue.createVNode(_sfc_main$K, {
|
|
5346
5421
|
icon: vue.unref(iconsVue.Close),
|
|
5347
5422
|
class: "edit-icon",
|
|
5348
5423
|
onClick: vue.withModifiers(($event) => deleteCode(`${data.id}`), ["stop"])
|
|
@@ -5356,7 +5431,7 @@
|
|
|
5356
5431
|
})
|
|
5357
5432
|
])) : vue.createCommentVNode("", true)
|
|
5358
5433
|
])
|
|
5359
|
-
], 8, _hoisted_1$
|
|
5434
|
+
], 8, _hoisted_1$g)
|
|
5360
5435
|
]),
|
|
5361
5436
|
_: 3
|
|
5362
5437
|
}, 8, ["default-expanded-keys", "data"]);
|
|
@@ -5364,8 +5439,8 @@
|
|
|
5364
5439
|
}
|
|
5365
5440
|
});
|
|
5366
5441
|
|
|
5367
|
-
const _hoisted_1$
|
|
5368
|
-
const _sfc_main$
|
|
5442
|
+
const _hoisted_1$f = { class: "search-wrapper" };
|
|
5443
|
+
const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
5369
5444
|
...{
|
|
5370
5445
|
name: "MEditorCodeBlockListPanel"
|
|
5371
5446
|
},
|
|
@@ -5385,8 +5460,8 @@
|
|
|
5385
5460
|
return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicScrollbar), { class: "m-editor-code-block-list m-editor-dep-list-panel" }, {
|
|
5386
5461
|
default: vue.withCtx(() => [
|
|
5387
5462
|
vue.renderSlot(_ctx.$slots, "code-block-panel-header", {}, () => [
|
|
5388
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
5389
|
-
vue.createVNode(_sfc_main$
|
|
5463
|
+
vue.createElementVNode("div", _hoisted_1$f, [
|
|
5464
|
+
vue.createVNode(_sfc_main$s, { onSearch: filterTextChangeHandler }),
|
|
5390
5465
|
editable.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
|
|
5391
5466
|
key: 0,
|
|
5392
5467
|
class: "create-code-button",
|
|
@@ -5402,7 +5477,7 @@
|
|
|
5402
5477
|
vue.renderSlot(_ctx.$slots, "code-block-panel-search")
|
|
5403
5478
|
])
|
|
5404
5479
|
]),
|
|
5405
|
-
vue.createVNode(_sfc_main$
|
|
5480
|
+
vue.createVNode(_sfc_main$p, {
|
|
5406
5481
|
ref_key: "codeBlockList",
|
|
5407
5482
|
ref: codeBlockList,
|
|
5408
5483
|
"custom-error": _ctx.customError,
|
|
@@ -5417,7 +5492,7 @@
|
|
|
5417
5492
|
]),
|
|
5418
5493
|
_: 3
|
|
5419
5494
|
}, 8, ["custom-error", "onEdit", "onRemove"]),
|
|
5420
|
-
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5495
|
+
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$M, {
|
|
5421
5496
|
key: 0,
|
|
5422
5497
|
ref_key: "codeBlockEditor",
|
|
5423
5498
|
ref: codeBlockEditor,
|
|
@@ -5432,7 +5507,7 @@
|
|
|
5432
5507
|
}
|
|
5433
5508
|
});
|
|
5434
5509
|
|
|
5435
|
-
const _sfc_main$
|
|
5510
|
+
const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
5436
5511
|
...{
|
|
5437
5512
|
name: "MEditorDataSourceConfigPanel"
|
|
5438
5513
|
},
|
|
@@ -5486,13 +5561,13 @@
|
|
|
5486
5561
|
}
|
|
5487
5562
|
});
|
|
5488
5563
|
|
|
5489
|
-
const _hoisted_1$
|
|
5490
|
-
const _hoisted_2$
|
|
5491
|
-
const _hoisted_3$
|
|
5564
|
+
const _hoisted_1$e = ["id"];
|
|
5565
|
+
const _hoisted_2$a = { class: "list-item" };
|
|
5566
|
+
const _hoisted_3$5 = {
|
|
5492
5567
|
key: 2,
|
|
5493
5568
|
class: "right-tool"
|
|
5494
5569
|
};
|
|
5495
|
-
const _sfc_main$
|
|
5570
|
+
const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
5496
5571
|
...{
|
|
5497
5572
|
name: "MEditorDataSourceList"
|
|
5498
5573
|
},
|
|
@@ -5587,13 +5662,13 @@
|
|
|
5587
5662
|
id: data.id,
|
|
5588
5663
|
class: "list-container"
|
|
5589
5664
|
}, [
|
|
5590
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5591
|
-
data.type === "code" ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5665
|
+
vue.createElementVNode("div", _hoisted_2$a, [
|
|
5666
|
+
data.type === "code" ? (vue.openBlock(), vue.createBlock(_sfc_main$K, {
|
|
5592
5667
|
key: 0,
|
|
5593
5668
|
class: "codeIcon",
|
|
5594
5669
|
icon: vue.unref(iconsVue.Coin)
|
|
5595
5670
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
5596
|
-
data.type === "node" ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5671
|
+
data.type === "node" ? (vue.openBlock(), vue.createBlock(_sfc_main$K, {
|
|
5597
5672
|
key: 1,
|
|
5598
5673
|
class: "compIcon",
|
|
5599
5674
|
icon: vue.unref(iconsVue.Aim)
|
|
@@ -5601,14 +5676,14 @@
|
|
|
5601
5676
|
vue.createElementVNode("span", {
|
|
5602
5677
|
class: vue.normalizeClass(["name", { code: data.type === "ds", hook: data.type === "key" }])
|
|
5603
5678
|
}, vue.toDisplayString(data.type === "key" ? data.name : `${data.name}(${data.id})`), 3),
|
|
5604
|
-
data.type === "ds" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
5679
|
+
data.type === "ds" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$5, [
|
|
5605
5680
|
vue.createVNode(vue.unref(design.TMagicTooltip), {
|
|
5606
5681
|
effect: "dark",
|
|
5607
5682
|
content: editable.value ? "编辑" : "查看",
|
|
5608
5683
|
placement: "bottom"
|
|
5609
5684
|
}, {
|
|
5610
5685
|
default: vue.withCtx(() => [
|
|
5611
|
-
vue.createVNode(_sfc_main$
|
|
5686
|
+
vue.createVNode(_sfc_main$K, {
|
|
5612
5687
|
icon: editable.value ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
|
|
5613
5688
|
class: "edit-icon",
|
|
5614
5689
|
onClick: vue.withModifiers(($event) => editHandler(`${data.id}`), ["stop"])
|
|
@@ -5623,7 +5698,7 @@
|
|
|
5623
5698
|
placement: "bottom"
|
|
5624
5699
|
}, {
|
|
5625
5700
|
default: vue.withCtx(() => [
|
|
5626
|
-
vue.createVNode(_sfc_main$
|
|
5701
|
+
vue.createVNode(_sfc_main$K, {
|
|
5627
5702
|
icon: vue.unref(iconsVue.Close),
|
|
5628
5703
|
class: "edit-icon",
|
|
5629
5704
|
onClick: vue.withModifiers(($event) => removeHandler(`${data.id}`), ["stop"])
|
|
@@ -5637,7 +5712,7 @@
|
|
|
5637
5712
|
})
|
|
5638
5713
|
])) : vue.createCommentVNode("", true)
|
|
5639
5714
|
])
|
|
5640
|
-
], 8, _hoisted_1$
|
|
5715
|
+
], 8, _hoisted_1$e)
|
|
5641
5716
|
]),
|
|
5642
5717
|
_: 3
|
|
5643
5718
|
}, 8, ["data"]);
|
|
@@ -5645,9 +5720,9 @@
|
|
|
5645
5720
|
}
|
|
5646
5721
|
});
|
|
5647
5722
|
|
|
5648
|
-
const _hoisted_1$
|
|
5649
|
-
const _hoisted_2$
|
|
5650
|
-
const _sfc_main$
|
|
5723
|
+
const _hoisted_1$d = { class: "search-wrapper" };
|
|
5724
|
+
const _hoisted_2$9 = { class: "data-source-list-panel-add-menu" };
|
|
5725
|
+
const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
5651
5726
|
...{
|
|
5652
5727
|
name: "MEditorDataSourceListPanel"
|
|
5653
5728
|
},
|
|
@@ -5707,8 +5782,8 @@
|
|
|
5707
5782
|
return (_ctx, _cache) => {
|
|
5708
5783
|
return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicScrollbar), { class: "data-source-list-panel m-editor-dep-list-panel" }, {
|
|
5709
5784
|
default: vue.withCtx(() => [
|
|
5710
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
5711
|
-
vue.createVNode(_sfc_main$
|
|
5785
|
+
vue.createElementVNode("div", _hoisted_1$d, [
|
|
5786
|
+
vue.createVNode(_sfc_main$s, { onSearch: filterTextChangeHandler }),
|
|
5712
5787
|
editable.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicPopover), {
|
|
5713
5788
|
key: 0,
|
|
5714
5789
|
placement: "right"
|
|
@@ -5725,9 +5800,9 @@
|
|
|
5725
5800
|
})
|
|
5726
5801
|
]),
|
|
5727
5802
|
default: vue.withCtx(() => [
|
|
5728
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5803
|
+
vue.createElementVNode("div", _hoisted_2$9, [
|
|
5729
5804
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(datasourceTypeList.value, (item, index) => {
|
|
5730
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5805
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$v, {
|
|
5731
5806
|
data: {
|
|
5732
5807
|
type: "button",
|
|
5733
5808
|
text: item.text,
|
|
@@ -5743,11 +5818,11 @@
|
|
|
5743
5818
|
_: 1
|
|
5744
5819
|
})) : vue.createCommentVNode("", true)
|
|
5745
5820
|
]),
|
|
5746
|
-
vue.createVNode(_sfc_main$
|
|
5821
|
+
vue.createVNode(_sfc_main$m, {
|
|
5747
5822
|
onEdit: editHandler,
|
|
5748
5823
|
onRemove: removeHandler
|
|
5749
5824
|
}),
|
|
5750
|
-
vue.createVNode(_sfc_main$
|
|
5825
|
+
vue.createVNode(_sfc_main$n, {
|
|
5751
5826
|
ref_key: "editDialog",
|
|
5752
5827
|
ref: editDialog,
|
|
5753
5828
|
disabled: !editable.value,
|
|
@@ -5762,9 +5837,9 @@
|
|
|
5762
5837
|
}
|
|
5763
5838
|
});
|
|
5764
5839
|
|
|
5765
|
-
const _hoisted_1$
|
|
5766
|
-
const _hoisted_2$
|
|
5767
|
-
const _sfc_main$
|
|
5840
|
+
const _hoisted_1$c = ["onClick", "onDragstart"];
|
|
5841
|
+
const _hoisted_2$8 = ["title"];
|
|
5842
|
+
const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
5768
5843
|
...{
|
|
5769
5844
|
name: "MEditorComponentListPanel"
|
|
5770
5845
|
},
|
|
@@ -5843,7 +5918,7 @@
|
|
|
5843
5918
|
"model-value": collapseValue.value
|
|
5844
5919
|
}, {
|
|
5845
5920
|
default: vue.withCtx(() => [
|
|
5846
|
-
vue.createVNode(_sfc_main$
|
|
5921
|
+
vue.createVNode(_sfc_main$s, { onSearch: filterTextChangeHandler }),
|
|
5847
5922
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(list.value, (group, index) => {
|
|
5848
5923
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
5849
5924
|
group.items && group.items.length ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicCollapseItem), {
|
|
@@ -5851,7 +5926,7 @@
|
|
|
5851
5926
|
name: `${index}`
|
|
5852
5927
|
}, {
|
|
5853
5928
|
title: vue.withCtx(() => [
|
|
5854
|
-
vue.createVNode(_sfc_main$
|
|
5929
|
+
vue.createVNode(_sfc_main$K, { icon: vue.unref(iconsVue.Grid) }, null, 8, ["icon"]),
|
|
5855
5930
|
vue.createTextVNode(vue.toDisplayString(group.title), 1)
|
|
5856
5931
|
]),
|
|
5857
5932
|
default: vue.withCtx(() => [
|
|
@@ -5866,15 +5941,15 @@
|
|
|
5866
5941
|
onDrag: dragHandler
|
|
5867
5942
|
}, [
|
|
5868
5943
|
vue.renderSlot(_ctx.$slots, "component-list-item", { component: item }, () => [
|
|
5869
|
-
vue.createVNode(_sfc_main$
|
|
5944
|
+
vue.createVNode(_sfc_main$K, {
|
|
5870
5945
|
title: item.text,
|
|
5871
5946
|
icon: item.icon
|
|
5872
5947
|
}, null, 8, ["title", "icon"]),
|
|
5873
5948
|
vue.createElementVNode("span", {
|
|
5874
5949
|
title: item.text
|
|
5875
|
-
}, vue.toDisplayString(item.text), 9, _hoisted_2$
|
|
5950
|
+
}, vue.toDisplayString(item.text), 9, _hoisted_2$8)
|
|
5876
5951
|
])
|
|
5877
|
-
], 40, _hoisted_1$
|
|
5952
|
+
], 40, _hoisted_1$c);
|
|
5878
5953
|
}), 128))
|
|
5879
5954
|
]),
|
|
5880
5955
|
_: 2
|
|
@@ -5891,16 +5966,18 @@
|
|
|
5891
5966
|
}
|
|
5892
5967
|
});
|
|
5893
5968
|
|
|
5894
|
-
const _sfc_main$
|
|
5969
|
+
const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
5895
5970
|
...{
|
|
5896
5971
|
name: "MEditorContentMenu"
|
|
5897
5972
|
},
|
|
5898
5973
|
__name: "ContentMenu",
|
|
5899
5974
|
props: {
|
|
5900
5975
|
menuData: { default: () => [] },
|
|
5901
|
-
isSubMenu: { type: Boolean, default: false }
|
|
5976
|
+
isSubMenu: { type: Boolean, default: false },
|
|
5977
|
+
active: {},
|
|
5978
|
+
autoHide: { type: Boolean, default: true }
|
|
5902
5979
|
},
|
|
5903
|
-
emits: ["hide", "show"],
|
|
5980
|
+
emits: ["hide", "show", "mouseenter"],
|
|
5904
5981
|
setup(__props, { expose: __expose, emit }) {
|
|
5905
5982
|
const props = __props;
|
|
5906
5983
|
const menu = vue.ref();
|
|
@@ -5908,10 +5985,14 @@
|
|
|
5908
5985
|
const subMenu = vue.ref();
|
|
5909
5986
|
const visible = vue.ref(false);
|
|
5910
5987
|
const subMenuData = vue.ref([]);
|
|
5911
|
-
const
|
|
5912
|
-
left:
|
|
5913
|
-
top:
|
|
5988
|
+
const menuPosition = vue.ref({
|
|
5989
|
+
left: 0,
|
|
5990
|
+
top: 0
|
|
5914
5991
|
});
|
|
5992
|
+
const menuStyle = vue.computed(() => ({
|
|
5993
|
+
top: `${menuPosition.value.top}px`,
|
|
5994
|
+
left: `${menuPosition.value.left}px`
|
|
5995
|
+
}));
|
|
5915
5996
|
const contains = (el) => menu.value?.contains(el) || subMenu.value?.contains(el);
|
|
5916
5997
|
const hide = () => {
|
|
5917
5998
|
if (!visible.value)
|
|
@@ -5920,7 +6001,14 @@
|
|
|
5920
6001
|
subMenu.value?.hide();
|
|
5921
6002
|
emit("hide");
|
|
5922
6003
|
};
|
|
5923
|
-
const
|
|
6004
|
+
const clickHandler = () => {
|
|
6005
|
+
if (!props.autoHide)
|
|
6006
|
+
return;
|
|
6007
|
+
hide();
|
|
6008
|
+
};
|
|
6009
|
+
const outsideClickhideHandler = (e) => {
|
|
6010
|
+
if (!props.autoHide)
|
|
6011
|
+
return;
|
|
5924
6012
|
const target = e.target;
|
|
5925
6013
|
if (!visible.value || !target) {
|
|
5926
6014
|
return;
|
|
@@ -5930,19 +6018,25 @@
|
|
|
5930
6018
|
}
|
|
5931
6019
|
hide();
|
|
5932
6020
|
};
|
|
6021
|
+
const setPosition = (e) => {
|
|
6022
|
+
const menuHeight = menu.value?.clientHeight || 0;
|
|
6023
|
+
let top = e.clientY;
|
|
6024
|
+
if (menuHeight + e.clientY > document.body.clientHeight) {
|
|
6025
|
+
top = document.body.clientHeight - menuHeight;
|
|
6026
|
+
}
|
|
6027
|
+
menuPosition.value = {
|
|
6028
|
+
top,
|
|
6029
|
+
left: e.clientX
|
|
6030
|
+
};
|
|
6031
|
+
};
|
|
5933
6032
|
const show = (e) => {
|
|
5934
6033
|
setTimeout(() => {
|
|
5935
6034
|
visible.value = true;
|
|
6035
|
+
if (!e) {
|
|
6036
|
+
return;
|
|
6037
|
+
}
|
|
5936
6038
|
vue.nextTick(() => {
|
|
5937
|
-
|
|
5938
|
-
let top = e.clientY;
|
|
5939
|
-
if (menuHeight + e.clientY > document.body.clientHeight) {
|
|
5940
|
-
top = document.body.clientHeight - menuHeight;
|
|
5941
|
-
}
|
|
5942
|
-
menuStyle.value = {
|
|
5943
|
-
top: `${top}px`,
|
|
5944
|
-
left: `${e.clientX}px`
|
|
5945
|
-
};
|
|
6039
|
+
setPosition(e);
|
|
5946
6040
|
emit("show");
|
|
5947
6041
|
});
|
|
5948
6042
|
}, 300);
|
|
@@ -5967,64 +6061,77 @@
|
|
|
5967
6061
|
}
|
|
5968
6062
|
}, 0);
|
|
5969
6063
|
};
|
|
6064
|
+
const mouseenterHandler = () => {
|
|
6065
|
+
emit("mouseenter");
|
|
6066
|
+
};
|
|
5970
6067
|
vue.onMounted(() => {
|
|
5971
6068
|
if (props.isSubMenu)
|
|
5972
6069
|
return;
|
|
5973
|
-
globalThis.addEventListener("mousedown",
|
|
6070
|
+
globalThis.addEventListener("mousedown", outsideClickhideHandler, true);
|
|
5974
6071
|
});
|
|
5975
6072
|
vue.onUnmounted(() => {
|
|
5976
6073
|
if (props.isSubMenu)
|
|
5977
6074
|
return;
|
|
5978
|
-
globalThis.removeEventListener("mousedown",
|
|
6075
|
+
globalThis.removeEventListener("mousedown", outsideClickhideHandler, true);
|
|
5979
6076
|
});
|
|
5980
6077
|
__expose({
|
|
5981
6078
|
menu,
|
|
6079
|
+
menuPosition,
|
|
5982
6080
|
hide,
|
|
5983
6081
|
show,
|
|
5984
|
-
contains
|
|
6082
|
+
contains,
|
|
6083
|
+
setPosition
|
|
5985
6084
|
});
|
|
5986
6085
|
return (_ctx, _cache) => {
|
|
5987
6086
|
const _component_content_menu = vue.resolveComponent("content-menu", true);
|
|
5988
|
-
return
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6087
|
+
return vue.openBlock(), vue.createBlock(vue.Transition, { name: "fade" }, {
|
|
6088
|
+
default: vue.withCtx(() => [
|
|
6089
|
+
vue.withDirectives(vue.createElementVNode("div", {
|
|
6090
|
+
class: "magic-editor-content-menu",
|
|
6091
|
+
ref_key: "menu",
|
|
6092
|
+
ref: menu,
|
|
6093
|
+
style: vue.normalizeStyle(menuStyle.value),
|
|
6094
|
+
onMouseenter: _cache[0] || (_cache[0] = ($event) => mouseenterHandler())
|
|
6095
|
+
}, [
|
|
6096
|
+
vue.renderSlot(_ctx.$slots, "title"),
|
|
6097
|
+
vue.createElementVNode("div", null, [
|
|
6098
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menuData, (item, index) => {
|
|
6099
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$v, {
|
|
6100
|
+
"event-type": "mouseup",
|
|
6101
|
+
ref_for: true,
|
|
6102
|
+
ref_key: "buttons",
|
|
6103
|
+
ref: buttons,
|
|
6104
|
+
class: vue.normalizeClass({ active: _ctx.active && item.id === _ctx.active }),
|
|
6105
|
+
data: item,
|
|
6106
|
+
key: index,
|
|
6107
|
+
onMouseup: clickHandler,
|
|
6108
|
+
onMouseenter: ($event) => showSubMenu(item, index)
|
|
6109
|
+
}, null, 8, ["class", "data", "onMouseenter"]);
|
|
6110
|
+
}), 128))
|
|
6111
|
+
]),
|
|
6112
|
+
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
6113
|
+
subMenuData.value.length ? (vue.openBlock(), vue.createBlock(_component_content_menu, {
|
|
6114
|
+
key: 0,
|
|
6115
|
+
class: "sub-menu",
|
|
6116
|
+
ref_key: "subMenu",
|
|
6117
|
+
ref: subMenu,
|
|
6118
|
+
active: _ctx.active,
|
|
6119
|
+
"menu-data": subMenuData.value,
|
|
6120
|
+
"is-sub-menu": true,
|
|
6121
|
+
onHide: hide
|
|
6122
|
+
}, null, 8, ["active", "menu-data"])) : vue.createCommentVNode("", true)
|
|
6123
|
+
]))
|
|
6124
|
+
], 36), [
|
|
6125
|
+
[vue.vShow, visible.value]
|
|
6126
|
+
])
|
|
6008
6127
|
]),
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
key: 0,
|
|
6012
|
-
class: "sub-menu",
|
|
6013
|
-
ref_key: "subMenu",
|
|
6014
|
-
ref: subMenu,
|
|
6015
|
-
"menu-data": subMenuData.value,
|
|
6016
|
-
"is-sub-menu": true,
|
|
6017
|
-
onHide: hide
|
|
6018
|
-
}, null, 8, ["menu-data"])) : vue.createCommentVNode("", true)
|
|
6019
|
-
]))
|
|
6020
|
-
], 4)), [
|
|
6021
|
-
[vue.vShow, visible.value]
|
|
6022
|
-
]) : vue.createCommentVNode("", true);
|
|
6128
|
+
_: 3
|
|
6129
|
+
});
|
|
6023
6130
|
};
|
|
6024
6131
|
}
|
|
6025
6132
|
});
|
|
6026
6133
|
|
|
6027
|
-
const _hoisted_1$
|
|
6134
|
+
const _hoisted_1$b = {
|
|
6028
6135
|
width: "1em",
|
|
6029
6136
|
height: "1em",
|
|
6030
6137
|
viewBox: "0 0 16 16",
|
|
@@ -6032,26 +6139,26 @@
|
|
|
6032
6139
|
fill: "currentColor",
|
|
6033
6140
|
xmlns: "http://www.w3.org/2000/svg"
|
|
6034
6141
|
};
|
|
6035
|
-
const _hoisted_2$
|
|
6142
|
+
const _hoisted_2$7 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
6036
6143
|
"fill-rule": "evenodd",
|
|
6037
6144
|
d: "M9.828 4H2.19a1 1 0 0 0-.996 1.09l.637 7a1 1 0 0 0 .995.91H9v1H2.826a2 2 0 0 1-1.991-1.819l-.637-7a1.99 1.99 0 0 1 .342-1.31L.5 3a2 2 0 0 1 2-2h3.672a2 2 0 0 1 1.414.586l.828.828A2 2 0 0 0 9.828 3h3.982a2 2 0 0 1 1.992 2.181L15.546 8H14.54l.265-2.91A1 1 0 0 0 13.81 4H9.828zm-2.95-1.707L7.587 3H2.19c-.24 0-.47.042-.684.12L1.5 2.98a1 1 0 0 1 1-.98h3.672a1 1 0 0 1 .707.293z"
|
|
6038
6145
|
}, null, -1);
|
|
6039
|
-
const _hoisted_3$
|
|
6146
|
+
const _hoisted_3$4 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
6040
6147
|
"fill-rule": "evenodd",
|
|
6041
6148
|
d: "M11 11.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5z"
|
|
6042
6149
|
}, null, -1);
|
|
6043
|
-
const _hoisted_4$
|
|
6044
|
-
_hoisted_2$
|
|
6045
|
-
_hoisted_3$
|
|
6150
|
+
const _hoisted_4$4 = [
|
|
6151
|
+
_hoisted_2$7,
|
|
6152
|
+
_hoisted_3$4
|
|
6046
6153
|
];
|
|
6047
|
-
const _sfc_main$
|
|
6154
|
+
const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
6048
6155
|
...{
|
|
6049
6156
|
name: "MEditorFolderMinusIcon"
|
|
6050
6157
|
},
|
|
6051
6158
|
__name: "FolderMinusIcon",
|
|
6052
6159
|
setup(__props) {
|
|
6053
6160
|
return (_ctx, _cache) => {
|
|
6054
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
6161
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$b, _hoisted_4$4);
|
|
6055
6162
|
};
|
|
6056
6163
|
}
|
|
6057
6164
|
});
|
|
@@ -6131,7 +6238,7 @@
|
|
|
6131
6238
|
};
|
|
6132
6239
|
};
|
|
6133
6240
|
|
|
6134
|
-
const _sfc_main$
|
|
6241
|
+
const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
6135
6242
|
...{
|
|
6136
6243
|
name: "MEditorLayerMenu"
|
|
6137
6244
|
},
|
|
@@ -6194,7 +6301,7 @@
|
|
|
6194
6301
|
{
|
|
6195
6302
|
type: "button",
|
|
6196
6303
|
text: "全部折叠",
|
|
6197
|
-
icon: _sfc_main$
|
|
6304
|
+
icon: _sfc_main$i,
|
|
6198
6305
|
display: () => utils.isPage(node.value),
|
|
6199
6306
|
handler: () => {
|
|
6200
6307
|
emit("collapse-all");
|
|
@@ -6220,7 +6327,7 @@
|
|
|
6220
6327
|
show
|
|
6221
6328
|
});
|
|
6222
6329
|
return (_ctx, _cache) => {
|
|
6223
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
6330
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$j, {
|
|
6224
6331
|
"menu-data": menuData.value,
|
|
6225
6332
|
ref_key: "menu",
|
|
6226
6333
|
ref: menu,
|
|
@@ -6230,8 +6337,8 @@
|
|
|
6230
6337
|
}
|
|
6231
6338
|
});
|
|
6232
6339
|
|
|
6233
|
-
const _hoisted_1$
|
|
6234
|
-
const _sfc_main$
|
|
6340
|
+
const _hoisted_1$a = { class: "layer-node-tool" };
|
|
6341
|
+
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
6235
6342
|
__name: "LayerNode",
|
|
6236
6343
|
props: {
|
|
6237
6344
|
data: {}
|
|
@@ -6252,7 +6359,7 @@
|
|
|
6252
6359
|
const _component_el_icon = vue.resolveComponent("el-icon");
|
|
6253
6360
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
6254
6361
|
vue.createElementVNode("div", null, vue.toDisplayString(`${_ctx.data.name} (${_ctx.data.id})`), 1),
|
|
6255
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
6362
|
+
vue.createElementVNode("div", _hoisted_1$a, [
|
|
6256
6363
|
_ctx.data.type !== "page" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
6257
6364
|
_ctx.data.visible === false ? (vue.openBlock(), vue.createBlock(_component_el_icon, {
|
|
6258
6365
|
key: 0,
|
|
@@ -6281,9 +6388,9 @@
|
|
|
6281
6388
|
}
|
|
6282
6389
|
});
|
|
6283
6390
|
|
|
6284
|
-
const _hoisted_1$
|
|
6391
|
+
const _hoisted_1$9 = ["id", "onMouseenter"];
|
|
6285
6392
|
const throttleTime = 150;
|
|
6286
|
-
const _sfc_main$
|
|
6393
|
+
const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
6287
6394
|
...{
|
|
6288
6395
|
name: "MEditorLayerPanel"
|
|
6289
6396
|
},
|
|
@@ -6531,7 +6638,7 @@
|
|
|
6531
6638
|
return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicScrollbar), { class: "magic-editor-layer-panel" }, {
|
|
6532
6639
|
default: vue.withCtx(() => [
|
|
6533
6640
|
vue.renderSlot(_ctx.$slots, "layer-panel-header"),
|
|
6534
|
-
vue.createVNode(_sfc_main$
|
|
6641
|
+
vue.createVNode(_sfc_main$s, { onSearch: filterTextChangeHandler }),
|
|
6535
6642
|
values.value.length ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTree), {
|
|
6536
6643
|
key: 0,
|
|
6537
6644
|
class: "magic-editor-layer-tree",
|
|
@@ -6571,14 +6678,14 @@
|
|
|
6571
6678
|
node,
|
|
6572
6679
|
data
|
|
6573
6680
|
}, () => [
|
|
6574
|
-
vue.createVNode(_sfc_main$
|
|
6681
|
+
vue.createVNode(_sfc_main$g, { data }, null, 8, ["data"])
|
|
6575
6682
|
])
|
|
6576
|
-
], 40, _hoisted_1$
|
|
6683
|
+
], 40, _hoisted_1$9)
|
|
6577
6684
|
]),
|
|
6578
6685
|
_: 3
|
|
6579
6686
|
}, 8, ["default-expanded-keys", "default-checked-keys", "current-node-key", "data", "highlight-current", "show-checkbox"])) : vue.createCommentVNode("", true),
|
|
6580
6687
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
6581
|
-
vue.createVNode(_sfc_main$
|
|
6688
|
+
vue.createVNode(_sfc_main$h, {
|
|
6582
6689
|
ref_key: "menu",
|
|
6583
6690
|
ref: menu,
|
|
6584
6691
|
"layer-content-menu": _ctx.layerContentMenu,
|
|
@@ -6592,17 +6699,17 @@
|
|
|
6592
6699
|
}
|
|
6593
6700
|
});
|
|
6594
6701
|
|
|
6595
|
-
const _hoisted_1$
|
|
6702
|
+
const _hoisted_1$8 = {
|
|
6596
6703
|
key: 0,
|
|
6597
6704
|
class: "m-editor-sidebar"
|
|
6598
6705
|
};
|
|
6599
|
-
const _hoisted_2$
|
|
6600
|
-
const _hoisted_3$
|
|
6601
|
-
const _hoisted_4$
|
|
6706
|
+
const _hoisted_2$6 = { class: "m-editor-sidebar-header" };
|
|
6707
|
+
const _hoisted_3$3 = ["onClick"];
|
|
6708
|
+
const _hoisted_4$3 = {
|
|
6602
6709
|
key: 1,
|
|
6603
6710
|
class: "magic-editor-tab-panel-title"
|
|
6604
6711
|
};
|
|
6605
|
-
const _sfc_main$
|
|
6712
|
+
const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
6606
6713
|
...{
|
|
6607
6714
|
name: "MEditorSidebar"
|
|
6608
6715
|
},
|
|
@@ -6621,7 +6728,7 @@
|
|
|
6621
6728
|
type: "component",
|
|
6622
6729
|
icon: iconsVue.Goods,
|
|
6623
6730
|
text: "组件",
|
|
6624
|
-
component: _sfc_main$
|
|
6731
|
+
component: _sfc_main$k,
|
|
6625
6732
|
slots: {}
|
|
6626
6733
|
},
|
|
6627
6734
|
layer: {
|
|
@@ -6632,7 +6739,7 @@
|
|
|
6632
6739
|
props: {
|
|
6633
6740
|
layerContentMenu: props.layerContentMenu
|
|
6634
6741
|
},
|
|
6635
|
-
component: _sfc_main$
|
|
6742
|
+
component: _sfc_main$f,
|
|
6636
6743
|
slots: {}
|
|
6637
6744
|
},
|
|
6638
6745
|
"code-block": {
|
|
@@ -6640,7 +6747,7 @@
|
|
|
6640
6747
|
type: "component",
|
|
6641
6748
|
icon: iconsVue.EditPen,
|
|
6642
6749
|
text: "代码编辑",
|
|
6643
|
-
component: _sfc_main$
|
|
6750
|
+
component: _sfc_main$o,
|
|
6644
6751
|
slots: {}
|
|
6645
6752
|
},
|
|
6646
6753
|
"data-source": {
|
|
@@ -6648,7 +6755,7 @@
|
|
|
6648
6755
|
type: "component",
|
|
6649
6756
|
icon: iconsVue.Coin,
|
|
6650
6757
|
text: "数据源",
|
|
6651
|
-
component: _sfc_main$
|
|
6758
|
+
component: _sfc_main$l,
|
|
6652
6759
|
slots: {}
|
|
6653
6760
|
}
|
|
6654
6761
|
};
|
|
@@ -6665,20 +6772,20 @@
|
|
|
6665
6772
|
activeTabName
|
|
6666
6773
|
});
|
|
6667
6774
|
return (_ctx, _cache) => {
|
|
6668
|
-
return _ctx.data.type === "tabs" && _ctx.data.items.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
6669
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
6775
|
+
return _ctx.data.type === "tabs" && _ctx.data.items.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
|
|
6776
|
+
vue.createElementVNode("div", _hoisted_2$6, [
|
|
6670
6777
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(sideBarItems.value, (config, index) => {
|
|
6671
6778
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
6672
6779
|
class: vue.normalizeClass(["m-editor-sidebar-header-item", { "is-active": activeTabName.value === config.text }]),
|
|
6673
6780
|
key: config.$key ?? index,
|
|
6674
6781
|
onClick: ($event) => activeTabName.value = config.text || `${index}`
|
|
6675
6782
|
}, [
|
|
6676
|
-
config.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
6783
|
+
config.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$K, {
|
|
6677
6784
|
key: 0,
|
|
6678
6785
|
icon: config.icon
|
|
6679
6786
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
6680
|
-
config.text ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$
|
|
6681
|
-
], 10, _hoisted_3$
|
|
6787
|
+
config.text ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$3, vue.toDisplayString(config.text), 1)) : vue.createCommentVNode("", true)
|
|
6788
|
+
], 10, _hoisted_3$3);
|
|
6682
6789
|
}), 128))
|
|
6683
6790
|
]),
|
|
6684
6791
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(sideBarItems.value, (config, index) => {
|
|
@@ -6757,268 +6864,6 @@
|
|
|
6757
6864
|
}
|
|
6758
6865
|
});
|
|
6759
6866
|
|
|
6760
|
-
const _hoisted_1$4 = {
|
|
6761
|
-
key: 0,
|
|
6762
|
-
class: "m-editor-breadcrumb"
|
|
6763
|
-
};
|
|
6764
|
-
const _hoisted_2$2 = { key: 0 };
|
|
6765
|
-
const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
6766
|
-
...{
|
|
6767
|
-
name: "MEditorBreadcrumb"
|
|
6768
|
-
},
|
|
6769
|
-
__name: "Breadcrumb",
|
|
6770
|
-
setup(__props) {
|
|
6771
|
-
const services = vue.inject("services");
|
|
6772
|
-
const editorService = services?.editorService;
|
|
6773
|
-
const node = vue.computed(() => editorService?.get("node"));
|
|
6774
|
-
const nodes = vue.computed(() => editorService?.get("nodes") || []);
|
|
6775
|
-
const root = vue.computed(() => editorService?.get("root"));
|
|
6776
|
-
const path = vue.computed(() => utils.getNodePath(node.value?.id || "", root.value?.items || []));
|
|
6777
|
-
const select = async (node2) => {
|
|
6778
|
-
await editorService?.select(node2);
|
|
6779
|
-
editorService?.get("stage")?.select(node2.id);
|
|
6780
|
-
};
|
|
6781
|
-
return (_ctx, _cache) => {
|
|
6782
|
-
return nodes.value.length === 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [
|
|
6783
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(path.value, (item, index) => {
|
|
6784
|
-
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
6785
|
-
key: item.id
|
|
6786
|
-
}, [
|
|
6787
|
-
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
6788
|
-
text: "",
|
|
6789
|
-
disabled: item.id === node.value?.id,
|
|
6790
|
-
onClick: ($event) => select(item)
|
|
6791
|
-
}, {
|
|
6792
|
-
default: vue.withCtx(() => [
|
|
6793
|
-
vue.createTextVNode(vue.toDisplayString(item.name), 1)
|
|
6794
|
-
]),
|
|
6795
|
-
_: 2
|
|
6796
|
-
}, 1032, ["disabled", "onClick"]),
|
|
6797
|
-
index < path.value.length - 1 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$2, "/")) : vue.createCommentVNode("", true)
|
|
6798
|
-
], 64);
|
|
6799
|
-
}), 128))
|
|
6800
|
-
])) : vue.createCommentVNode("", true);
|
|
6801
|
-
};
|
|
6802
|
-
}
|
|
6803
|
-
});
|
|
6804
|
-
|
|
6805
|
-
const _hoisted_1$3 = {
|
|
6806
|
-
key: 1,
|
|
6807
|
-
style: { "width": "21px" }
|
|
6808
|
-
};
|
|
6809
|
-
const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
6810
|
-
...{
|
|
6811
|
-
name: "MEditorPageBarScrollContainer"
|
|
6812
|
-
},
|
|
6813
|
-
__name: "PageBarScrollContainer",
|
|
6814
|
-
setup(__props) {
|
|
6815
|
-
const services = vue.inject("services");
|
|
6816
|
-
const editorService = services?.editorService;
|
|
6817
|
-
const uiService = services?.uiService;
|
|
6818
|
-
const itemsContainer = vue.ref();
|
|
6819
|
-
const canScroll = vue.ref(false);
|
|
6820
|
-
const showAddPageButton = vue.computed(() => uiService?.get("showAddPageButton"));
|
|
6821
|
-
const itemsContainerWidth = vue.ref(0);
|
|
6822
|
-
const setCanScroll = () => {
|
|
6823
|
-
itemsContainerWidth.value = (pageBar.value?.clientWidth || 0) - 37 * 2 - (showAddPageButton.value ? 37 : 21);
|
|
6824
|
-
vue.nextTick(() => {
|
|
6825
|
-
if (itemsContainer.value) {
|
|
6826
|
-
canScroll.value = itemsContainer.value.scrollWidth - itemsContainerWidth.value > 1;
|
|
6827
|
-
}
|
|
6828
|
-
});
|
|
6829
|
-
};
|
|
6830
|
-
const resizeObserver = new ResizeObserver(() => {
|
|
6831
|
-
setCanScroll();
|
|
6832
|
-
});
|
|
6833
|
-
const pageBar = vue.ref();
|
|
6834
|
-
vue.onMounted(() => {
|
|
6835
|
-
pageBar.value && resizeObserver.observe(pageBar.value);
|
|
6836
|
-
});
|
|
6837
|
-
vue.onUnmounted(() => {
|
|
6838
|
-
resizeObserver.disconnect();
|
|
6839
|
-
});
|
|
6840
|
-
let translateLeft = 0;
|
|
6841
|
-
const scroll = (type) => {
|
|
6842
|
-
if (!itemsContainer.value)
|
|
6843
|
-
return;
|
|
6844
|
-
const maxScrollLeft = itemsContainer.value.scrollWidth - itemsContainerWidth.value;
|
|
6845
|
-
if (type === "left") {
|
|
6846
|
-
translateLeft += 100;
|
|
6847
|
-
if (translateLeft > 0) {
|
|
6848
|
-
translateLeft = 0;
|
|
6849
|
-
}
|
|
6850
|
-
} else if (type === "right") {
|
|
6851
|
-
translateLeft -= 100;
|
|
6852
|
-
if (-translateLeft > maxScrollLeft) {
|
|
6853
|
-
translateLeft = -maxScrollLeft;
|
|
6854
|
-
}
|
|
6855
|
-
} else if (type === "start") {
|
|
6856
|
-
translateLeft = 0;
|
|
6857
|
-
} else if (type === "end") {
|
|
6858
|
-
translateLeft = -maxScrollLeft;
|
|
6859
|
-
}
|
|
6860
|
-
itemsContainer.value.style.transform = `translate(${translateLeft}px, 0px)`;
|
|
6861
|
-
};
|
|
6862
|
-
const pageLength = vue.computed(() => editorService?.get("pageLength"));
|
|
6863
|
-
vue.watch(pageLength, (length = 0, preLength = 0) => {
|
|
6864
|
-
setTimeout(() => {
|
|
6865
|
-
setCanScroll();
|
|
6866
|
-
if (length < preLength) {
|
|
6867
|
-
scroll("start");
|
|
6868
|
-
} else {
|
|
6869
|
-
scroll("end");
|
|
6870
|
-
}
|
|
6871
|
-
});
|
|
6872
|
-
});
|
|
6873
|
-
const addPage = () => {
|
|
6874
|
-
if (!editorService)
|
|
6875
|
-
return;
|
|
6876
|
-
const root = vue.toRaw(editorService.get("root"));
|
|
6877
|
-
if (!root)
|
|
6878
|
-
throw new Error("root 不能为空");
|
|
6879
|
-
const pageConfig = {
|
|
6880
|
-
type: schema.NodeType.PAGE,
|
|
6881
|
-
name: generatePageNameByApp(root)
|
|
6882
|
-
};
|
|
6883
|
-
editorService.add(pageConfig);
|
|
6884
|
-
};
|
|
6885
|
-
return (_ctx, _cache) => {
|
|
6886
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
6887
|
-
class: "m-editor-page-bar",
|
|
6888
|
-
ref_key: "pageBar",
|
|
6889
|
-
ref: pageBar
|
|
6890
|
-
}, [
|
|
6891
|
-
showAddPageButton.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
6892
|
-
key: 0,
|
|
6893
|
-
id: "m-editor-page-bar-add-icon",
|
|
6894
|
-
class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
|
|
6895
|
-
onClick: addPage
|
|
6896
|
-
}, [
|
|
6897
|
-
vue.createVNode(_sfc_main$G, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
|
|
6898
|
-
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3)),
|
|
6899
|
-
canScroll.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
6900
|
-
key: 2,
|
|
6901
|
-
class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
|
|
6902
|
-
onClick: _cache[0] || (_cache[0] = ($event) => scroll("left"))
|
|
6903
|
-
}, [
|
|
6904
|
-
vue.createVNode(_sfc_main$G, { icon: vue.unref(iconsVue.ArrowLeftBold) }, null, 8, ["icon"])
|
|
6905
|
-
])) : vue.createCommentVNode("", true),
|
|
6906
|
-
pageLength.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
6907
|
-
key: 3,
|
|
6908
|
-
class: "m-editor-page-bar-items",
|
|
6909
|
-
ref_key: "itemsContainer",
|
|
6910
|
-
ref: itemsContainer,
|
|
6911
|
-
style: vue.normalizeStyle(`width: ${itemsContainerWidth.value}px`)
|
|
6912
|
-
}, [
|
|
6913
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
6914
|
-
], 4)) : vue.createCommentVNode("", true),
|
|
6915
|
-
canScroll.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
6916
|
-
key: 4,
|
|
6917
|
-
class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
|
|
6918
|
-
onClick: _cache[1] || (_cache[1] = ($event) => scroll("right"))
|
|
6919
|
-
}, [
|
|
6920
|
-
vue.createVNode(_sfc_main$G, { icon: vue.unref(iconsVue.ArrowRightBold) }, null, 8, ["icon"])
|
|
6921
|
-
])) : vue.createCommentVNode("", true)
|
|
6922
|
-
], 512);
|
|
6923
|
-
};
|
|
6924
|
-
}
|
|
6925
|
-
});
|
|
6926
|
-
|
|
6927
|
-
const _hoisted_1$2 = ["onClick"];
|
|
6928
|
-
const _hoisted_2$1 = { class: "m-editor-page-bar-title" };
|
|
6929
|
-
const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
6930
|
-
...{
|
|
6931
|
-
name: "MEditorPageBar"
|
|
6932
|
-
},
|
|
6933
|
-
__name: "PageBar",
|
|
6934
|
-
setup(__props) {
|
|
6935
|
-
const services = vue.inject("services");
|
|
6936
|
-
const editorService = services?.editorService;
|
|
6937
|
-
const root = vue.computed(() => editorService?.get("root"));
|
|
6938
|
-
const page = vue.computed(() => editorService?.get("page"));
|
|
6939
|
-
const switchPage = (page2) => {
|
|
6940
|
-
editorService?.select(page2);
|
|
6941
|
-
};
|
|
6942
|
-
const copy = (node) => {
|
|
6943
|
-
node && editorService?.copy(node);
|
|
6944
|
-
editorService?.paste({
|
|
6945
|
-
left: 0,
|
|
6946
|
-
top: 0
|
|
6947
|
-
});
|
|
6948
|
-
};
|
|
6949
|
-
const remove = (node) => {
|
|
6950
|
-
editorService?.remove(node);
|
|
6951
|
-
};
|
|
6952
|
-
return (_ctx, _cache) => {
|
|
6953
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$8, null, {
|
|
6954
|
-
default: vue.withCtx(() => [
|
|
6955
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(root.value && root.value.items || [], (item) => {
|
|
6956
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
6957
|
-
class: vue.normalizeClass(["m-editor-page-bar-item", { active: page.value?.id === item.id }]),
|
|
6958
|
-
key: item.key,
|
|
6959
|
-
onClick: ($event) => switchPage(item)
|
|
6960
|
-
}, [
|
|
6961
|
-
vue.createElementVNode("div", _hoisted_2$1, [
|
|
6962
|
-
vue.renderSlot(_ctx.$slots, "page-bar-title", { page: item }, () => [
|
|
6963
|
-
vue.createVNode(vue.unref(design.TMagicTooltip), {
|
|
6964
|
-
effect: "dark",
|
|
6965
|
-
placement: "top-start",
|
|
6966
|
-
content: item.name
|
|
6967
|
-
}, {
|
|
6968
|
-
default: vue.withCtx(() => [
|
|
6969
|
-
vue.createElementVNode("span", null, vue.toDisplayString(item.name || item.id), 1)
|
|
6970
|
-
]),
|
|
6971
|
-
_: 2
|
|
6972
|
-
}, 1032, ["content"])
|
|
6973
|
-
])
|
|
6974
|
-
]),
|
|
6975
|
-
vue.createVNode(vue.unref(design.TMagicPopover), {
|
|
6976
|
-
"popper-class": "page-bar-popover",
|
|
6977
|
-
placement: "top",
|
|
6978
|
-
width: 160,
|
|
6979
|
-
trigger: "hover"
|
|
6980
|
-
}, {
|
|
6981
|
-
reference: vue.withCtx(() => [
|
|
6982
|
-
vue.createVNode(vue.unref(design.TMagicIcon), { class: "m-editor-page-bar-menu-icon" }, {
|
|
6983
|
-
default: vue.withCtx(() => [
|
|
6984
|
-
vue.createVNode(vue.unref(iconsVue.CaretBottom))
|
|
6985
|
-
]),
|
|
6986
|
-
_: 1
|
|
6987
|
-
})
|
|
6988
|
-
]),
|
|
6989
|
-
default: vue.withCtx(() => [
|
|
6990
|
-
vue.createElementVNode("div", null, [
|
|
6991
|
-
vue.renderSlot(_ctx.$slots, "page-bar-popover", { page: item }, () => [
|
|
6992
|
-
vue.createVNode(_sfc_main$r, {
|
|
6993
|
-
data: {
|
|
6994
|
-
type: "button",
|
|
6995
|
-
text: "复制",
|
|
6996
|
-
icon: vue.unref(iconsVue.DocumentCopy),
|
|
6997
|
-
handler: () => copy(item)
|
|
6998
|
-
}
|
|
6999
|
-
}, null, 8, ["data"]),
|
|
7000
|
-
vue.createVNode(_sfc_main$r, {
|
|
7001
|
-
data: {
|
|
7002
|
-
type: "button",
|
|
7003
|
-
text: "删除",
|
|
7004
|
-
icon: vue.unref(iconsVue.Delete),
|
|
7005
|
-
handler: () => remove(item)
|
|
7006
|
-
}
|
|
7007
|
-
}, null, 8, ["data"])
|
|
7008
|
-
])
|
|
7009
|
-
])
|
|
7010
|
-
]),
|
|
7011
|
-
_: 2
|
|
7012
|
-
}, 1024)
|
|
7013
|
-
], 10, _hoisted_1$2);
|
|
7014
|
-
}), 128))
|
|
7015
|
-
]),
|
|
7016
|
-
_: 3
|
|
7017
|
-
});
|
|
7018
|
-
};
|
|
7019
|
-
}
|
|
7020
|
-
});
|
|
7021
|
-
|
|
7022
6867
|
class ScrollViewer extends events.EventEmitter {
|
|
7023
6868
|
container;
|
|
7024
6869
|
target;
|
|
@@ -7147,7 +6992,7 @@
|
|
|
7147
6992
|
};
|
|
7148
6993
|
}
|
|
7149
6994
|
|
|
7150
|
-
const _sfc_main$
|
|
6995
|
+
const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
7151
6996
|
...{
|
|
7152
6997
|
name: "MEditorScrollBar"
|
|
7153
6998
|
},
|
|
@@ -7236,7 +7081,7 @@
|
|
|
7236
7081
|
|
|
7237
7082
|
const ScrollBar_vue_vue_type_style_index_0_lang = '';
|
|
7238
7083
|
|
|
7239
|
-
const _sfc_main$
|
|
7084
|
+
const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
7240
7085
|
...{
|
|
7241
7086
|
name: "MEditorScrollViewer"
|
|
7242
7087
|
},
|
|
@@ -7322,14 +7167,14 @@
|
|
|
7322
7167
|
}, [
|
|
7323
7168
|
vue.renderSlot(_ctx.$slots, "default")
|
|
7324
7169
|
], 4),
|
|
7325
|
-
scrollHeight.value > _ctx.wrapHeight ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7170
|
+
scrollHeight.value > _ctx.wrapHeight ? (vue.openBlock(), vue.createBlock(_sfc_main$d, {
|
|
7326
7171
|
key: 0,
|
|
7327
7172
|
"scroll-size": scrollHeight.value,
|
|
7328
7173
|
size: _ctx.wrapHeight,
|
|
7329
7174
|
pos: vOffset.value,
|
|
7330
7175
|
onScroll: vScrollHandler
|
|
7331
7176
|
}, null, 8, ["scroll-size", "size", "pos"])) : vue.createCommentVNode("", true),
|
|
7332
|
-
scrollWidth.value > _ctx.wrapWidth ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7177
|
+
scrollWidth.value > _ctx.wrapWidth ? (vue.openBlock(), vue.createBlock(_sfc_main$d, {
|
|
7333
7178
|
key: 1,
|
|
7334
7179
|
"is-horizontal": true,
|
|
7335
7180
|
"scroll-size": scrollWidth.value,
|
|
@@ -7507,83 +7352,378 @@
|
|
|
7507
7352
|
return stage;
|
|
7508
7353
|
};
|
|
7509
7354
|
|
|
7510
|
-
const _hoisted_1$
|
|
7355
|
+
const _hoisted_1$7 = {
|
|
7356
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7357
|
+
class: "icon icon-tabler icon-tabler-pin",
|
|
7358
|
+
width: "24",
|
|
7359
|
+
height: "24",
|
|
7511
7360
|
viewBox: "0 0 24 24",
|
|
7361
|
+
"stroke-width": "2",
|
|
7362
|
+
stroke: "currentColor",
|
|
7512
7363
|
fill: "none",
|
|
7513
|
-
|
|
7364
|
+
"stroke-linecap": "round",
|
|
7365
|
+
"stroke-linejoin": "round"
|
|
7514
7366
|
};
|
|
7515
|
-
const _hoisted_2 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
fill: "black",
|
|
7520
|
-
"fill-opacity": "0.9"
|
|
7367
|
+
const _hoisted_2$5 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
7368
|
+
stroke: "none",
|
|
7369
|
+
d: "M0 0h24v24H0z",
|
|
7370
|
+
fill: "none"
|
|
7521
7371
|
}, null, -1);
|
|
7522
|
-
const _hoisted_3 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
7523
|
-
|
|
7524
|
-
|
|
7525
|
-
|
|
7526
|
-
|
|
7527
|
-
|
|
7372
|
+
const _hoisted_3$2 = /* @__PURE__ */ vue.createElementVNode("path", { d: "M15 4.5l-4 4l-4 1.5l-1.5 1.5l7 7l1.5 -1.5l1.5 -4l4 -4" }, null, -1);
|
|
7373
|
+
const _hoisted_4$2 = /* @__PURE__ */ vue.createElementVNode("line", {
|
|
7374
|
+
x1: "9",
|
|
7375
|
+
y1: "15",
|
|
7376
|
+
x2: "4.5",
|
|
7377
|
+
y2: "19.5"
|
|
7528
7378
|
}, null, -1);
|
|
7529
|
-
const
|
|
7530
|
-
|
|
7531
|
-
|
|
7532
|
-
|
|
7533
|
-
|
|
7534
|
-
"fill-opacity": "0.9"
|
|
7379
|
+
const _hoisted_5$2 = /* @__PURE__ */ vue.createElementVNode("line", {
|
|
7380
|
+
x1: "14.5",
|
|
7381
|
+
y1: "4",
|
|
7382
|
+
x2: "20",
|
|
7383
|
+
y2: "9.5"
|
|
7535
7384
|
}, null, -1);
|
|
7536
|
-
const
|
|
7537
|
-
_hoisted_2,
|
|
7538
|
-
_hoisted_3,
|
|
7539
|
-
_hoisted_4
|
|
7385
|
+
const _hoisted_6$1 = [
|
|
7386
|
+
_hoisted_2$5,
|
|
7387
|
+
_hoisted_3$2,
|
|
7388
|
+
_hoisted_4$2,
|
|
7389
|
+
_hoisted_5$2
|
|
7540
7390
|
];
|
|
7541
|
-
const _sfc_main$
|
|
7391
|
+
const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
7542
7392
|
...{
|
|
7543
|
-
name: "
|
|
7393
|
+
name: "MEditorPinIcon"
|
|
7544
7394
|
},
|
|
7545
|
-
__name: "
|
|
7395
|
+
__name: "PinIcon",
|
|
7546
7396
|
setup(__props) {
|
|
7547
7397
|
return (_ctx, _cache) => {
|
|
7548
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
7398
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$7, _hoisted_6$1);
|
|
7549
7399
|
};
|
|
7550
7400
|
}
|
|
7551
7401
|
});
|
|
7552
7402
|
|
|
7553
|
-
const
|
|
7403
|
+
const _hoisted_1$6 = {
|
|
7404
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7405
|
+
class: "icon icon-tabler icon-tabler-pinned",
|
|
7406
|
+
width: "24",
|
|
7407
|
+
height: "24",
|
|
7408
|
+
viewBox: "0 0 24 24",
|
|
7409
|
+
"stroke-width": "2",
|
|
7410
|
+
stroke: "currentColor",
|
|
7411
|
+
fill: "none",
|
|
7412
|
+
"stroke-linecap": "round",
|
|
7413
|
+
"stroke-linejoin": "round"
|
|
7414
|
+
};
|
|
7415
|
+
const _hoisted_2$4 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
7416
|
+
stroke: "none",
|
|
7417
|
+
d: "M0 0h24v24H0z",
|
|
7418
|
+
fill: "none"
|
|
7419
|
+
}, null, -1);
|
|
7420
|
+
const _hoisted_3$1 = /* @__PURE__ */ vue.createElementVNode("path", { d: "M9 4v6l-2 4v2h10v-2l-2 -4v-6" }, null, -1);
|
|
7421
|
+
const _hoisted_4$1 = /* @__PURE__ */ vue.createElementVNode("line", {
|
|
7422
|
+
x1: "12",
|
|
7423
|
+
y1: "16",
|
|
7424
|
+
x2: "12",
|
|
7425
|
+
y2: "21"
|
|
7426
|
+
}, null, -1);
|
|
7427
|
+
const _hoisted_5$1 = /* @__PURE__ */ vue.createElementVNode("line", {
|
|
7428
|
+
x1: "8",
|
|
7429
|
+
y1: "4",
|
|
7430
|
+
x2: "16",
|
|
7431
|
+
y2: "4"
|
|
7432
|
+
}, null, -1);
|
|
7433
|
+
const _hoisted_6 = [
|
|
7434
|
+
_hoisted_2$4,
|
|
7435
|
+
_hoisted_3$1,
|
|
7436
|
+
_hoisted_4$1,
|
|
7437
|
+
_hoisted_5$1
|
|
7438
|
+
];
|
|
7439
|
+
const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
7554
7440
|
...{
|
|
7555
|
-
name: "
|
|
7441
|
+
name: "MEditorPinnedIcon"
|
|
7556
7442
|
},
|
|
7557
|
-
__name: "
|
|
7443
|
+
__name: "PinnedIcon",
|
|
7444
|
+
setup(__props) {
|
|
7445
|
+
return (_ctx, _cache) => {
|
|
7446
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$6, _hoisted_6);
|
|
7447
|
+
};
|
|
7448
|
+
}
|
|
7449
|
+
});
|
|
7450
|
+
|
|
7451
|
+
const _hoisted_1$5 = /* @__PURE__ */ vue.createElementVNode("span", null, "可选组件", -1);
|
|
7452
|
+
const _hoisted_2$3 = { style: { "margin-right": "10px" } };
|
|
7453
|
+
const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
7454
|
+
...{
|
|
7455
|
+
name: "MEditorNodeListMenuTitle"
|
|
7456
|
+
},
|
|
7457
|
+
__name: "NodeListMenuTitle",
|
|
7558
7458
|
props: {
|
|
7559
|
-
|
|
7560
|
-
stageContentMenu: {}
|
|
7459
|
+
pinned: { type: Boolean }
|
|
7561
7460
|
},
|
|
7562
|
-
|
|
7461
|
+
emits: ["close", "update:pinned", "change"],
|
|
7462
|
+
setup(__props, { emit }) {
|
|
7563
7463
|
const props = __props;
|
|
7564
|
-
const
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
const
|
|
7568
|
-
|
|
7569
|
-
|
|
7570
|
-
const
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
{
|
|
7574
|
-
|
|
7575
|
-
|
|
7576
|
-
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
|
|
7584
|
-
|
|
7585
|
-
|
|
7586
|
-
|
|
7464
|
+
const pinHandler = () => {
|
|
7465
|
+
emit("update:pinned", !props.pinned);
|
|
7466
|
+
};
|
|
7467
|
+
const closeHandler = () => {
|
|
7468
|
+
emit("close");
|
|
7469
|
+
};
|
|
7470
|
+
const target = vue.ref();
|
|
7471
|
+
useGetSo(target, emit);
|
|
7472
|
+
return (_ctx, _cache) => {
|
|
7473
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
7474
|
+
style: { "text-align": "center", "padding": "5px 0", "font-size": "14px", "cursor": "move", "display": "flex", "justify-content": "space-between", "align-items": "center" },
|
|
7475
|
+
ref_key: "target",
|
|
7476
|
+
ref: target
|
|
7477
|
+
}, [
|
|
7478
|
+
vue.createVNode(vue.unref(design.TMagicTooltip), {
|
|
7479
|
+
placement: "top",
|
|
7480
|
+
content: _ctx.pinned ? "取消置于顶层自动隐藏" : "置于顶层不消失"
|
|
7481
|
+
}, {
|
|
7482
|
+
default: vue.withCtx(() => [
|
|
7483
|
+
vue.createVNode(_sfc_main$K, {
|
|
7484
|
+
style: { "margin-left": "10px", "cursor": "pointer" },
|
|
7485
|
+
icon: _ctx.pinned ? _sfc_main$a : _sfc_main$b,
|
|
7486
|
+
onClick: pinHandler
|
|
7487
|
+
}, null, 8, ["icon"])
|
|
7488
|
+
]),
|
|
7489
|
+
_: 1
|
|
7490
|
+
}, 8, ["content"]),
|
|
7491
|
+
_hoisted_1$5,
|
|
7492
|
+
vue.createElementVNode("div", _hoisted_2$3, [
|
|
7493
|
+
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
7494
|
+
text: "",
|
|
7495
|
+
size: "small",
|
|
7496
|
+
onClick: closeHandler
|
|
7497
|
+
}, {
|
|
7498
|
+
default: vue.withCtx(() => [
|
|
7499
|
+
vue.createVNode(_sfc_main$K, { icon: vue.unref(iconsVue.Close) }, null, 8, ["icon"])
|
|
7500
|
+
]),
|
|
7501
|
+
_: 1
|
|
7502
|
+
})
|
|
7503
|
+
])
|
|
7504
|
+
], 512);
|
|
7505
|
+
};
|
|
7506
|
+
}
|
|
7507
|
+
});
|
|
7508
|
+
|
|
7509
|
+
const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
7510
|
+
__name: "NodeListMenu",
|
|
7511
|
+
props: {
|
|
7512
|
+
isMultiSelect: { type: Boolean }
|
|
7513
|
+
},
|
|
7514
|
+
setup(__props) {
|
|
7515
|
+
const props = __props;
|
|
7516
|
+
const menu = vue.ref();
|
|
7517
|
+
const nodeList = vue.ref([]);
|
|
7518
|
+
const pinned = vue.ref(false);
|
|
7519
|
+
const services = vue.inject("services");
|
|
7520
|
+
const editorService = services?.editorService;
|
|
7521
|
+
const componentListService = services?.componentListService;
|
|
7522
|
+
const stage = vue.computed(() => editorService?.get("stage"));
|
|
7523
|
+
const page = vue.computed(() => editorService?.get("page"));
|
|
7524
|
+
const node = vue.computed(() => editorService?.get("node"));
|
|
7525
|
+
let timeout = null;
|
|
7526
|
+
const cancel = () => {
|
|
7527
|
+
if (timeout) {
|
|
7528
|
+
globalThis.clearTimeout(timeout);
|
|
7529
|
+
}
|
|
7530
|
+
if (pinned.value) {
|
|
7531
|
+
return;
|
|
7532
|
+
}
|
|
7533
|
+
nodeList.value = [];
|
|
7534
|
+
menu.value?.hide();
|
|
7535
|
+
};
|
|
7536
|
+
const clearTimeoutLazy = () => {
|
|
7537
|
+
globalThis.setTimeout(() => {
|
|
7538
|
+
if (timeout) {
|
|
7539
|
+
globalThis.clearTimeout(timeout);
|
|
7540
|
+
}
|
|
7541
|
+
}, 300);
|
|
7542
|
+
};
|
|
7543
|
+
const unWatch = vue.watch(
|
|
7544
|
+
stage,
|
|
7545
|
+
(stage2) => {
|
|
7546
|
+
if (!stage2)
|
|
7547
|
+
return;
|
|
7548
|
+
stage2.on("drag-start", () => {
|
|
7549
|
+
cancel();
|
|
7550
|
+
});
|
|
7551
|
+
stage2.on("mousemove", (event) => {
|
|
7552
|
+
cancel();
|
|
7553
|
+
if (props.isMultiSelect || stage2.getDragStatus() !== StageCore.StageDragStatus.END) {
|
|
7554
|
+
return;
|
|
7555
|
+
}
|
|
7556
|
+
timeout = globalThis.setTimeout(() => {
|
|
7557
|
+
const els = stage2?.renderer.getElementsFromPoint(event);
|
|
7558
|
+
const nodes = utils.getNodes(
|
|
7559
|
+
els.map((el) => el.id),
|
|
7560
|
+
page.value?.items
|
|
7561
|
+
);
|
|
7562
|
+
if (pinned.value && nodes.length === 0) {
|
|
7563
|
+
return;
|
|
7564
|
+
}
|
|
7565
|
+
nodeList.value = nodes;
|
|
7566
|
+
if (nodeList.value.length > 1) {
|
|
7567
|
+
menu.value?.show(pinned.value ? void 0 : event);
|
|
7568
|
+
}
|
|
7569
|
+
}, 1500);
|
|
7570
|
+
});
|
|
7571
|
+
stage2.on("mouseleave", () => {
|
|
7572
|
+
clearTimeoutLazy();
|
|
7573
|
+
});
|
|
7574
|
+
unWatch();
|
|
7575
|
+
},
|
|
7576
|
+
{
|
|
7577
|
+
immediate: true
|
|
7578
|
+
}
|
|
7579
|
+
);
|
|
7580
|
+
const componentMap = vue.computed(() => {
|
|
7581
|
+
const map = {};
|
|
7582
|
+
componentListService?.getList().forEach((group) => {
|
|
7583
|
+
group.items.forEach((item) => {
|
|
7584
|
+
map[item.type] = item;
|
|
7585
|
+
});
|
|
7586
|
+
});
|
|
7587
|
+
return map;
|
|
7588
|
+
});
|
|
7589
|
+
const menuData = vue.computed(
|
|
7590
|
+
() => nodeList.value.map((node2) => {
|
|
7591
|
+
let text = node2.name;
|
|
7592
|
+
let icon;
|
|
7593
|
+
if (node2.type) {
|
|
7594
|
+
const item = componentMap.value[node2.type];
|
|
7595
|
+
text += ` (${item?.text})`;
|
|
7596
|
+
icon = item?.icon;
|
|
7597
|
+
}
|
|
7598
|
+
return {
|
|
7599
|
+
type: "button",
|
|
7600
|
+
text,
|
|
7601
|
+
id: node2.id,
|
|
7602
|
+
icon,
|
|
7603
|
+
handler: async () => {
|
|
7604
|
+
await editorService?.select(node2);
|
|
7605
|
+
stage.value?.select(node2.id);
|
|
7606
|
+
}
|
|
7607
|
+
};
|
|
7608
|
+
})
|
|
7609
|
+
);
|
|
7610
|
+
const mouseenterHandler = () => {
|
|
7611
|
+
clearTimeoutLazy();
|
|
7612
|
+
};
|
|
7613
|
+
const dragMenuHandler = ({ deltaY, deltaX }) => {
|
|
7614
|
+
if (!menu.value)
|
|
7615
|
+
return;
|
|
7616
|
+
const { menuPosition } = menu.value;
|
|
7617
|
+
menu.value?.setPosition({
|
|
7618
|
+
clientY: menuPosition.top + deltaY,
|
|
7619
|
+
clientX: menuPosition.left + deltaX
|
|
7620
|
+
});
|
|
7621
|
+
};
|
|
7622
|
+
const closeHandler = () => {
|
|
7623
|
+
menu.value?.hide();
|
|
7624
|
+
};
|
|
7625
|
+
return (_ctx, _cache) => {
|
|
7626
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$j, {
|
|
7627
|
+
ref_key: "menu",
|
|
7628
|
+
ref: menu,
|
|
7629
|
+
class: "magic-editor-node-list-menu",
|
|
7630
|
+
style: { "max-width": "280px" },
|
|
7631
|
+
"menu-data": menuData.value,
|
|
7632
|
+
active: node.value?.id,
|
|
7633
|
+
"auto-hide": !pinned.value,
|
|
7634
|
+
onMouseenter: _cache[1] || (_cache[1] = ($event) => mouseenterHandler())
|
|
7635
|
+
}, {
|
|
7636
|
+
title: vue.withCtx(() => [
|
|
7637
|
+
vue.createVNode(_sfc_main$9, {
|
|
7638
|
+
pinned: pinned.value,
|
|
7639
|
+
"onUpdate:pinned": _cache[0] || (_cache[0] = ($event) => pinned.value = $event),
|
|
7640
|
+
onChange: dragMenuHandler,
|
|
7641
|
+
onClose: closeHandler
|
|
7642
|
+
}, null, 8, ["pinned"])
|
|
7643
|
+
]),
|
|
7644
|
+
_: 1
|
|
7645
|
+
}, 8, ["menu-data", "active", "auto-hide"]);
|
|
7646
|
+
};
|
|
7647
|
+
}
|
|
7648
|
+
});
|
|
7649
|
+
|
|
7650
|
+
const _hoisted_1$4 = {
|
|
7651
|
+
viewBox: "0 0 24 24",
|
|
7652
|
+
fill: "none",
|
|
7653
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
7654
|
+
};
|
|
7655
|
+
const _hoisted_2$2 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
7656
|
+
"fill-rule": "evenodd",
|
|
7657
|
+
"clip-rule": "evenodd",
|
|
7658
|
+
d: "M2 4H21V6H2V4Z",
|
|
7659
|
+
fill: "black",
|
|
7660
|
+
"fill-opacity": "0.9"
|
|
7661
|
+
}, null, -1);
|
|
7662
|
+
const _hoisted_3 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
7663
|
+
"fill-rule": "evenodd",
|
|
7664
|
+
"clip-rule": "evenodd",
|
|
7665
|
+
d: "M5 11H18V13H5V11Z",
|
|
7666
|
+
fill: "black",
|
|
7667
|
+
"fill-opacity": "0.9"
|
|
7668
|
+
}, null, -1);
|
|
7669
|
+
const _hoisted_4 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
7670
|
+
"fill-rule": "evenodd",
|
|
7671
|
+
"clip-rule": "evenodd",
|
|
7672
|
+
d: "M2 18H21V20H2V18Z",
|
|
7673
|
+
fill: "black",
|
|
7674
|
+
"fill-opacity": "0.9"
|
|
7675
|
+
}, null, -1);
|
|
7676
|
+
const _hoisted_5 = [
|
|
7677
|
+
_hoisted_2$2,
|
|
7678
|
+
_hoisted_3,
|
|
7679
|
+
_hoisted_4
|
|
7680
|
+
];
|
|
7681
|
+
const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
7682
|
+
...{
|
|
7683
|
+
name: "MEditorCenterIcon"
|
|
7684
|
+
},
|
|
7685
|
+
__name: "CenterIcon",
|
|
7686
|
+
setup(__props) {
|
|
7687
|
+
return (_ctx, _cache) => {
|
|
7688
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$4, _hoisted_5);
|
|
7689
|
+
};
|
|
7690
|
+
}
|
|
7691
|
+
});
|
|
7692
|
+
|
|
7693
|
+
const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
7694
|
+
...{
|
|
7695
|
+
name: "MEditorViewerMenu"
|
|
7696
|
+
},
|
|
7697
|
+
__name: "ViewerMenu",
|
|
7698
|
+
props: {
|
|
7699
|
+
isMultiSelect: { type: Boolean, default: false },
|
|
7700
|
+
stageContentMenu: {}
|
|
7701
|
+
},
|
|
7702
|
+
setup(__props, { expose: __expose }) {
|
|
7703
|
+
const props = __props;
|
|
7704
|
+
const services = vue.inject("services");
|
|
7705
|
+
const editorService = services?.editorService;
|
|
7706
|
+
const menu = vue.ref();
|
|
7707
|
+
const canPaste = vue.ref(false);
|
|
7708
|
+
const canCenter = vue.ref(false);
|
|
7709
|
+
const node = vue.computed(() => editorService?.get("node"));
|
|
7710
|
+
const nodes = vue.computed(() => editorService?.get("nodes"));
|
|
7711
|
+
const parent = vue.computed(() => editorService?.get("parent"));
|
|
7712
|
+
const menuData = vue.computed(() => [
|
|
7713
|
+
{
|
|
7714
|
+
type: "button",
|
|
7715
|
+
text: "水平居中",
|
|
7716
|
+
icon: vue.markRaw(_sfc_main$7),
|
|
7717
|
+
display: () => canCenter.value,
|
|
7718
|
+
handler: () => {
|
|
7719
|
+
if (!nodes.value)
|
|
7720
|
+
return;
|
|
7721
|
+
editorService?.alignCenter(nodes.value);
|
|
7722
|
+
}
|
|
7723
|
+
},
|
|
7724
|
+
useCopyMenu(),
|
|
7725
|
+
usePasteMenu(menu),
|
|
7726
|
+
{
|
|
7587
7727
|
type: "divider",
|
|
7588
7728
|
direction: "horizontal",
|
|
7589
7729
|
display: () => {
|
|
@@ -7669,7 +7809,7 @@
|
|
|
7669
7809
|
};
|
|
7670
7810
|
__expose({ show });
|
|
7671
7811
|
return (_ctx, _cache) => {
|
|
7672
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7812
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$j, {
|
|
7673
7813
|
"menu-data": menuData.value,
|
|
7674
7814
|
ref_key: "menu",
|
|
7675
7815
|
ref: menu
|
|
@@ -7678,7 +7818,7 @@
|
|
|
7678
7818
|
}
|
|
7679
7819
|
});
|
|
7680
7820
|
|
|
7681
|
-
const _sfc_main$
|
|
7821
|
+
const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
7682
7822
|
...{
|
|
7683
7823
|
name: "MEditorStage"
|
|
7684
7824
|
},
|
|
@@ -7818,7 +7958,7 @@
|
|
|
7818
7958
|
}
|
|
7819
7959
|
};
|
|
7820
7960
|
return (_ctx, _cache) => {
|
|
7821
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7961
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$c, {
|
|
7822
7962
|
class: "m-editor-stage",
|
|
7823
7963
|
ref_key: "stageWrap",
|
|
7824
7964
|
ref: stageWrap,
|
|
@@ -7845,12 +7985,16 @@
|
|
|
7845
7985
|
onDragover: dragoverHandler
|
|
7846
7986
|
}, null, 36),
|
|
7847
7987
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
7848
|
-
vue.createVNode(_sfc_main$
|
|
7988
|
+
vue.createVNode(_sfc_main$6, {
|
|
7849
7989
|
ref_key: "menu",
|
|
7850
7990
|
ref: menu,
|
|
7851
7991
|
"is-multi-select": isMultiSelect.value,
|
|
7852
7992
|
"stage-content-menu": _ctx.stageContentMenu
|
|
7853
|
-
}, null, 8, ["is-multi-select", "stage-content-menu"])
|
|
7993
|
+
}, null, 8, ["is-multi-select", "stage-content-menu"]),
|
|
7994
|
+
vue.createVNode(_sfc_main$8, {
|
|
7995
|
+
ref: "nodeList",
|
|
7996
|
+
"is-multi-select": isMultiSelect.value
|
|
7997
|
+
}, null, 8, ["is-multi-select"])
|
|
7854
7998
|
]))
|
|
7855
7999
|
]),
|
|
7856
8000
|
_: 1
|
|
@@ -7859,6 +8003,268 @@
|
|
|
7859
8003
|
}
|
|
7860
8004
|
});
|
|
7861
8005
|
|
|
8006
|
+
const _hoisted_1$3 = {
|
|
8007
|
+
key: 0,
|
|
8008
|
+
class: "m-editor-breadcrumb"
|
|
8009
|
+
};
|
|
8010
|
+
const _hoisted_2$1 = { key: 0 };
|
|
8011
|
+
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
8012
|
+
...{
|
|
8013
|
+
name: "MEditorBreadcrumb"
|
|
8014
|
+
},
|
|
8015
|
+
__name: "Breadcrumb",
|
|
8016
|
+
setup(__props) {
|
|
8017
|
+
const services = vue.inject("services");
|
|
8018
|
+
const editorService = services?.editorService;
|
|
8019
|
+
const node = vue.computed(() => editorService?.get("node"));
|
|
8020
|
+
const nodes = vue.computed(() => editorService?.get("nodes") || []);
|
|
8021
|
+
const root = vue.computed(() => editorService?.get("root"));
|
|
8022
|
+
const path = vue.computed(() => utils.getNodePath(node.value?.id || "", root.value?.items || []));
|
|
8023
|
+
const select = async (node2) => {
|
|
8024
|
+
await editorService?.select(node2);
|
|
8025
|
+
editorService?.get("stage")?.select(node2.id);
|
|
8026
|
+
};
|
|
8027
|
+
return (_ctx, _cache) => {
|
|
8028
|
+
return nodes.value.length === 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
|
|
8029
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(path.value, (item, index) => {
|
|
8030
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
8031
|
+
key: item.id
|
|
8032
|
+
}, [
|
|
8033
|
+
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
8034
|
+
text: "",
|
|
8035
|
+
disabled: item.id === node.value?.id,
|
|
8036
|
+
onClick: ($event) => select(item)
|
|
8037
|
+
}, {
|
|
8038
|
+
default: vue.withCtx(() => [
|
|
8039
|
+
vue.createTextVNode(vue.toDisplayString(item.name), 1)
|
|
8040
|
+
]),
|
|
8041
|
+
_: 2
|
|
8042
|
+
}, 1032, ["disabled", "onClick"]),
|
|
8043
|
+
index < path.value.length - 1 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$1, "/")) : vue.createCommentVNode("", true)
|
|
8044
|
+
], 64);
|
|
8045
|
+
}), 128))
|
|
8046
|
+
])) : vue.createCommentVNode("", true);
|
|
8047
|
+
};
|
|
8048
|
+
}
|
|
8049
|
+
});
|
|
8050
|
+
|
|
8051
|
+
const _hoisted_1$2 = {
|
|
8052
|
+
key: 1,
|
|
8053
|
+
style: { "width": "21px" }
|
|
8054
|
+
};
|
|
8055
|
+
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
8056
|
+
...{
|
|
8057
|
+
name: "MEditorPageBarScrollContainer"
|
|
8058
|
+
},
|
|
8059
|
+
__name: "PageBarScrollContainer",
|
|
8060
|
+
setup(__props) {
|
|
8061
|
+
const services = vue.inject("services");
|
|
8062
|
+
const editorService = services?.editorService;
|
|
8063
|
+
const uiService = services?.uiService;
|
|
8064
|
+
const itemsContainer = vue.ref();
|
|
8065
|
+
const canScroll = vue.ref(false);
|
|
8066
|
+
const showAddPageButton = vue.computed(() => uiService?.get("showAddPageButton"));
|
|
8067
|
+
const itemsContainerWidth = vue.ref(0);
|
|
8068
|
+
const setCanScroll = () => {
|
|
8069
|
+
itemsContainerWidth.value = (pageBar.value?.clientWidth || 0) - 37 * 2 - (showAddPageButton.value ? 37 : 21);
|
|
8070
|
+
vue.nextTick(() => {
|
|
8071
|
+
if (itemsContainer.value) {
|
|
8072
|
+
canScroll.value = itemsContainer.value.scrollWidth - itemsContainerWidth.value > 1;
|
|
8073
|
+
}
|
|
8074
|
+
});
|
|
8075
|
+
};
|
|
8076
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
8077
|
+
setCanScroll();
|
|
8078
|
+
});
|
|
8079
|
+
const pageBar = vue.ref();
|
|
8080
|
+
vue.onMounted(() => {
|
|
8081
|
+
pageBar.value && resizeObserver.observe(pageBar.value);
|
|
8082
|
+
});
|
|
8083
|
+
vue.onUnmounted(() => {
|
|
8084
|
+
resizeObserver.disconnect();
|
|
8085
|
+
});
|
|
8086
|
+
let translateLeft = 0;
|
|
8087
|
+
const scroll = (type) => {
|
|
8088
|
+
if (!itemsContainer.value)
|
|
8089
|
+
return;
|
|
8090
|
+
const maxScrollLeft = itemsContainer.value.scrollWidth - itemsContainerWidth.value;
|
|
8091
|
+
if (type === "left") {
|
|
8092
|
+
translateLeft += 100;
|
|
8093
|
+
if (translateLeft > 0) {
|
|
8094
|
+
translateLeft = 0;
|
|
8095
|
+
}
|
|
8096
|
+
} else if (type === "right") {
|
|
8097
|
+
translateLeft -= 100;
|
|
8098
|
+
if (-translateLeft > maxScrollLeft) {
|
|
8099
|
+
translateLeft = -maxScrollLeft;
|
|
8100
|
+
}
|
|
8101
|
+
} else if (type === "start") {
|
|
8102
|
+
translateLeft = 0;
|
|
8103
|
+
} else if (type === "end") {
|
|
8104
|
+
translateLeft = -maxScrollLeft;
|
|
8105
|
+
}
|
|
8106
|
+
itemsContainer.value.style.transform = `translate(${translateLeft}px, 0px)`;
|
|
8107
|
+
};
|
|
8108
|
+
const pageLength = vue.computed(() => editorService?.get("pageLength"));
|
|
8109
|
+
vue.watch(pageLength, (length = 0, preLength = 0) => {
|
|
8110
|
+
setTimeout(() => {
|
|
8111
|
+
setCanScroll();
|
|
8112
|
+
if (length < preLength) {
|
|
8113
|
+
scroll("start");
|
|
8114
|
+
} else {
|
|
8115
|
+
scroll("end");
|
|
8116
|
+
}
|
|
8117
|
+
});
|
|
8118
|
+
});
|
|
8119
|
+
const addPage = () => {
|
|
8120
|
+
if (!editorService)
|
|
8121
|
+
return;
|
|
8122
|
+
const root = vue.toRaw(editorService.get("root"));
|
|
8123
|
+
if (!root)
|
|
8124
|
+
throw new Error("root 不能为空");
|
|
8125
|
+
const pageConfig = {
|
|
8126
|
+
type: schema.NodeType.PAGE,
|
|
8127
|
+
name: generatePageNameByApp(root)
|
|
8128
|
+
};
|
|
8129
|
+
editorService.add(pageConfig);
|
|
8130
|
+
};
|
|
8131
|
+
return (_ctx, _cache) => {
|
|
8132
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
8133
|
+
class: "m-editor-page-bar",
|
|
8134
|
+
ref_key: "pageBar",
|
|
8135
|
+
ref: pageBar
|
|
8136
|
+
}, [
|
|
8137
|
+
showAddPageButton.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
8138
|
+
key: 0,
|
|
8139
|
+
id: "m-editor-page-bar-add-icon",
|
|
8140
|
+
class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
|
|
8141
|
+
onClick: addPage
|
|
8142
|
+
}, [
|
|
8143
|
+
vue.createVNode(_sfc_main$K, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
|
|
8144
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2)),
|
|
8145
|
+
canScroll.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
8146
|
+
key: 2,
|
|
8147
|
+
class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
|
|
8148
|
+
onClick: _cache[0] || (_cache[0] = ($event) => scroll("left"))
|
|
8149
|
+
}, [
|
|
8150
|
+
vue.createVNode(_sfc_main$K, { icon: vue.unref(iconsVue.ArrowLeftBold) }, null, 8, ["icon"])
|
|
8151
|
+
])) : vue.createCommentVNode("", true),
|
|
8152
|
+
pageLength.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
8153
|
+
key: 3,
|
|
8154
|
+
class: "m-editor-page-bar-items",
|
|
8155
|
+
ref_key: "itemsContainer",
|
|
8156
|
+
ref: itemsContainer,
|
|
8157
|
+
style: vue.normalizeStyle(`width: ${itemsContainerWidth.value}px`)
|
|
8158
|
+
}, [
|
|
8159
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
8160
|
+
], 4)) : vue.createCommentVNode("", true),
|
|
8161
|
+
canScroll.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
8162
|
+
key: 4,
|
|
8163
|
+
class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
|
|
8164
|
+
onClick: _cache[1] || (_cache[1] = ($event) => scroll("right"))
|
|
8165
|
+
}, [
|
|
8166
|
+
vue.createVNode(_sfc_main$K, { icon: vue.unref(iconsVue.ArrowRightBold) }, null, 8, ["icon"])
|
|
8167
|
+
])) : vue.createCommentVNode("", true)
|
|
8168
|
+
], 512);
|
|
8169
|
+
};
|
|
8170
|
+
}
|
|
8171
|
+
});
|
|
8172
|
+
|
|
8173
|
+
const _hoisted_1$1 = ["onClick"];
|
|
8174
|
+
const _hoisted_2 = { class: "m-editor-page-bar-title" };
|
|
8175
|
+
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
8176
|
+
...{
|
|
8177
|
+
name: "MEditorPageBar"
|
|
8178
|
+
},
|
|
8179
|
+
__name: "PageBar",
|
|
8180
|
+
setup(__props) {
|
|
8181
|
+
const services = vue.inject("services");
|
|
8182
|
+
const editorService = services?.editorService;
|
|
8183
|
+
const root = vue.computed(() => editorService?.get("root"));
|
|
8184
|
+
const page = vue.computed(() => editorService?.get("page"));
|
|
8185
|
+
const switchPage = (page2) => {
|
|
8186
|
+
editorService?.select(page2);
|
|
8187
|
+
};
|
|
8188
|
+
const copy = (node) => {
|
|
8189
|
+
node && editorService?.copy(node);
|
|
8190
|
+
editorService?.paste({
|
|
8191
|
+
left: 0,
|
|
8192
|
+
top: 0
|
|
8193
|
+
});
|
|
8194
|
+
};
|
|
8195
|
+
const remove = (node) => {
|
|
8196
|
+
editorService?.remove(node);
|
|
8197
|
+
};
|
|
8198
|
+
return (_ctx, _cache) => {
|
|
8199
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$3, null, {
|
|
8200
|
+
default: vue.withCtx(() => [
|
|
8201
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(root.value && root.value.items || [], (item) => {
|
|
8202
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
8203
|
+
class: vue.normalizeClass(["m-editor-page-bar-item", { active: page.value?.id === item.id }]),
|
|
8204
|
+
key: item.key,
|
|
8205
|
+
onClick: ($event) => switchPage(item)
|
|
8206
|
+
}, [
|
|
8207
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
8208
|
+
vue.renderSlot(_ctx.$slots, "page-bar-title", { page: item }, () => [
|
|
8209
|
+
vue.createVNode(vue.unref(design.TMagicTooltip), {
|
|
8210
|
+
effect: "dark",
|
|
8211
|
+
placement: "top-start",
|
|
8212
|
+
content: item.name
|
|
8213
|
+
}, {
|
|
8214
|
+
default: vue.withCtx(() => [
|
|
8215
|
+
vue.createElementVNode("span", null, vue.toDisplayString(item.name || item.id), 1)
|
|
8216
|
+
]),
|
|
8217
|
+
_: 2
|
|
8218
|
+
}, 1032, ["content"])
|
|
8219
|
+
])
|
|
8220
|
+
]),
|
|
8221
|
+
vue.createVNode(vue.unref(design.TMagicPopover), {
|
|
8222
|
+
"popper-class": "page-bar-popover",
|
|
8223
|
+
placement: "top",
|
|
8224
|
+
width: 160,
|
|
8225
|
+
trigger: "hover"
|
|
8226
|
+
}, {
|
|
8227
|
+
reference: vue.withCtx(() => [
|
|
8228
|
+
vue.createVNode(vue.unref(design.TMagicIcon), { class: "m-editor-page-bar-menu-icon" }, {
|
|
8229
|
+
default: vue.withCtx(() => [
|
|
8230
|
+
vue.createVNode(vue.unref(iconsVue.CaretBottom))
|
|
8231
|
+
]),
|
|
8232
|
+
_: 1
|
|
8233
|
+
})
|
|
8234
|
+
]),
|
|
8235
|
+
default: vue.withCtx(() => [
|
|
8236
|
+
vue.createElementVNode("div", null, [
|
|
8237
|
+
vue.renderSlot(_ctx.$slots, "page-bar-popover", { page: item }, () => [
|
|
8238
|
+
vue.createVNode(_sfc_main$v, {
|
|
8239
|
+
data: {
|
|
8240
|
+
type: "button",
|
|
8241
|
+
text: "复制",
|
|
8242
|
+
icon: vue.unref(iconsVue.DocumentCopy),
|
|
8243
|
+
handler: () => copy(item)
|
|
8244
|
+
}
|
|
8245
|
+
}, null, 8, ["data"]),
|
|
8246
|
+
vue.createVNode(_sfc_main$v, {
|
|
8247
|
+
data: {
|
|
8248
|
+
type: "button",
|
|
8249
|
+
text: "删除",
|
|
8250
|
+
icon: vue.unref(iconsVue.Delete),
|
|
8251
|
+
handler: () => remove(item)
|
|
8252
|
+
}
|
|
8253
|
+
}, null, 8, ["data"])
|
|
8254
|
+
])
|
|
8255
|
+
])
|
|
8256
|
+
]),
|
|
8257
|
+
_: 2
|
|
8258
|
+
}, 1024)
|
|
8259
|
+
], 10, _hoisted_1$1);
|
|
8260
|
+
}), 128))
|
|
8261
|
+
]),
|
|
8262
|
+
_: 3
|
|
8263
|
+
});
|
|
8264
|
+
};
|
|
8265
|
+
}
|
|
8266
|
+
});
|
|
8267
|
+
|
|
7862
8268
|
const _hoisted_1 = { class: "m-editor-workspace" };
|
|
7863
8269
|
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
7864
8270
|
...{
|
|
@@ -7873,15 +8279,15 @@
|
|
|
7873
8279
|
const page = vue.computed(() => services?.editorService.get("page"));
|
|
7874
8280
|
return (_ctx, _cache) => {
|
|
7875
8281
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
7876
|
-
vue.createVNode(_sfc_main$
|
|
8282
|
+
vue.createVNode(_sfc_main$4),
|
|
7877
8283
|
vue.renderSlot(_ctx.$slots, "stage", {}, () => [
|
|
7878
|
-
page.value ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
8284
|
+
page.value ? (vue.openBlock(), vue.createBlock(_sfc_main$5, {
|
|
7879
8285
|
key: 0,
|
|
7880
8286
|
"stage-content-menu": _ctx.stageContentMenu
|
|
7881
8287
|
}, null, 8, ["stage-content-menu"])) : vue.createCommentVNode("", true)
|
|
7882
8288
|
]),
|
|
7883
8289
|
vue.renderSlot(_ctx.$slots, "workspace-content"),
|
|
7884
|
-
vue.createVNode(_sfc_main$
|
|
8290
|
+
vue.createVNode(_sfc_main$2, null, {
|
|
7885
8291
|
"page-bar-title": vue.withCtx(({ page: page2 }) => [
|
|
7886
8292
|
vue.renderSlot(_ctx.$slots, "page-bar-title", { page: page2 })
|
|
7887
8293
|
]),
|
|
@@ -9129,11 +9535,11 @@
|
|
|
9129
9535
|
const _sfc_main = vue.defineComponent({
|
|
9130
9536
|
name: "MEditor",
|
|
9131
9537
|
components: {
|
|
9132
|
-
TMagicNavMenu: _sfc_main$
|
|
9133
|
-
Sidebar: _sfc_main$
|
|
9538
|
+
TMagicNavMenu: _sfc_main$u,
|
|
9539
|
+
Sidebar: _sfc_main$e,
|
|
9134
9540
|
Workspace: _sfc_main$1,
|
|
9135
|
-
PropsPanel: _sfc_main$
|
|
9136
|
-
Framework: _sfc_main$
|
|
9541
|
+
PropsPanel: _sfc_main$t,
|
|
9542
|
+
Framework: _sfc_main$w
|
|
9137
9543
|
},
|
|
9138
9544
|
props: editorProps,
|
|
9139
9545
|
emits: ["props-panel-mounted", "update:modelValue"],
|
|
@@ -9298,58 +9704,58 @@
|
|
|
9298
9704
|
app.config.globalProperties.$TMAGIC_EDITOR = option;
|
|
9299
9705
|
setConfig(option);
|
|
9300
9706
|
app.component(Editor.name, Editor);
|
|
9301
|
-
app.component("m-fields-ui-select", _sfc_main$
|
|
9302
|
-
app.component("m-fields-code-link", _sfc_main$
|
|
9303
|
-
app.component("m-fields-vs-code", _sfc_main$
|
|
9304
|
-
app.component("magic-code-editor", _sfc_main$
|
|
9305
|
-
app.component("m-fields-code-select", _sfc_main$
|
|
9306
|
-
app.component("m-fields-code-select-col", _sfc_main$
|
|
9307
|
-
app.component("m-fields-event-select", _sfc_main$
|
|
9308
|
-
app.component("m-fields-data-source-fields", _sfc_main$
|
|
9309
|
-
app.component("m-fields-key-value", _sfc_main$
|
|
9310
|
-
app.component("m-fields-data-source-input", _sfc_main$
|
|
9311
|
-
app.component("m-fields-data-source-select", _sfc_main$
|
|
9312
|
-
app.component("m-fields-data-source-methods", _sfc_main$
|
|
9313
|
-
app.component("m-fields-data-source-method-select", _sfc_main$
|
|
9314
|
-
app.component("m-fields-data-source-field-select", _sfc_main$
|
|
9707
|
+
app.component("m-fields-ui-select", _sfc_main$A);
|
|
9708
|
+
app.component("m-fields-code-link", _sfc_main$O);
|
|
9709
|
+
app.component("m-fields-vs-code", _sfc_main$P);
|
|
9710
|
+
app.component("magic-code-editor", _sfc_main$Q);
|
|
9711
|
+
app.component("m-fields-code-select", _sfc_main$N);
|
|
9712
|
+
app.component("m-fields-code-select-col", _sfc_main$J);
|
|
9713
|
+
app.component("m-fields-event-select", _sfc_main$C);
|
|
9714
|
+
app.component("m-fields-data-source-fields", _sfc_main$I);
|
|
9715
|
+
app.component("m-fields-key-value", _sfc_main$B);
|
|
9716
|
+
app.component("m-fields-data-source-input", _sfc_main$G);
|
|
9717
|
+
app.component("m-fields-data-source-select", _sfc_main$D);
|
|
9718
|
+
app.component("m-fields-data-source-methods", _sfc_main$F);
|
|
9719
|
+
app.component("m-fields-data-source-method-select", _sfc_main$E);
|
|
9720
|
+
app.component("m-fields-data-source-field-select", _sfc_main$H);
|
|
9315
9721
|
}
|
|
9316
9722
|
};
|
|
9317
9723
|
|
|
9318
9724
|
exports.CODE_DRAFT_STORAGE_KEY = CODE_DRAFT_STORAGE_KEY;
|
|
9319
9725
|
exports.COPY_STORAGE_KEY = COPY_STORAGE_KEY;
|
|
9320
|
-
exports.CodeBlockEditor = _sfc_main$
|
|
9321
|
-
exports.CodeBlockList = _sfc_main$
|
|
9322
|
-
exports.CodeBlockListPanel = _sfc_main$
|
|
9726
|
+
exports.CodeBlockEditor = _sfc_main$M;
|
|
9727
|
+
exports.CodeBlockList = _sfc_main$p;
|
|
9728
|
+
exports.CodeBlockListPanel = _sfc_main$o;
|
|
9323
9729
|
exports.CodeDeleteErrorType = CodeDeleteErrorType;
|
|
9324
|
-
exports.CodeSelect = _sfc_main$
|
|
9325
|
-
exports.CodeSelectCol = _sfc_main$
|
|
9730
|
+
exports.CodeSelect = _sfc_main$N;
|
|
9731
|
+
exports.CodeSelectCol = _sfc_main$J;
|
|
9326
9732
|
exports.ColumnLayout = ColumnLayout;
|
|
9327
|
-
exports.ComponentListPanel = _sfc_main$
|
|
9328
|
-
exports.ContentMenu = _sfc_main$
|
|
9329
|
-
exports.DataSourceFieldSelect = _sfc_main$
|
|
9330
|
-
exports.DataSourceFields = _sfc_main$
|
|
9331
|
-
exports.DataSourceInput = _sfc_main$
|
|
9332
|
-
exports.DataSourceMethodSelect = _sfc_main$
|
|
9333
|
-
exports.DataSourceMethods = _sfc_main$
|
|
9334
|
-
exports.DataSourceSelect = _sfc_main$
|
|
9733
|
+
exports.ComponentListPanel = _sfc_main$k;
|
|
9734
|
+
exports.ContentMenu = _sfc_main$j;
|
|
9735
|
+
exports.DataSourceFieldSelect = _sfc_main$H;
|
|
9736
|
+
exports.DataSourceFields = _sfc_main$I;
|
|
9737
|
+
exports.DataSourceInput = _sfc_main$G;
|
|
9738
|
+
exports.DataSourceMethodSelect = _sfc_main$E;
|
|
9739
|
+
exports.DataSourceMethods = _sfc_main$F;
|
|
9740
|
+
exports.DataSourceSelect = _sfc_main$D;
|
|
9335
9741
|
exports.DepTargetType = DepTargetType;
|
|
9336
|
-
exports.EventSelect = _sfc_main$
|
|
9742
|
+
exports.EventSelect = _sfc_main$C;
|
|
9337
9743
|
exports.Fixed2Other = Fixed2Other;
|
|
9338
9744
|
exports.H_GUIDE_LINE_STORAGE_KEY = H_GUIDE_LINE_STORAGE_KEY;
|
|
9339
|
-
exports.Icon = _sfc_main$
|
|
9745
|
+
exports.Icon = _sfc_main$K;
|
|
9340
9746
|
exports.KeyBindingCommand = KeyBindingCommand;
|
|
9341
|
-
exports.KeyValue = _sfc_main$
|
|
9747
|
+
exports.KeyValue = _sfc_main$B;
|
|
9342
9748
|
exports.Keys = Keys;
|
|
9343
9749
|
exports.LayerOffset = LayerOffset;
|
|
9344
|
-
exports.LayerPanel = _sfc_main$
|
|
9750
|
+
exports.LayerPanel = _sfc_main$f;
|
|
9345
9751
|
exports.Layout = Layout;
|
|
9346
|
-
exports.LayoutContainer = _sfc_main$
|
|
9347
|
-
exports.PropsPanel = _sfc_main$
|
|
9348
|
-
exports.Resizer = _sfc_main$
|
|
9349
|
-
exports.SplitView = _sfc_main$
|
|
9350
|
-
exports.TMagicCodeEditor = _sfc_main$
|
|
9752
|
+
exports.LayoutContainer = _sfc_main$y;
|
|
9753
|
+
exports.PropsPanel = _sfc_main$t;
|
|
9754
|
+
exports.Resizer = _sfc_main$z;
|
|
9755
|
+
exports.SplitView = _sfc_main$y;
|
|
9756
|
+
exports.TMagicCodeEditor = _sfc_main$Q;
|
|
9351
9757
|
exports.TMagicEditor = Editor;
|
|
9352
|
-
exports.ToolButton = _sfc_main$
|
|
9758
|
+
exports.ToolButton = _sfc_main$v;
|
|
9353
9759
|
exports.V_GUIDE_LINE_STORAGE_KEY = V_GUIDE_LINE_STORAGE_KEY;
|
|
9354
9760
|
exports.advancedTabConfig = advancedTabConfig;
|
|
9355
9761
|
exports.beforePaste = beforePaste;
|