@tmagic/editor 1.3.0-beta.0 → 1.3.0-beta.1
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 +29 -1
- package/dist/tmagic-editor.js +1014 -644
- package/dist/tmagic-editor.js.map +1 -1
- package/dist/tmagic-editor.umd.cjs +1032 -662
- 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/fields/DataSourceFields.vue +10 -0
- package/src/fields/DataSourceMethods.vue +1 -0
- 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 +159 -0
- package/src/layouts/workspace/viewer/NodeListMenuTitle.vue +68 -0
- package/src/layouts/workspace/{Stage.vue → viewer/Stage.vue} +2 -0
- package/src/theme/content-menu.scss +25 -1
- package/src/theme/index.scss +8 -0
- package/src/type.ts +2 -0
- package/src/utils/data-source/formConfigs/http.ts +9 -0
- package/src/utils/props.ts +20 -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/type.d.ts +2 -0
- /package/src/layouts/workspace/{ViewerMenu.vue → viewer/ViewerMenu.vue} +0 -0
package/dist/tmagic-editor.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, onMounted, onUnmounted, openBlock, createElementBlock, createBlock, Teleport, createElementVNode, normalizeClass, normalizeStyle, createVNode, unref, computed, reactive, resolveComponent, inject, withCtx, Fragment, createTextVNode, createCommentVNode, toRaw, resolveDynamicComponent, nextTick, mergeProps, toDisplayString, renderList, watchEffect, withModifiers, renderSlot, createSlots, normalizeProps, markRaw, getCurrentInstance, withDirectives, vShow, createStaticVNode, onBeforeUnmount, toHandlers, provide } from 'vue';
|
|
2
|
-
import { FullScreen, Edit, View, Coin, Delete, Plus, Close, ArrowDown, Grid, Memo, ScaleToOriginal, ZoomOut, ZoomIn, Right, Back, Search, Aim, CopyDocument, DocumentCopy, Files, Hide, Goods, List, EditPen,
|
|
1
|
+
import { defineComponent, ref, watch, onMounted, onUnmounted, openBlock, createElementBlock, createBlock, Teleport, createElementVNode, normalizeClass, normalizeStyle, createVNode, unref, computed, reactive, resolveComponent, inject, withCtx, Fragment, createTextVNode, createCommentVNode, toRaw, resolveDynamicComponent, nextTick, mergeProps, toDisplayString, renderList, watchEffect, withModifiers, renderSlot, createSlots, normalizeProps, markRaw, getCurrentInstance, withDirectives, vShow, createStaticVNode, Transition, onBeforeUnmount, toHandlers, provide } from 'vue';
|
|
2
|
+
import { FullScreen, Edit, View, Coin, Delete, Plus, Close, ArrowDown, Grid, Memo, ScaleToOriginal, ZoomOut, ZoomIn, Right, Back, Search, Aim, CopyDocument, DocumentCopy, Files, Hide, Goods, List, EditPen, Top, Bottom, ArrowLeftBold, ArrowRightBold, CaretBottom } from '@element-plus/icons-vue';
|
|
3
3
|
import { throttle, isEmpty, cloneDeep, mergeWith, isObject, uniq, map, has, difference, union, pick, keys } from 'lodash-es';
|
|
4
4
|
import * as monaco from 'monaco-editor';
|
|
5
5
|
import serialize from 'serialize-javascript';
|
|
@@ -8,16 +8,16 @@ import { HookType, NodeType, ActionType } from '@tmagic/schema';
|
|
|
8
8
|
import { MFormDrawer, MForm, createValues, MSelect } from '@tmagic/form';
|
|
9
9
|
import { MagicTable } from '@tmagic/table';
|
|
10
10
|
import Gesto from 'gesto';
|
|
11
|
-
import { guid, isPop, getNodePath, isNumber, isPage, toLine, removeClassNameByClassName, isObject as isObject$1
|
|
12
|
-
import StageCore, { GuidesType, getOffset, calcValueByFontsize, CONTAINER_HIGHLIGHT_CLASS_NAME, ContainerHighlightType } from '@tmagic/stage';
|
|
11
|
+
import { guid, isPop, getNodePath, isNumber, isPage, toLine, removeClassNameByClassName, getNodes, isObject as isObject$1 } from '@tmagic/utils';
|
|
12
|
+
import StageCore, { GuidesType, StageDragStatus, getOffset, calcValueByFontsize, CONTAINER_HIGHLIGHT_CLASS_NAME, ContainerHighlightType } from '@tmagic/stage';
|
|
13
13
|
import { EventEmitter } from 'events';
|
|
14
14
|
import { DEFAULT_EVENTS, DEFAULT_METHODS } from '@tmagic/core';
|
|
15
15
|
import KeyController from 'keycon';
|
|
16
16
|
|
|
17
|
-
const _hoisted_1$
|
|
17
|
+
const _hoisted_1$w = {
|
|
18
18
|
class: /* @__PURE__ */ normalizeClass(`magic-code-editor`)
|
|
19
19
|
};
|
|
20
|
-
const _sfc_main$
|
|
20
|
+
const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
21
21
|
...{
|
|
22
22
|
name: "MEditorCodeEditor"
|
|
23
23
|
},
|
|
@@ -164,7 +164,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
164
164
|
}
|
|
165
165
|
});
|
|
166
166
|
return (_ctx, _cache) => {
|
|
167
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
167
|
+
return openBlock(), createElementBlock("div", _hoisted_1$w, [
|
|
168
168
|
(openBlock(), createBlock(Teleport, {
|
|
169
169
|
to: "body",
|
|
170
170
|
disabled: !fullScreen.value
|
|
@@ -192,7 +192,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
192
192
|
}
|
|
193
193
|
});
|
|
194
194
|
|
|
195
|
-
const _sfc_main$
|
|
195
|
+
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
196
196
|
...{
|
|
197
197
|
name: "MEditorCode"
|
|
198
198
|
},
|
|
@@ -216,7 +216,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
216
216
|
emit("change", v);
|
|
217
217
|
};
|
|
218
218
|
return (_ctx, _cache) => {
|
|
219
|
-
return openBlock(), createBlock(_sfc_main$
|
|
219
|
+
return openBlock(), createBlock(_sfc_main$Q, {
|
|
220
220
|
height: _ctx.config.height,
|
|
221
221
|
"init-values": _ctx.model[_ctx.name],
|
|
222
222
|
language: _ctx.config.language,
|
|
@@ -236,7 +236,7 @@ const setConfig = (option) => {
|
|
|
236
236
|
};
|
|
237
237
|
const getConfig = (key) => $TMAGIC_EDITOR[key];
|
|
238
238
|
|
|
239
|
-
const _sfc_main$
|
|
239
|
+
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
240
240
|
...{
|
|
241
241
|
name: "MEditorCodeLink"
|
|
242
242
|
},
|
|
@@ -315,7 +315,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
315
315
|
}
|
|
316
316
|
});
|
|
317
317
|
|
|
318
|
-
const _sfc_main$
|
|
318
|
+
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
319
319
|
...{
|
|
320
320
|
name: "MEditorCodeSelect"
|
|
321
321
|
},
|
|
@@ -387,11 +387,11 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
387
387
|
}
|
|
388
388
|
});
|
|
389
389
|
|
|
390
|
-
const _hoisted_1$
|
|
391
|
-
const _hoisted_2$
|
|
392
|
-
const _hoisted_3$
|
|
393
|
-
const _hoisted_4$
|
|
394
|
-
const _sfc_main$
|
|
390
|
+
const _hoisted_1$v = { style: { "display": "flex", "margin-bottom": "10px" } };
|
|
391
|
+
const _hoisted_2$n = { style: { "flex": "1" } };
|
|
392
|
+
const _hoisted_3$a = { style: { "flex": "1" } };
|
|
393
|
+
const _hoisted_4$6 = { class: "dialog-footer" };
|
|
394
|
+
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
395
395
|
...{
|
|
396
396
|
name: "MEditorCodeBlockEditor"
|
|
397
397
|
},
|
|
@@ -399,7 +399,8 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
399
399
|
props: {
|
|
400
400
|
content: {},
|
|
401
401
|
disabled: { type: Boolean },
|
|
402
|
-
isDataSource: { type: Boolean }
|
|
402
|
+
isDataSource: { type: Boolean },
|
|
403
|
+
dataSourceType: {}
|
|
403
404
|
},
|
|
404
405
|
emits: ["submit"],
|
|
405
406
|
setup(__props, { expose: __expose, emit }) {
|
|
@@ -459,7 +460,8 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
459
460
|
const functionConfig = computed(() => [
|
|
460
461
|
{
|
|
461
462
|
text: "名称",
|
|
462
|
-
name: "name"
|
|
463
|
+
name: "name",
|
|
464
|
+
rules: [{ required: true, message: "请输入名称", trigger: "blur" }]
|
|
463
465
|
},
|
|
464
466
|
{
|
|
465
467
|
text: "描述",
|
|
@@ -469,10 +471,17 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
469
471
|
text: "执行时机",
|
|
470
472
|
name: "timing",
|
|
471
473
|
type: "select",
|
|
472
|
-
options:
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
474
|
+
options: () => {
|
|
475
|
+
const options = [
|
|
476
|
+
{ text: "初始化前", value: "beforeInit" },
|
|
477
|
+
{ text: "初始化后", value: "afterInit" }
|
|
478
|
+
];
|
|
479
|
+
if (props.dataSourceType !== "base") {
|
|
480
|
+
options.push({ text: "请求前", value: "beforeRequest" });
|
|
481
|
+
options.push({ text: "请求后", value: "afterRequest" });
|
|
482
|
+
}
|
|
483
|
+
return options;
|
|
484
|
+
},
|
|
476
485
|
display: () => props.isDataSource
|
|
477
486
|
},
|
|
478
487
|
{
|
|
@@ -601,7 +610,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
601
610
|
fullscreen: ""
|
|
602
611
|
}, {
|
|
603
612
|
footer: withCtx(() => [
|
|
604
|
-
createElementVNode("span", _hoisted_4$
|
|
613
|
+
createElementVNode("span", _hoisted_4$6, [
|
|
605
614
|
createVNode(unref(TMagicButton), {
|
|
606
615
|
size: "small",
|
|
607
616
|
onClick: _cache[1] || (_cache[1] = ($event) => difVisible.value = false)
|
|
@@ -624,8 +633,8 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
624
633
|
])
|
|
625
634
|
]),
|
|
626
635
|
default: withCtx(() => [
|
|
627
|
-
createElementVNode("div", _hoisted_1$
|
|
628
|
-
createElementVNode("div", _hoisted_2$
|
|
636
|
+
createElementVNode("div", _hoisted_1$v, [
|
|
637
|
+
createElementVNode("div", _hoisted_2$n, [
|
|
629
638
|
createVNode(unref(TMagicTag), {
|
|
630
639
|
size: "small",
|
|
631
640
|
type: "info"
|
|
@@ -636,7 +645,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
636
645
|
_: 1
|
|
637
646
|
})
|
|
638
647
|
]),
|
|
639
|
-
createElementVNode("div", _hoisted_3$
|
|
648
|
+
createElementVNode("div", _hoisted_3$a, [
|
|
640
649
|
createVNode(unref(TMagicTag), {
|
|
641
650
|
size: "small",
|
|
642
651
|
type: "success"
|
|
@@ -648,7 +657,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
648
657
|
})
|
|
649
658
|
])
|
|
650
659
|
]),
|
|
651
|
-
difVisible.value ? (openBlock(), createBlock(_sfc_main$
|
|
660
|
+
difVisible.value ? (openBlock(), createBlock(_sfc_main$Q, {
|
|
652
661
|
key: 0,
|
|
653
662
|
ref_key: "magicVsEditor",
|
|
654
663
|
ref: magicVsEditor,
|
|
@@ -702,6 +711,15 @@ const HttpFormConfig = [
|
|
|
702
711
|
type: "switch",
|
|
703
712
|
defaultValue: true
|
|
704
713
|
},
|
|
714
|
+
{
|
|
715
|
+
name: "responseOptions",
|
|
716
|
+
items: [
|
|
717
|
+
{
|
|
718
|
+
name: "dataPath",
|
|
719
|
+
text: "数据路径"
|
|
720
|
+
}
|
|
721
|
+
]
|
|
722
|
+
},
|
|
705
723
|
{
|
|
706
724
|
type: "fieldset",
|
|
707
725
|
name: "options",
|
|
@@ -1254,21 +1272,28 @@ const displayTabConfig = {
|
|
|
1254
1272
|
items: [
|
|
1255
1273
|
{
|
|
1256
1274
|
name: "value",
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1275
|
+
type: (mForm, { model }) => {
|
|
1276
|
+
const [id, field] = model.field;
|
|
1277
|
+
const ds = dataSourceService.getDataSourceById(id);
|
|
1278
|
+
const type = ds?.fields.find((f) => f.name === field)?.type;
|
|
1279
|
+
if (type === "number") {
|
|
1280
|
+
return "number";
|
|
1281
|
+
}
|
|
1282
|
+
if (type === "boolean") {
|
|
1283
|
+
return "select";
|
|
1284
|
+
}
|
|
1285
|
+
return "text";
|
|
1286
|
+
},
|
|
1262
1287
|
options: [
|
|
1263
1288
|
{ text: "true", value: true },
|
|
1264
1289
|
{ text: "false", value: false }
|
|
1265
1290
|
],
|
|
1266
|
-
display: (vm, { model }) => ["
|
|
1291
|
+
display: (vm, { model }) => !["between", "not_between"].includes(model.op)
|
|
1267
1292
|
},
|
|
1268
1293
|
{
|
|
1269
1294
|
name: "range",
|
|
1270
1295
|
type: "number-range",
|
|
1271
|
-
display: (vm, { model }) => ["between", "not_between"].includes(model.op)
|
|
1296
|
+
display: (vm, { model }) => ["between", "not_between"].includes(model.op)
|
|
1272
1297
|
}
|
|
1273
1298
|
]
|
|
1274
1299
|
}
|
|
@@ -2748,7 +2773,7 @@ const getDefaultConfig = async (addNode, parentNode) => {
|
|
|
2748
2773
|
return newNode;
|
|
2749
2774
|
};
|
|
2750
2775
|
|
|
2751
|
-
const _sfc_main$
|
|
2776
|
+
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
2752
2777
|
...{
|
|
2753
2778
|
name: "MEditorCodeParams"
|
|
2754
2779
|
},
|
|
@@ -2797,8 +2822,8 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
2797
2822
|
}
|
|
2798
2823
|
});
|
|
2799
2824
|
|
|
2800
|
-
const _hoisted_1$
|
|
2801
|
-
const _sfc_main$
|
|
2825
|
+
const _hoisted_1$u = ["src"];
|
|
2826
|
+
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
2802
2827
|
...{
|
|
2803
2828
|
name: "MEditorIcon"
|
|
2804
2829
|
},
|
|
@@ -2821,7 +2846,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
2821
2846
|
class: "magic-editor-icon"
|
|
2822
2847
|
}, {
|
|
2823
2848
|
default: withCtx(() => [
|
|
2824
|
-
createElementVNode("img", { src: _ctx.icon }, null, 8, _hoisted_1$
|
|
2849
|
+
createElementVNode("img", { src: _ctx.icon }, null, 8, _hoisted_1$u)
|
|
2825
2850
|
]),
|
|
2826
2851
|
_: 1
|
|
2827
2852
|
})) : typeof _ctx.icon === "string" ? (openBlock(), createElementBlock("i", {
|
|
@@ -2898,9 +2923,9 @@ const useCodeBlockEdit = (codeBlockService) => {
|
|
|
2898
2923
|
};
|
|
2899
2924
|
};
|
|
2900
2925
|
|
|
2901
|
-
const _hoisted_1$
|
|
2902
|
-
const _hoisted_2$
|
|
2903
|
-
const _sfc_main$
|
|
2926
|
+
const _hoisted_1$t = { class: "m-fields-code-select-col" };
|
|
2927
|
+
const _hoisted_2$m = { class: "code-select-container" };
|
|
2928
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
2904
2929
|
...{
|
|
2905
2930
|
name: "MEditorCodeSelectCol"
|
|
2906
2931
|
},
|
|
@@ -2974,22 +2999,22 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
2974
2999
|
const { codeBlockEditor, codeConfig, editCode, submitCodeBlockHandler } = useCodeBlockEdit(services?.codeBlockService);
|
|
2975
3000
|
return (_ctx, _cache) => {
|
|
2976
3001
|
const _component_m_form_container = resolveComponent("m-form-container");
|
|
2977
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2978
|
-
createElementVNode("div", _hoisted_2$
|
|
3002
|
+
return openBlock(), createElementBlock("div", _hoisted_1$t, [
|
|
3003
|
+
createElementVNode("div", _hoisted_2$m, [
|
|
2979
3004
|
createVNode(_component_m_form_container, {
|
|
2980
3005
|
class: "select",
|
|
2981
3006
|
config: selectConfig,
|
|
2982
3007
|
model: _ctx.model,
|
|
2983
3008
|
onChange: onParamsChangeHandler
|
|
2984
3009
|
}, null, 8, ["model"]),
|
|
2985
|
-
_ctx.model[_ctx.name] ? (openBlock(), createBlock(_sfc_main$
|
|
3010
|
+
_ctx.model[_ctx.name] ? (openBlock(), createBlock(_sfc_main$K, {
|
|
2986
3011
|
key: 0,
|
|
2987
3012
|
class: "icon",
|
|
2988
3013
|
icon: !_ctx.disabled ? unref(Edit) : unref(View),
|
|
2989
3014
|
onClick: _cache[0] || (_cache[0] = ($event) => unref(editCode)(_ctx.model[_ctx.name]))
|
|
2990
3015
|
}, null, 8, ["icon"])) : createCommentVNode("", true)
|
|
2991
3016
|
]),
|
|
2992
|
-
paramsConfig.value.length ? (openBlock(), createBlock(_sfc_main$
|
|
3017
|
+
paramsConfig.value.length ? (openBlock(), createBlock(_sfc_main$L, {
|
|
2993
3018
|
key: 0,
|
|
2994
3019
|
name: "params",
|
|
2995
3020
|
model: _ctx.model,
|
|
@@ -2997,7 +3022,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
2997
3022
|
"params-config": paramsConfig.value,
|
|
2998
3023
|
onChange: onParamsChangeHandler
|
|
2999
3024
|
}, null, 8, ["model", "size", "params-config"])) : createCommentVNode("", true),
|
|
3000
|
-
unref(codeConfig) ? (openBlock(), createBlock(_sfc_main$
|
|
3025
|
+
unref(codeConfig) ? (openBlock(), createBlock(_sfc_main$M, {
|
|
3001
3026
|
key: 1,
|
|
3002
3027
|
ref_key: "codeBlockEditor",
|
|
3003
3028
|
ref: codeBlockEditor,
|
|
@@ -3010,9 +3035,9 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
3010
3035
|
}
|
|
3011
3036
|
});
|
|
3012
3037
|
|
|
3013
|
-
const _hoisted_1$
|
|
3014
|
-
const _hoisted_2$
|
|
3015
|
-
const _sfc_main$
|
|
3038
|
+
const _hoisted_1$s = { class: "m-editor-data-source-fields" };
|
|
3039
|
+
const _hoisted_2$l = { class: "m-editor-data-source-fields-footer" };
|
|
3040
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
3016
3041
|
...{
|
|
3017
3042
|
name: "MEditorDataSourceFields"
|
|
3018
3043
|
},
|
|
@@ -3147,7 +3172,18 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
3147
3172
|
},
|
|
3148
3173
|
{
|
|
3149
3174
|
name: "defaultValue",
|
|
3150
|
-
text: "默认值"
|
|
3175
|
+
text: "默认值",
|
|
3176
|
+
type: (mForm, { model }) => {
|
|
3177
|
+
if (model.type === "number")
|
|
3178
|
+
return "number";
|
|
3179
|
+
if (model.type === "boolean")
|
|
3180
|
+
return "select";
|
|
3181
|
+
return "string";
|
|
3182
|
+
},
|
|
3183
|
+
options: [
|
|
3184
|
+
{ text: "true", value: true },
|
|
3185
|
+
{ text: "false", value: false }
|
|
3186
|
+
]
|
|
3151
3187
|
},
|
|
3152
3188
|
{
|
|
3153
3189
|
name: "enable",
|
|
@@ -3163,12 +3199,12 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
3163
3199
|
}
|
|
3164
3200
|
];
|
|
3165
3201
|
return (_ctx, _cache) => {
|
|
3166
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3202
|
+
return openBlock(), createElementBlock("div", _hoisted_1$s, [
|
|
3167
3203
|
createVNode(unref(MagicTable), {
|
|
3168
3204
|
data: _ctx.model[_ctx.name],
|
|
3169
3205
|
columns: fieldColumns
|
|
3170
3206
|
}, null, 8, ["data"]),
|
|
3171
|
-
createElementVNode("div", _hoisted_2$
|
|
3207
|
+
createElementVNode("div", _hoisted_2$l, [
|
|
3172
3208
|
createVNode(unref(TMagicButton), {
|
|
3173
3209
|
size: "small",
|
|
3174
3210
|
type: "primary",
|
|
@@ -3199,7 +3235,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
3199
3235
|
}
|
|
3200
3236
|
});
|
|
3201
3237
|
|
|
3202
|
-
const _sfc_main$
|
|
3238
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
3203
3239
|
__name: "DataSourceFieldSelect",
|
|
3204
3240
|
props: {
|
|
3205
3241
|
config: {},
|
|
@@ -3246,10 +3282,10 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
3246
3282
|
}
|
|
3247
3283
|
});
|
|
3248
3284
|
|
|
3249
|
-
const _hoisted_1$
|
|
3250
|
-
const _hoisted_2$
|
|
3251
|
-
const _hoisted_3$
|
|
3252
|
-
const _sfc_main$
|
|
3285
|
+
const _hoisted_1$r = { style: { "display": "flex", "flex-direction": "column", "line-height": "1.2em" } };
|
|
3286
|
+
const _hoisted_2$k = { style: { "font-size": "10px", "color": "rgba(0, 0, 0, 0.6)" } };
|
|
3287
|
+
const _hoisted_3$9 = { class: "el-input__inner" };
|
|
3288
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
3253
3289
|
...{
|
|
3254
3290
|
name: "MEditorDataSourceInput"
|
|
3255
3291
|
},
|
|
@@ -3438,12 +3474,12 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
3438
3474
|
}
|
|
3439
3475
|
), {
|
|
3440
3476
|
suffix: withCtx(() => [
|
|
3441
|
-
createVNode(_sfc_main$
|
|
3477
|
+
createVNode(_sfc_main$K, { icon: unref(Coin) }, null, 8, ["icon"])
|
|
3442
3478
|
]),
|
|
3443
3479
|
default: withCtx(({ item }) => [
|
|
3444
|
-
createElementVNode("div", _hoisted_1$
|
|
3480
|
+
createElementVNode("div", _hoisted_1$r, [
|
|
3445
3481
|
createElementVNode("div", null, toDisplayString(item.text), 1),
|
|
3446
|
-
createElementVNode("span", _hoisted_2$
|
|
3482
|
+
createElementVNode("span", _hoisted_2$k, toDisplayString(item.value), 1)
|
|
3447
3483
|
])
|
|
3448
3484
|
]),
|
|
3449
3485
|
_: 1
|
|
@@ -3455,7 +3491,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
3455
3491
|
createElementVNode("div", {
|
|
3456
3492
|
class: normalizeClass(`tmagic-data-source-input-text-wrapper el-input__wrapper ${isFocused.value ? " is-focus" : ""}`)
|
|
3457
3493
|
}, [
|
|
3458
|
-
createElementVNode("div", _hoisted_3$
|
|
3494
|
+
createElementVNode("div", _hoisted_3$9, [
|
|
3459
3495
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayState.value, (item, index) => {
|
|
3460
3496
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
3461
3497
|
item.type === "text" ? (openBlock(), createElementBlock("span", {
|
|
@@ -3473,7 +3509,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
3473
3509
|
}, 1032, ["size"])) : createCommentVNode("", true)
|
|
3474
3510
|
], 64);
|
|
3475
3511
|
}), 256)),
|
|
3476
|
-
createVNode(_sfc_main$
|
|
3512
|
+
createVNode(_sfc_main$K, {
|
|
3477
3513
|
class: "tmagic-data-source-input-icon",
|
|
3478
3514
|
icon: unref(Coin)
|
|
3479
3515
|
}, null, 8, ["icon"])
|
|
@@ -3556,9 +3592,9 @@ const useDataSourceMethod = () => {
|
|
|
3556
3592
|
};
|
|
3557
3593
|
};
|
|
3558
3594
|
|
|
3559
|
-
const _hoisted_1$
|
|
3560
|
-
const _hoisted_2$
|
|
3561
|
-
const _sfc_main$
|
|
3595
|
+
const _hoisted_1$q = { class: "m-editor-data-source-methods" };
|
|
3596
|
+
const _hoisted_2$j = { class: "m-editor-data-source-methods-footer" };
|
|
3597
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
3562
3598
|
...{
|
|
3563
3599
|
name: "MEditorDataSourceMethods"
|
|
3564
3600
|
},
|
|
@@ -3627,12 +3663,12 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
3627
3663
|
emit("change", props.model[props.name]);
|
|
3628
3664
|
};
|
|
3629
3665
|
return (_ctx, _cache) => {
|
|
3630
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3666
|
+
return openBlock(), createElementBlock("div", _hoisted_1$q, [
|
|
3631
3667
|
createVNode(unref(MagicTable), {
|
|
3632
3668
|
data: _ctx.model[_ctx.name],
|
|
3633
3669
|
columns: methodColumns
|
|
3634
3670
|
}, null, 8, ["data"]),
|
|
3635
|
-
createElementVNode("div", _hoisted_2$
|
|
3671
|
+
createElementVNode("div", _hoisted_2$j, [
|
|
3636
3672
|
createVNode(unref(TMagicButton), {
|
|
3637
3673
|
size: "small",
|
|
3638
3674
|
type: "primary",
|
|
@@ -3646,23 +3682,24 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
3646
3682
|
_: 1
|
|
3647
3683
|
}, 8, ["disabled"])
|
|
3648
3684
|
]),
|
|
3649
|
-
unref(codeConfig) ? (openBlock(), createBlock(_sfc_main$
|
|
3685
|
+
unref(codeConfig) ? (openBlock(), createBlock(_sfc_main$M, {
|
|
3650
3686
|
key: 0,
|
|
3651
3687
|
ref_key: "codeBlockEditor",
|
|
3652
3688
|
ref: codeBlockEditor,
|
|
3653
3689
|
disabled: _ctx.disabled,
|
|
3654
3690
|
content: unref(codeConfig),
|
|
3655
3691
|
"is-data-source": true,
|
|
3692
|
+
"data-source-type": _ctx.model.type,
|
|
3656
3693
|
onSubmit: submitCodeHandler
|
|
3657
|
-
}, null, 8, ["disabled", "content"])) : createCommentVNode("", true)
|
|
3694
|
+
}, null, 8, ["disabled", "content", "data-source-type"])) : createCommentVNode("", true)
|
|
3658
3695
|
]);
|
|
3659
3696
|
};
|
|
3660
3697
|
}
|
|
3661
3698
|
});
|
|
3662
3699
|
|
|
3663
|
-
const _hoisted_1$
|
|
3664
|
-
const _hoisted_2$
|
|
3665
|
-
const _sfc_main$
|
|
3700
|
+
const _hoisted_1$p = { class: "m-fields-data-source-method-select" };
|
|
3701
|
+
const _hoisted_2$i = { class: "data-source-method-select-container" };
|
|
3702
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
3666
3703
|
...{
|
|
3667
3704
|
name: "MEditorDataSourceMethodSelect"
|
|
3668
3705
|
},
|
|
@@ -3740,22 +3777,22 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
3740
3777
|
};
|
|
3741
3778
|
return (_ctx, _cache) => {
|
|
3742
3779
|
const _component_m_form_container = resolveComponent("m-form-container");
|
|
3743
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3744
|
-
createElementVNode("div", _hoisted_2$
|
|
3780
|
+
return openBlock(), createElementBlock("div", _hoisted_1$p, [
|
|
3781
|
+
createElementVNode("div", _hoisted_2$i, [
|
|
3745
3782
|
createVNode(_component_m_form_container, {
|
|
3746
3783
|
class: "select",
|
|
3747
3784
|
config: cascaderConfig,
|
|
3748
3785
|
model: _ctx.model,
|
|
3749
3786
|
onChange: onChangeHandler
|
|
3750
3787
|
}, null, 8, ["model"]),
|
|
3751
|
-
_ctx.model[_ctx.name] ? (openBlock(), createBlock(_sfc_main$
|
|
3788
|
+
_ctx.model[_ctx.name] ? (openBlock(), createBlock(_sfc_main$K, {
|
|
3752
3789
|
key: 0,
|
|
3753
3790
|
class: "icon",
|
|
3754
3791
|
icon: !_ctx.disabled ? unref(Edit) : unref(View),
|
|
3755
3792
|
onClick: editCodeHandler
|
|
3756
3793
|
}, null, 8, ["icon"])) : createCommentVNode("", true)
|
|
3757
3794
|
]),
|
|
3758
|
-
paramsConfig.value.length ? (openBlock(), createBlock(_sfc_main$
|
|
3795
|
+
paramsConfig.value.length ? (openBlock(), createBlock(_sfc_main$L, {
|
|
3759
3796
|
key: 0,
|
|
3760
3797
|
name: "params",
|
|
3761
3798
|
model: _ctx.model,
|
|
@@ -3764,7 +3801,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
3764
3801
|
"params-config": paramsConfig.value,
|
|
3765
3802
|
onChange: onChangeHandler
|
|
3766
3803
|
}, null, 8, ["model", "size", "disabled", "params-config"])) : createCommentVNode("", true),
|
|
3767
|
-
unref(codeConfig) ? (openBlock(), createBlock(_sfc_main$
|
|
3804
|
+
unref(codeConfig) ? (openBlock(), createBlock(_sfc_main$M, {
|
|
3768
3805
|
key: 1,
|
|
3769
3806
|
ref_key: "codeBlockEditor",
|
|
3770
3807
|
ref: codeBlockEditor,
|
|
@@ -3777,7 +3814,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
3777
3814
|
}
|
|
3778
3815
|
});
|
|
3779
3816
|
|
|
3780
|
-
const _sfc_main$
|
|
3817
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
3781
3818
|
...{
|
|
3782
3819
|
name: "MEditorDataSourceSelect"
|
|
3783
3820
|
},
|
|
@@ -3832,12 +3869,12 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
3832
3869
|
}
|
|
3833
3870
|
});
|
|
3834
3871
|
|
|
3835
|
-
const _hoisted_1$
|
|
3836
|
-
const _hoisted_2$
|
|
3872
|
+
const _hoisted_1$o = { class: "m-fields-event-select" };
|
|
3873
|
+
const _hoisted_2$h = {
|
|
3837
3874
|
key: 1,
|
|
3838
3875
|
class: "fullWidth"
|
|
3839
3876
|
};
|
|
3840
|
-
const _sfc_main$
|
|
3877
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
3841
3878
|
...{
|
|
3842
3879
|
name: "MEditorEventSelect"
|
|
3843
3880
|
},
|
|
@@ -4027,7 +4064,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
4027
4064
|
const _component_m_form_table = resolveComponent("m-form-table");
|
|
4028
4065
|
const _component_m_form_container = resolveComponent("m-form-container");
|
|
4029
4066
|
const _component_m_form_panel = resolveComponent("m-form-panel");
|
|
4030
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
4067
|
+
return openBlock(), createElementBlock("div", _hoisted_1$o, [
|
|
4031
4068
|
isOldVersion.value ? (openBlock(), createBlock(_component_m_form_table, {
|
|
4032
4069
|
key: 0,
|
|
4033
4070
|
ref: "eventForm",
|
|
@@ -4037,7 +4074,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
4037
4074
|
model: _ctx.model,
|
|
4038
4075
|
config: tableConfig.value,
|
|
4039
4076
|
onChange: onChangeHandler
|
|
4040
|
-
}, null, 8, ["size", "disabled", "model", "config"])) : (openBlock(), createElementBlock("div", _hoisted_2$
|
|
4077
|
+
}, null, 8, ["size", "disabled", "model", "config"])) : (openBlock(), createElementBlock("div", _hoisted_2$h, [
|
|
4041
4078
|
createVNode(unref(TMagicButton), {
|
|
4042
4079
|
class: "create-button",
|
|
4043
4080
|
type: "primary",
|
|
@@ -4086,9 +4123,9 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
4086
4123
|
}
|
|
4087
4124
|
});
|
|
4088
4125
|
|
|
4089
|
-
const _hoisted_1$
|
|
4090
|
-
const _hoisted_2$
|
|
4091
|
-
const _sfc_main$
|
|
4126
|
+
const _hoisted_1$n = { class: "m-fields-key-value" };
|
|
4127
|
+
const _hoisted_2$g = /* @__PURE__ */ createElementVNode("span", { class: "m-fileds-key-value-delimiter" }, ":", -1);
|
|
4128
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
4092
4129
|
...{
|
|
4093
4130
|
name: "MEditorKeyValue"
|
|
4094
4131
|
},
|
|
@@ -4133,7 +4170,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
4133
4170
|
records.value.splice(index, 1);
|
|
4134
4171
|
};
|
|
4135
4172
|
return (_ctx, _cache) => {
|
|
4136
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
4173
|
+
return openBlock(), createElementBlock("div", _hoisted_1$n, [
|
|
4137
4174
|
(openBlock(true), createElementBlock(Fragment, null, renderList(records.value, (item, index) => {
|
|
4138
4175
|
return openBlock(), createElementBlock("div", {
|
|
4139
4176
|
class: "m-fields-key-value-item",
|
|
@@ -4147,7 +4184,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
4147
4184
|
size: _ctx.size,
|
|
4148
4185
|
onChange: keyChangeHandler
|
|
4149
4186
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "size"]),
|
|
4150
|
-
_hoisted_2$
|
|
4187
|
+
_hoisted_2$g,
|
|
4151
4188
|
createVNode(unref(TMagicInput), {
|
|
4152
4189
|
placeholder: "value",
|
|
4153
4190
|
modelValue: records.value[index][1],
|
|
@@ -4186,12 +4223,12 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
4186
4223
|
}
|
|
4187
4224
|
});
|
|
4188
4225
|
|
|
4189
|
-
const _hoisted_1$
|
|
4226
|
+
const _hoisted_1$m = {
|
|
4190
4227
|
key: 1,
|
|
4191
4228
|
class: "m-fields-ui-select",
|
|
4192
4229
|
style: { "display": "flex" }
|
|
4193
4230
|
};
|
|
4194
|
-
const _sfc_main$
|
|
4231
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
4195
4232
|
...{
|
|
4196
4233
|
name: "MEditorUISelect"
|
|
4197
4234
|
},
|
|
@@ -4280,7 +4317,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
4280
4317
|
]),
|
|
4281
4318
|
_: 1
|
|
4282
4319
|
}, 8, ["icon", "disabled", "size"])
|
|
4283
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_1$
|
|
4320
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_1$m, [
|
|
4284
4321
|
val.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4285
4322
|
createVNode(unref(TMagicTooltip), {
|
|
4286
4323
|
content: "清除",
|
|
@@ -4349,7 +4386,35 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
4349
4386
|
|
|
4350
4387
|
const UISelect_vue_vue_type_style_index_0_lang = '';
|
|
4351
4388
|
|
|
4352
|
-
const
|
|
4389
|
+
const useGetSo = (target, emit) => {
|
|
4390
|
+
let getso;
|
|
4391
|
+
const isDraging = ref(false);
|
|
4392
|
+
onMounted(() => {
|
|
4393
|
+
if (!target.value)
|
|
4394
|
+
return;
|
|
4395
|
+
getso = new Gesto(target.value, {
|
|
4396
|
+
container: window,
|
|
4397
|
+
pinchOutside: true
|
|
4398
|
+
}).on("drag", (e) => {
|
|
4399
|
+
if (!target.value)
|
|
4400
|
+
return;
|
|
4401
|
+
emit("change", e);
|
|
4402
|
+
}).on("dragStart", () => {
|
|
4403
|
+
isDraging.value = true;
|
|
4404
|
+
}).on("dragEnd", () => {
|
|
4405
|
+
isDraging.value = false;
|
|
4406
|
+
});
|
|
4407
|
+
});
|
|
4408
|
+
onUnmounted(() => {
|
|
4409
|
+
getso?.unset();
|
|
4410
|
+
isDraging.value = false;
|
|
4411
|
+
});
|
|
4412
|
+
return {
|
|
4413
|
+
isDraging
|
|
4414
|
+
};
|
|
4415
|
+
};
|
|
4416
|
+
|
|
4417
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
4353
4418
|
...{
|
|
4354
4419
|
name: "MEditorResizer"
|
|
4355
4420
|
},
|
|
@@ -4357,33 +4422,12 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
4357
4422
|
emits: ["change"],
|
|
4358
4423
|
setup(__props, { emit }) {
|
|
4359
4424
|
const target = ref();
|
|
4360
|
-
const isDraging =
|
|
4361
|
-
let getso;
|
|
4362
|
-
onMounted(() => {
|
|
4363
|
-
if (!target.value)
|
|
4364
|
-
return;
|
|
4365
|
-
getso = new Gesto(target.value, {
|
|
4366
|
-
container: window,
|
|
4367
|
-
pinchOutside: true
|
|
4368
|
-
}).on("drag", (e) => {
|
|
4369
|
-
if (!target.value)
|
|
4370
|
-
return;
|
|
4371
|
-
emit("change", e.deltaX);
|
|
4372
|
-
}).on("dragStart", () => {
|
|
4373
|
-
isDraging.value = true;
|
|
4374
|
-
}).on("dragEnd", () => {
|
|
4375
|
-
isDraging.value = false;
|
|
4376
|
-
});
|
|
4377
|
-
});
|
|
4378
|
-
onUnmounted(() => {
|
|
4379
|
-
getso?.unset();
|
|
4380
|
-
isDraging.value = false;
|
|
4381
|
-
});
|
|
4425
|
+
const { isDraging } = useGetSo(target, emit);
|
|
4382
4426
|
return (_ctx, _cache) => {
|
|
4383
4427
|
return openBlock(), createElementBlock("span", {
|
|
4384
4428
|
ref_key: "target",
|
|
4385
4429
|
ref: target,
|
|
4386
|
-
class: normalizeClass(["m-editor-resizer", { "m-editor-resizer-draging": isDraging
|
|
4430
|
+
class: normalizeClass(["m-editor-resizer", { "m-editor-resizer-draging": unref(isDraging) }])
|
|
4387
4431
|
}, [
|
|
4388
4432
|
renderSlot(_ctx.$slots, "default")
|
|
4389
4433
|
], 2);
|
|
@@ -4391,7 +4435,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
4391
4435
|
}
|
|
4392
4436
|
});
|
|
4393
4437
|
|
|
4394
|
-
const _sfc_main$
|
|
4438
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
4395
4439
|
...{
|
|
4396
4440
|
name: "MEditorLayout"
|
|
4397
4441
|
},
|
|
@@ -4458,7 +4502,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
4458
4502
|
resizerObserver.disconnect();
|
|
4459
4503
|
});
|
|
4460
4504
|
const center = ref(0);
|
|
4461
|
-
const changeLeft = (deltaX) => {
|
|
4505
|
+
const changeLeft = ({ deltaX }) => {
|
|
4462
4506
|
if (typeof props.left === "undefined")
|
|
4463
4507
|
return;
|
|
4464
4508
|
let left = Math.max(props.left + deltaX, props.minLeft) || 0;
|
|
@@ -4474,7 +4518,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
4474
4518
|
right: columnWidth.right
|
|
4475
4519
|
});
|
|
4476
4520
|
};
|
|
4477
|
-
const changeRight = (deltaX) => {
|
|
4521
|
+
const changeRight = ({ deltaX }) => {
|
|
4478
4522
|
if (typeof props.right === "undefined")
|
|
4479
4523
|
return;
|
|
4480
4524
|
let right = Math.max(props.right - deltaX, props.minRight) || 0;
|
|
@@ -4503,7 +4547,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
4503
4547
|
}, [
|
|
4504
4548
|
renderSlot(_ctx.$slots, "left")
|
|
4505
4549
|
], 6),
|
|
4506
|
-
createVNode(_sfc_main$
|
|
4550
|
+
createVNode(_sfc_main$z, { onChange: changeLeft })
|
|
4507
4551
|
], 64)) : createCommentVNode("", true),
|
|
4508
4552
|
createElementVNode("div", {
|
|
4509
4553
|
class: normalizeClass(["m-editor-layout-center", _ctx.centerClass]),
|
|
@@ -4512,7 +4556,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
4512
4556
|
renderSlot(_ctx.$slots, "center")
|
|
4513
4557
|
], 6),
|
|
4514
4558
|
hasRight.value && _ctx.$slots.right ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4515
|
-
createVNode(_sfc_main$
|
|
4559
|
+
createVNode(_sfc_main$z, { onChange: changeRight }),
|
|
4516
4560
|
createElementVNode("div", {
|
|
4517
4561
|
class: normalizeClass(["m-editor-layout-right", _ctx.rightClass]),
|
|
4518
4562
|
style: normalizeStyle(`width: ${_ctx.right}px`)
|
|
@@ -4525,10 +4569,10 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
4525
4569
|
}
|
|
4526
4570
|
});
|
|
4527
4571
|
|
|
4528
|
-
const _hoisted_1$
|
|
4529
|
-
const _hoisted_2$
|
|
4530
|
-
const _hoisted_3$
|
|
4531
|
-
const _sfc_main$
|
|
4572
|
+
const _hoisted_1$l = { class: "m-editor-empty-panel" };
|
|
4573
|
+
const _hoisted_2$f = { class: "m-editor-empty-content" };
|
|
4574
|
+
const _hoisted_3$8 = /* @__PURE__ */ createElementVNode("p", null, "新增页面", -1);
|
|
4575
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
4532
4576
|
...{
|
|
4533
4577
|
name: "MEditorAddPageBox"
|
|
4534
4578
|
},
|
|
@@ -4548,16 +4592,16 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
4548
4592
|
});
|
|
4549
4593
|
};
|
|
4550
4594
|
return (_ctx, _cache) => {
|
|
4551
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
4552
|
-
createElementVNode("div", _hoisted_2$
|
|
4595
|
+
return openBlock(), createElementBlock("div", _hoisted_1$l, [
|
|
4596
|
+
createElementVNode("div", _hoisted_2$f, [
|
|
4553
4597
|
createElementVNode("div", {
|
|
4554
4598
|
class: "m-editor-empty-button",
|
|
4555
4599
|
onClick: clickHandler
|
|
4556
4600
|
}, [
|
|
4557
4601
|
createElementVNode("div", null, [
|
|
4558
|
-
createVNode(_sfc_main$
|
|
4602
|
+
createVNode(_sfc_main$K, { icon: unref(Plus) }, null, 8, ["icon"])
|
|
4559
4603
|
]),
|
|
4560
|
-
_hoisted_3$
|
|
4604
|
+
_hoisted_3$8
|
|
4561
4605
|
])
|
|
4562
4606
|
])
|
|
4563
4607
|
]);
|
|
@@ -4569,7 +4613,7 @@ const DEFAULT_LEFT_COLUMN_WIDTH = 310;
|
|
|
4569
4613
|
const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
|
|
4570
4614
|
const LEFT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorLeftColumnWidthData";
|
|
4571
4615
|
const RIGHT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorRightColumnWidthData";
|
|
4572
|
-
const _sfc_main$
|
|
4616
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
4573
4617
|
...{
|
|
4574
4618
|
name: "MEditorFramework"
|
|
4575
4619
|
},
|
|
@@ -4646,13 +4690,13 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
4646
4690
|
renderSlot(_ctx.$slots, "nav"),
|
|
4647
4691
|
renderSlot(_ctx.$slots, "content-before"),
|
|
4648
4692
|
showSrc.value ? renderSlot(_ctx.$slots, "src-code", { key: 0 }, () => [
|
|
4649
|
-
createVNode(_sfc_main$
|
|
4693
|
+
createVNode(_sfc_main$Q, {
|
|
4650
4694
|
class: "m-editor-content",
|
|
4651
4695
|
"init-values": root.value,
|
|
4652
4696
|
options: unref(codeOptions),
|
|
4653
4697
|
onSave: saveCode
|
|
4654
4698
|
}, null, 8, ["init-values", "options"])
|
|
4655
|
-
]) : (openBlock(), createBlock(_sfc_main$
|
|
4699
|
+
]) : (openBlock(), createBlock(_sfc_main$y, {
|
|
4656
4700
|
key: 1,
|
|
4657
4701
|
class: "m-editor-content",
|
|
4658
4702
|
"left-class": "m-editor-framework-left",
|
|
@@ -4671,7 +4715,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
4671
4715
|
]),
|
|
4672
4716
|
center: withCtx(() => [
|
|
4673
4717
|
pageLength.value > 0 ? renderSlot(_ctx.$slots, "workspace", { key: 0 }) : renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
|
|
4674
|
-
createVNode(_sfc_main$
|
|
4718
|
+
createVNode(_sfc_main$x)
|
|
4675
4719
|
])
|
|
4676
4720
|
]),
|
|
4677
4721
|
_: 2
|
|
@@ -4696,12 +4740,12 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
4696
4740
|
}
|
|
4697
4741
|
});
|
|
4698
4742
|
|
|
4699
|
-
const _hoisted_1$
|
|
4743
|
+
const _hoisted_1$k = {
|
|
4700
4744
|
key: 1,
|
|
4701
4745
|
class: "menu-item-text"
|
|
4702
4746
|
};
|
|
4703
|
-
const _hoisted_2$
|
|
4704
|
-
const _sfc_main$
|
|
4747
|
+
const _hoisted_2$e = { class: "el-dropdown-link menubar-menu-button" };
|
|
4748
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
4705
4749
|
...{
|
|
4706
4750
|
name: "MEditorToolButton"
|
|
4707
4751
|
},
|
|
@@ -4780,7 +4824,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
4780
4824
|
_ctx.data.type === "divider" ? (openBlock(), createBlock(unref(TMagicDivider), {
|
|
4781
4825
|
key: 0,
|
|
4782
4826
|
direction: _ctx.data.direction || "vertical"
|
|
4783
|
-
}, null, 8, ["direction"])) : _ctx.data.type === "text" ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
4827
|
+
}, null, 8, ["direction"])) : _ctx.data.type === "text" ? (openBlock(), createElementBlock("div", _hoisted_1$k, toDisplayString(_ctx.data.text), 1)) : _ctx.data.type === "button" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
4784
4828
|
_ctx.data.tooltip ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
4785
4829
|
key: 0,
|
|
4786
4830
|
effect: "dark",
|
|
@@ -4794,7 +4838,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
4794
4838
|
disabled: disabled.value
|
|
4795
4839
|
}, {
|
|
4796
4840
|
default: withCtx(() => [
|
|
4797
|
-
_ctx.data.icon ? (openBlock(), createBlock(_sfc_main$
|
|
4841
|
+
_ctx.data.icon ? (openBlock(), createBlock(_sfc_main$K, {
|
|
4798
4842
|
key: 0,
|
|
4799
4843
|
icon: _ctx.data.icon
|
|
4800
4844
|
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
@@ -4811,7 +4855,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
4811
4855
|
disabled: disabled.value
|
|
4812
4856
|
}, {
|
|
4813
4857
|
default: withCtx(() => [
|
|
4814
|
-
_ctx.data.icon ? (openBlock(), createBlock(_sfc_main$
|
|
4858
|
+
_ctx.data.icon ? (openBlock(), createBlock(_sfc_main$K, {
|
|
4815
4859
|
key: 0,
|
|
4816
4860
|
icon: _ctx.data.icon
|
|
4817
4861
|
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
@@ -4844,7 +4888,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
4844
4888
|
})) : createCommentVNode("", true)
|
|
4845
4889
|
]),
|
|
4846
4890
|
default: withCtx(() => [
|
|
4847
|
-
createElementVNode("span", _hoisted_2$
|
|
4891
|
+
createElementVNode("span", _hoisted_2$e, [
|
|
4848
4892
|
createTextVNode(toDisplayString(_ctx.data.text), 1),
|
|
4849
4893
|
createVNode(unref(TMagicIcon), { class: "el-icon--right" }, {
|
|
4850
4894
|
default: withCtx(() => [
|
|
@@ -4861,7 +4905,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
4861
4905
|
}
|
|
4862
4906
|
});
|
|
4863
4907
|
|
|
4864
|
-
const _sfc_main$
|
|
4908
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
4865
4909
|
...{
|
|
4866
4910
|
name: "MEditorNavMenu"
|
|
4867
4911
|
},
|
|
@@ -5023,7 +5067,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
5023
5067
|
style: normalizeStyle(`width: ${columnWidth.value?.[key]}px`)
|
|
5024
5068
|
}, [
|
|
5025
5069
|
(openBlock(true), createElementBlock(Fragment, null, renderList(buttons.value[key], (item, index) => {
|
|
5026
|
-
return openBlock(), createBlock(_sfc_main$
|
|
5070
|
+
return openBlock(), createBlock(_sfc_main$v, {
|
|
5027
5071
|
data: item,
|
|
5028
5072
|
key: index
|
|
5029
5073
|
}, null, 8, ["data"]);
|
|
@@ -5035,8 +5079,8 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
5035
5079
|
}
|
|
5036
5080
|
});
|
|
5037
5081
|
|
|
5038
|
-
const _hoisted_1$
|
|
5039
|
-
const _sfc_main$
|
|
5082
|
+
const _hoisted_1$j = { class: "m-editor-props-panel" };
|
|
5083
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
5040
5084
|
...{
|
|
5041
5085
|
name: "MEditorPropsPanel"
|
|
5042
5086
|
},
|
|
@@ -5089,7 +5133,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
5089
5133
|
};
|
|
5090
5134
|
__expose({ configForm, submit });
|
|
5091
5135
|
return (_ctx, _cache) => {
|
|
5092
|
-
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1$
|
|
5136
|
+
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1$j, [
|
|
5093
5137
|
renderSlot(_ctx.$slots, "props-panel-header"),
|
|
5094
5138
|
createVNode(unref(MForm), {
|
|
5095
5139
|
ref_key: "configForm",
|
|
@@ -5109,7 +5153,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
5109
5153
|
}
|
|
5110
5154
|
});
|
|
5111
5155
|
|
|
5112
|
-
const _sfc_main$
|
|
5156
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
5113
5157
|
...{
|
|
5114
5158
|
name: "MEditorSearchInput"
|
|
5115
5159
|
},
|
|
@@ -5144,8 +5188,8 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
5144
5188
|
}
|
|
5145
5189
|
});
|
|
5146
5190
|
|
|
5147
|
-
const _hoisted_1$
|
|
5148
|
-
const _hoisted_2$
|
|
5191
|
+
const _hoisted_1$i = { xmlns: "http://www.w3.org/2000/svg" };
|
|
5192
|
+
const _hoisted_2$d = /* @__PURE__ */ createElementVNode("g", {
|
|
5149
5193
|
fill: "#7C878E",
|
|
5150
5194
|
"fill-rule": "evenodd"
|
|
5151
5195
|
}, [
|
|
@@ -5155,50 +5199,50 @@ const _hoisted_2$a = /* @__PURE__ */ createElementVNode("g", {
|
|
|
5155
5199
|
}),
|
|
5156
5200
|
/* @__PURE__ */ createElementVNode("path", { d: "M8 13.5L2.3 9.2 0.7 10.5 8 16 15.3 10.5 13.7 9.2z" })
|
|
5157
5201
|
], -1);
|
|
5158
|
-
const _hoisted_3$
|
|
5159
|
-
_hoisted_2$
|
|
5202
|
+
const _hoisted_3$7 = [
|
|
5203
|
+
_hoisted_2$d
|
|
5160
5204
|
];
|
|
5161
|
-
const _sfc_main$
|
|
5205
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
5162
5206
|
...{
|
|
5163
5207
|
name: "MEditorAppManageIcon"
|
|
5164
5208
|
},
|
|
5165
5209
|
__name: "AppManageIcon",
|
|
5166
5210
|
setup(__props) {
|
|
5167
5211
|
return (_ctx, _cache) => {
|
|
5168
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
5212
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$i, _hoisted_3$7);
|
|
5169
5213
|
};
|
|
5170
5214
|
}
|
|
5171
5215
|
});
|
|
5172
5216
|
|
|
5173
|
-
const _hoisted_1$
|
|
5217
|
+
const _hoisted_1$h = {
|
|
5174
5218
|
viewBox: "0 0 32 32",
|
|
5175
5219
|
version: "1.1",
|
|
5176
5220
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5177
5221
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
5178
5222
|
};
|
|
5179
|
-
const _hoisted_2$
|
|
5180
|
-
const _hoisted_4$
|
|
5181
|
-
_hoisted_2$
|
|
5223
|
+
const _hoisted_2$c = /* @__PURE__ */ 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);
|
|
5224
|
+
const _hoisted_4$5 = [
|
|
5225
|
+
_hoisted_2$c
|
|
5182
5226
|
];
|
|
5183
|
-
const _sfc_main$
|
|
5227
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
5184
5228
|
...{
|
|
5185
5229
|
name: "MEditorCodeIcon"
|
|
5186
5230
|
},
|
|
5187
5231
|
__name: "CodeIcon",
|
|
5188
5232
|
setup(__props) {
|
|
5189
5233
|
return (_ctx, _cache) => {
|
|
5190
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
5234
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$h, _hoisted_4$5);
|
|
5191
5235
|
};
|
|
5192
5236
|
}
|
|
5193
5237
|
});
|
|
5194
5238
|
|
|
5195
|
-
const _hoisted_1$
|
|
5196
|
-
const _hoisted_2$
|
|
5197
|
-
const _hoisted_3$
|
|
5239
|
+
const _hoisted_1$g = ["id"];
|
|
5240
|
+
const _hoisted_2$b = { class: "list-item" };
|
|
5241
|
+
const _hoisted_3$6 = {
|
|
5198
5242
|
key: 2,
|
|
5199
5243
|
class: "right-tool"
|
|
5200
5244
|
};
|
|
5201
|
-
const _sfc_main$
|
|
5245
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
5202
5246
|
...{
|
|
5203
5247
|
name: "MEditorCodeBlockList"
|
|
5204
5248
|
},
|
|
@@ -5299,26 +5343,26 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
5299
5343
|
id: data.id,
|
|
5300
5344
|
class: "list-container"
|
|
5301
5345
|
}, [
|
|
5302
|
-
createElementVNode("div", _hoisted_2$
|
|
5303
|
-
data.type === "code" ? (openBlock(), createBlock(_sfc_main$
|
|
5346
|
+
createElementVNode("div", _hoisted_2$b, [
|
|
5347
|
+
data.type === "code" ? (openBlock(), createBlock(_sfc_main$q, {
|
|
5304
5348
|
key: 0,
|
|
5305
5349
|
class: "codeIcon"
|
|
5306
5350
|
})) : createCommentVNode("", true),
|
|
5307
|
-
data.type === "node" ? (openBlock(), createBlock(_sfc_main$
|
|
5351
|
+
data.type === "node" ? (openBlock(), createBlock(_sfc_main$r, {
|
|
5308
5352
|
key: 1,
|
|
5309
5353
|
class: "compIcon"
|
|
5310
5354
|
})) : createCommentVNode("", true),
|
|
5311
5355
|
createElementVNode("span", {
|
|
5312
5356
|
class: normalizeClass(["name", { code: data.type === "code", hook: data.type === "key" }])
|
|
5313
5357
|
}, toDisplayString(data.name) + " (" + toDisplayString(data.id) + ")", 3),
|
|
5314
|
-
data.type === "code" ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
5358
|
+
data.type === "code" ? (openBlock(), createElementBlock("div", _hoisted_3$6, [
|
|
5315
5359
|
createVNode(unref(TMagicTooltip), {
|
|
5316
5360
|
effect: "dark",
|
|
5317
5361
|
content: editable.value ? "编辑" : "查看",
|
|
5318
5362
|
placement: "bottom"
|
|
5319
5363
|
}, {
|
|
5320
5364
|
default: withCtx(() => [
|
|
5321
|
-
createVNode(_sfc_main$
|
|
5365
|
+
createVNode(_sfc_main$K, {
|
|
5322
5366
|
icon: editable.value ? unref(Edit) : unref(View),
|
|
5323
5367
|
class: "edit-icon",
|
|
5324
5368
|
onClick: withModifiers(($event) => editCode(data.id), ["stop"])
|
|
@@ -5333,7 +5377,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
5333
5377
|
placement: "bottom"
|
|
5334
5378
|
}, {
|
|
5335
5379
|
default: withCtx(() => [
|
|
5336
|
-
createVNode(_sfc_main$
|
|
5380
|
+
createVNode(_sfc_main$K, {
|
|
5337
5381
|
icon: unref(Close),
|
|
5338
5382
|
class: "edit-icon",
|
|
5339
5383
|
onClick: withModifiers(($event) => deleteCode(`${data.id}`), ["stop"])
|
|
@@ -5347,7 +5391,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
5347
5391
|
})
|
|
5348
5392
|
])) : createCommentVNode("", true)
|
|
5349
5393
|
])
|
|
5350
|
-
], 8, _hoisted_1$
|
|
5394
|
+
], 8, _hoisted_1$g)
|
|
5351
5395
|
]),
|
|
5352
5396
|
_: 3
|
|
5353
5397
|
}, 8, ["default-expanded-keys", "data"]);
|
|
@@ -5355,8 +5399,8 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
5355
5399
|
}
|
|
5356
5400
|
});
|
|
5357
5401
|
|
|
5358
|
-
const _hoisted_1$
|
|
5359
|
-
const _sfc_main$
|
|
5402
|
+
const _hoisted_1$f = { class: "search-wrapper" };
|
|
5403
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
5360
5404
|
...{
|
|
5361
5405
|
name: "MEditorCodeBlockListPanel"
|
|
5362
5406
|
},
|
|
@@ -5376,8 +5420,8 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
5376
5420
|
return openBlock(), createBlock(unref(TMagicScrollbar), { class: "m-editor-code-block-list m-editor-dep-list-panel" }, {
|
|
5377
5421
|
default: withCtx(() => [
|
|
5378
5422
|
renderSlot(_ctx.$slots, "code-block-panel-header", {}, () => [
|
|
5379
|
-
createElementVNode("div", _hoisted_1$
|
|
5380
|
-
createVNode(_sfc_main$
|
|
5423
|
+
createElementVNode("div", _hoisted_1$f, [
|
|
5424
|
+
createVNode(_sfc_main$s, { onSearch: filterTextChangeHandler }),
|
|
5381
5425
|
editable.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
5382
5426
|
key: 0,
|
|
5383
5427
|
class: "create-code-button",
|
|
@@ -5393,7 +5437,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
5393
5437
|
renderSlot(_ctx.$slots, "code-block-panel-search")
|
|
5394
5438
|
])
|
|
5395
5439
|
]),
|
|
5396
|
-
createVNode(_sfc_main$
|
|
5440
|
+
createVNode(_sfc_main$p, {
|
|
5397
5441
|
ref_key: "codeBlockList",
|
|
5398
5442
|
ref: codeBlockList,
|
|
5399
5443
|
"custom-error": _ctx.customError,
|
|
@@ -5408,7 +5452,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
5408
5452
|
]),
|
|
5409
5453
|
_: 3
|
|
5410
5454
|
}, 8, ["custom-error", "onEdit", "onRemove"]),
|
|
5411
|
-
unref(codeConfig) ? (openBlock(), createBlock(_sfc_main$
|
|
5455
|
+
unref(codeConfig) ? (openBlock(), createBlock(_sfc_main$M, {
|
|
5412
5456
|
key: 0,
|
|
5413
5457
|
ref_key: "codeBlockEditor",
|
|
5414
5458
|
ref: codeBlockEditor,
|
|
@@ -5423,7 +5467,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
5423
5467
|
}
|
|
5424
5468
|
});
|
|
5425
5469
|
|
|
5426
|
-
const _sfc_main$
|
|
5470
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
5427
5471
|
...{
|
|
5428
5472
|
name: "MEditorDataSourceConfigPanel"
|
|
5429
5473
|
},
|
|
@@ -5477,13 +5521,13 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
5477
5521
|
}
|
|
5478
5522
|
});
|
|
5479
5523
|
|
|
5480
|
-
const _hoisted_1$
|
|
5481
|
-
const _hoisted_2$
|
|
5482
|
-
const _hoisted_3$
|
|
5524
|
+
const _hoisted_1$e = ["id"];
|
|
5525
|
+
const _hoisted_2$a = { class: "list-item" };
|
|
5526
|
+
const _hoisted_3$5 = {
|
|
5483
5527
|
key: 2,
|
|
5484
5528
|
class: "right-tool"
|
|
5485
5529
|
};
|
|
5486
|
-
const _sfc_main$
|
|
5530
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
5487
5531
|
...{
|
|
5488
5532
|
name: "MEditorDataSourceList"
|
|
5489
5533
|
},
|
|
@@ -5578,13 +5622,13 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
5578
5622
|
id: data.id,
|
|
5579
5623
|
class: "list-container"
|
|
5580
5624
|
}, [
|
|
5581
|
-
createElementVNode("div", _hoisted_2$
|
|
5582
|
-
data.type === "code" ? (openBlock(), createBlock(_sfc_main$
|
|
5625
|
+
createElementVNode("div", _hoisted_2$a, [
|
|
5626
|
+
data.type === "code" ? (openBlock(), createBlock(_sfc_main$K, {
|
|
5583
5627
|
key: 0,
|
|
5584
5628
|
class: "codeIcon",
|
|
5585
5629
|
icon: unref(Coin)
|
|
5586
5630
|
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
5587
|
-
data.type === "node" ? (openBlock(), createBlock(_sfc_main$
|
|
5631
|
+
data.type === "node" ? (openBlock(), createBlock(_sfc_main$K, {
|
|
5588
5632
|
key: 1,
|
|
5589
5633
|
class: "compIcon",
|
|
5590
5634
|
icon: unref(Aim)
|
|
@@ -5592,14 +5636,14 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
5592
5636
|
createElementVNode("span", {
|
|
5593
5637
|
class: normalizeClass(["name", { code: data.type === "ds", hook: data.type === "key" }])
|
|
5594
5638
|
}, toDisplayString(data.type === "key" ? data.name : `${data.name}(${data.id})`), 3),
|
|
5595
|
-
data.type === "ds" ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
5639
|
+
data.type === "ds" ? (openBlock(), createElementBlock("div", _hoisted_3$5, [
|
|
5596
5640
|
createVNode(unref(TMagicTooltip), {
|
|
5597
5641
|
effect: "dark",
|
|
5598
5642
|
content: editable.value ? "编辑" : "查看",
|
|
5599
5643
|
placement: "bottom"
|
|
5600
5644
|
}, {
|
|
5601
5645
|
default: withCtx(() => [
|
|
5602
|
-
createVNode(_sfc_main$
|
|
5646
|
+
createVNode(_sfc_main$K, {
|
|
5603
5647
|
icon: editable.value ? unref(Edit) : unref(View),
|
|
5604
5648
|
class: "edit-icon",
|
|
5605
5649
|
onClick: withModifiers(($event) => editHandler(`${data.id}`), ["stop"])
|
|
@@ -5614,7 +5658,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
5614
5658
|
placement: "bottom"
|
|
5615
5659
|
}, {
|
|
5616
5660
|
default: withCtx(() => [
|
|
5617
|
-
createVNode(_sfc_main$
|
|
5661
|
+
createVNode(_sfc_main$K, {
|
|
5618
5662
|
icon: unref(Close),
|
|
5619
5663
|
class: "edit-icon",
|
|
5620
5664
|
onClick: withModifiers(($event) => removeHandler(`${data.id}`), ["stop"])
|
|
@@ -5628,7 +5672,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
5628
5672
|
})
|
|
5629
5673
|
])) : createCommentVNode("", true)
|
|
5630
5674
|
])
|
|
5631
|
-
], 8, _hoisted_1$
|
|
5675
|
+
], 8, _hoisted_1$e)
|
|
5632
5676
|
]),
|
|
5633
5677
|
_: 3
|
|
5634
5678
|
}, 8, ["data"]);
|
|
@@ -5636,9 +5680,9 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
5636
5680
|
}
|
|
5637
5681
|
});
|
|
5638
5682
|
|
|
5639
|
-
const _hoisted_1$
|
|
5640
|
-
const _hoisted_2$
|
|
5641
|
-
const _sfc_main$
|
|
5683
|
+
const _hoisted_1$d = { class: "search-wrapper" };
|
|
5684
|
+
const _hoisted_2$9 = { class: "data-source-list-panel-add-menu" };
|
|
5685
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
5642
5686
|
...{
|
|
5643
5687
|
name: "MEditorDataSourceListPanel"
|
|
5644
5688
|
},
|
|
@@ -5698,8 +5742,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
5698
5742
|
return (_ctx, _cache) => {
|
|
5699
5743
|
return openBlock(), createBlock(unref(TMagicScrollbar), { class: "data-source-list-panel m-editor-dep-list-panel" }, {
|
|
5700
5744
|
default: withCtx(() => [
|
|
5701
|
-
createElementVNode("div", _hoisted_1$
|
|
5702
|
-
createVNode(_sfc_main$
|
|
5745
|
+
createElementVNode("div", _hoisted_1$d, [
|
|
5746
|
+
createVNode(_sfc_main$s, { onSearch: filterTextChangeHandler }),
|
|
5703
5747
|
editable.value ? (openBlock(), createBlock(unref(TMagicPopover), {
|
|
5704
5748
|
key: 0,
|
|
5705
5749
|
placement: "right"
|
|
@@ -5716,9 +5760,9 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
5716
5760
|
})
|
|
5717
5761
|
]),
|
|
5718
5762
|
default: withCtx(() => [
|
|
5719
|
-
createElementVNode("div", _hoisted_2$
|
|
5763
|
+
createElementVNode("div", _hoisted_2$9, [
|
|
5720
5764
|
(openBlock(true), createElementBlock(Fragment, null, renderList(datasourceTypeList.value, (item, index) => {
|
|
5721
|
-
return openBlock(), createBlock(_sfc_main$
|
|
5765
|
+
return openBlock(), createBlock(_sfc_main$v, {
|
|
5722
5766
|
data: {
|
|
5723
5767
|
type: "button",
|
|
5724
5768
|
text: item.text,
|
|
@@ -5734,11 +5778,11 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
5734
5778
|
_: 1
|
|
5735
5779
|
})) : createCommentVNode("", true)
|
|
5736
5780
|
]),
|
|
5737
|
-
createVNode(_sfc_main$
|
|
5781
|
+
createVNode(_sfc_main$m, {
|
|
5738
5782
|
onEdit: editHandler,
|
|
5739
5783
|
onRemove: removeHandler
|
|
5740
5784
|
}),
|
|
5741
|
-
createVNode(_sfc_main$
|
|
5785
|
+
createVNode(_sfc_main$n, {
|
|
5742
5786
|
ref_key: "editDialog",
|
|
5743
5787
|
ref: editDialog,
|
|
5744
5788
|
disabled: !editable.value,
|
|
@@ -5753,9 +5797,9 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
5753
5797
|
}
|
|
5754
5798
|
});
|
|
5755
5799
|
|
|
5756
|
-
const _hoisted_1$
|
|
5757
|
-
const _hoisted_2$
|
|
5758
|
-
const _sfc_main$
|
|
5800
|
+
const _hoisted_1$c = ["onClick", "onDragstart"];
|
|
5801
|
+
const _hoisted_2$8 = ["title"];
|
|
5802
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
5759
5803
|
...{
|
|
5760
5804
|
name: "MEditorComponentListPanel"
|
|
5761
5805
|
},
|
|
@@ -5834,7 +5878,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
5834
5878
|
"model-value": collapseValue.value
|
|
5835
5879
|
}, {
|
|
5836
5880
|
default: withCtx(() => [
|
|
5837
|
-
createVNode(_sfc_main$
|
|
5881
|
+
createVNode(_sfc_main$s, { onSearch: filterTextChangeHandler }),
|
|
5838
5882
|
(openBlock(true), createElementBlock(Fragment, null, renderList(list.value, (group, index) => {
|
|
5839
5883
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
5840
5884
|
group.items && group.items.length ? (openBlock(), createBlock(unref(TMagicCollapseItem), {
|
|
@@ -5842,7 +5886,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
5842
5886
|
name: `${index}`
|
|
5843
5887
|
}, {
|
|
5844
5888
|
title: withCtx(() => [
|
|
5845
|
-
createVNode(_sfc_main$
|
|
5889
|
+
createVNode(_sfc_main$K, { icon: unref(Grid) }, null, 8, ["icon"]),
|
|
5846
5890
|
createTextVNode(toDisplayString(group.title), 1)
|
|
5847
5891
|
]),
|
|
5848
5892
|
default: withCtx(() => [
|
|
@@ -5857,15 +5901,15 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
5857
5901
|
onDrag: dragHandler
|
|
5858
5902
|
}, [
|
|
5859
5903
|
renderSlot(_ctx.$slots, "component-list-item", { component: item }, () => [
|
|
5860
|
-
createVNode(_sfc_main$
|
|
5904
|
+
createVNode(_sfc_main$K, {
|
|
5861
5905
|
title: item.text,
|
|
5862
5906
|
icon: item.icon
|
|
5863
5907
|
}, null, 8, ["title", "icon"]),
|
|
5864
5908
|
createElementVNode("span", {
|
|
5865
5909
|
title: item.text
|
|
5866
|
-
}, toDisplayString(item.text), 9, _hoisted_2$
|
|
5910
|
+
}, toDisplayString(item.text), 9, _hoisted_2$8)
|
|
5867
5911
|
])
|
|
5868
|
-
], 40, _hoisted_1$
|
|
5912
|
+
], 40, _hoisted_1$c);
|
|
5869
5913
|
}), 128))
|
|
5870
5914
|
]),
|
|
5871
5915
|
_: 2
|
|
@@ -5882,16 +5926,18 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
5882
5926
|
}
|
|
5883
5927
|
});
|
|
5884
5928
|
|
|
5885
|
-
const _sfc_main$
|
|
5929
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
5886
5930
|
...{
|
|
5887
5931
|
name: "MEditorContentMenu"
|
|
5888
5932
|
},
|
|
5889
5933
|
__name: "ContentMenu",
|
|
5890
5934
|
props: {
|
|
5891
5935
|
menuData: { default: () => [] },
|
|
5892
|
-
isSubMenu: { type: Boolean, default: false }
|
|
5936
|
+
isSubMenu: { type: Boolean, default: false },
|
|
5937
|
+
active: {},
|
|
5938
|
+
autoHide: { type: Boolean, default: true }
|
|
5893
5939
|
},
|
|
5894
|
-
emits: ["hide", "show"],
|
|
5940
|
+
emits: ["hide", "show", "mouseenter"],
|
|
5895
5941
|
setup(__props, { expose: __expose, emit }) {
|
|
5896
5942
|
const props = __props;
|
|
5897
5943
|
const menu = ref();
|
|
@@ -5899,10 +5945,14 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
5899
5945
|
const subMenu = ref();
|
|
5900
5946
|
const visible = ref(false);
|
|
5901
5947
|
const subMenuData = ref([]);
|
|
5902
|
-
const
|
|
5903
|
-
left:
|
|
5904
|
-
top:
|
|
5948
|
+
const menuPosition = ref({
|
|
5949
|
+
left: 0,
|
|
5950
|
+
top: 0
|
|
5905
5951
|
});
|
|
5952
|
+
const menuStyle = computed(() => ({
|
|
5953
|
+
top: `${menuPosition.value.top}px`,
|
|
5954
|
+
left: `${menuPosition.value.left}px`
|
|
5955
|
+
}));
|
|
5906
5956
|
const contains = (el) => menu.value?.contains(el) || subMenu.value?.contains(el);
|
|
5907
5957
|
const hide = () => {
|
|
5908
5958
|
if (!visible.value)
|
|
@@ -5911,7 +5961,14 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
5911
5961
|
subMenu.value?.hide();
|
|
5912
5962
|
emit("hide");
|
|
5913
5963
|
};
|
|
5914
|
-
const
|
|
5964
|
+
const clickHandler = () => {
|
|
5965
|
+
if (!props.autoHide)
|
|
5966
|
+
return;
|
|
5967
|
+
hide();
|
|
5968
|
+
};
|
|
5969
|
+
const outsideClickhideHandler = (e) => {
|
|
5970
|
+
if (!props.autoHide)
|
|
5971
|
+
return;
|
|
5915
5972
|
const target = e.target;
|
|
5916
5973
|
if (!visible.value || !target) {
|
|
5917
5974
|
return;
|
|
@@ -5921,19 +5978,25 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
5921
5978
|
}
|
|
5922
5979
|
hide();
|
|
5923
5980
|
};
|
|
5981
|
+
const setPosition = (e) => {
|
|
5982
|
+
const menuHeight = menu.value?.clientHeight || 0;
|
|
5983
|
+
let top = e.clientY;
|
|
5984
|
+
if (menuHeight + e.clientY > document.body.clientHeight) {
|
|
5985
|
+
top = document.body.clientHeight - menuHeight;
|
|
5986
|
+
}
|
|
5987
|
+
menuPosition.value = {
|
|
5988
|
+
top,
|
|
5989
|
+
left: e.clientX
|
|
5990
|
+
};
|
|
5991
|
+
};
|
|
5924
5992
|
const show = (e) => {
|
|
5925
5993
|
setTimeout(() => {
|
|
5926
5994
|
visible.value = true;
|
|
5995
|
+
if (!e) {
|
|
5996
|
+
return;
|
|
5997
|
+
}
|
|
5927
5998
|
nextTick(() => {
|
|
5928
|
-
|
|
5929
|
-
let top = e.clientY;
|
|
5930
|
-
if (menuHeight + e.clientY > document.body.clientHeight) {
|
|
5931
|
-
top = document.body.clientHeight - menuHeight;
|
|
5932
|
-
}
|
|
5933
|
-
menuStyle.value = {
|
|
5934
|
-
top: `${top}px`,
|
|
5935
|
-
left: `${e.clientX}px`
|
|
5936
|
-
};
|
|
5999
|
+
setPosition(e);
|
|
5937
6000
|
emit("show");
|
|
5938
6001
|
});
|
|
5939
6002
|
}, 300);
|
|
@@ -5958,64 +6021,77 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
5958
6021
|
}
|
|
5959
6022
|
}, 0);
|
|
5960
6023
|
};
|
|
6024
|
+
const mouseenterHandler = () => {
|
|
6025
|
+
emit("mouseenter");
|
|
6026
|
+
};
|
|
5961
6027
|
onMounted(() => {
|
|
5962
6028
|
if (props.isSubMenu)
|
|
5963
6029
|
return;
|
|
5964
|
-
globalThis.addEventListener("mousedown",
|
|
6030
|
+
globalThis.addEventListener("mousedown", outsideClickhideHandler, true);
|
|
5965
6031
|
});
|
|
5966
6032
|
onUnmounted(() => {
|
|
5967
6033
|
if (props.isSubMenu)
|
|
5968
6034
|
return;
|
|
5969
|
-
globalThis.removeEventListener("mousedown",
|
|
6035
|
+
globalThis.removeEventListener("mousedown", outsideClickhideHandler, true);
|
|
5970
6036
|
});
|
|
5971
6037
|
__expose({
|
|
5972
6038
|
menu,
|
|
6039
|
+
menuPosition,
|
|
5973
6040
|
hide,
|
|
5974
6041
|
show,
|
|
5975
|
-
contains
|
|
6042
|
+
contains,
|
|
6043
|
+
setPosition
|
|
5976
6044
|
});
|
|
5977
6045
|
return (_ctx, _cache) => {
|
|
5978
6046
|
const _component_content_menu = resolveComponent("content-menu", true);
|
|
5979
|
-
return
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
6047
|
+
return openBlock(), createBlock(Transition, { name: "fade" }, {
|
|
6048
|
+
default: withCtx(() => [
|
|
6049
|
+
withDirectives(createElementVNode("div", {
|
|
6050
|
+
class: "magic-editor-content-menu",
|
|
6051
|
+
ref_key: "menu",
|
|
6052
|
+
ref: menu,
|
|
6053
|
+
style: normalizeStyle(menuStyle.value),
|
|
6054
|
+
onMouseenter: _cache[0] || (_cache[0] = ($event) => mouseenterHandler())
|
|
6055
|
+
}, [
|
|
6056
|
+
renderSlot(_ctx.$slots, "title"),
|
|
6057
|
+
createElementVNode("div", null, [
|
|
6058
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuData, (item, index) => {
|
|
6059
|
+
return openBlock(), createBlock(_sfc_main$v, {
|
|
6060
|
+
"event-type": "mouseup",
|
|
6061
|
+
ref_for: true,
|
|
6062
|
+
ref_key: "buttons",
|
|
6063
|
+
ref: buttons,
|
|
6064
|
+
class: normalizeClass({ active: _ctx.active && item.id === _ctx.active }),
|
|
6065
|
+
data: item,
|
|
6066
|
+
key: index,
|
|
6067
|
+
onMouseup: clickHandler,
|
|
6068
|
+
onMouseenter: ($event) => showSubMenu(item, index)
|
|
6069
|
+
}, null, 8, ["class", "data", "onMouseenter"]);
|
|
6070
|
+
}), 128))
|
|
6071
|
+
]),
|
|
6072
|
+
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
6073
|
+
subMenuData.value.length ? (openBlock(), createBlock(_component_content_menu, {
|
|
6074
|
+
key: 0,
|
|
6075
|
+
class: "sub-menu",
|
|
6076
|
+
ref_key: "subMenu",
|
|
6077
|
+
ref: subMenu,
|
|
6078
|
+
active: _ctx.active,
|
|
6079
|
+
"menu-data": subMenuData.value,
|
|
6080
|
+
"is-sub-menu": true,
|
|
6081
|
+
onHide: hide
|
|
6082
|
+
}, null, 8, ["active", "menu-data"])) : createCommentVNode("", true)
|
|
6083
|
+
]))
|
|
6084
|
+
], 36), [
|
|
6085
|
+
[vShow, visible.value]
|
|
6086
|
+
])
|
|
5999
6087
|
]),
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
key: 0,
|
|
6003
|
-
class: "sub-menu",
|
|
6004
|
-
ref_key: "subMenu",
|
|
6005
|
-
ref: subMenu,
|
|
6006
|
-
"menu-data": subMenuData.value,
|
|
6007
|
-
"is-sub-menu": true,
|
|
6008
|
-
onHide: hide
|
|
6009
|
-
}, null, 8, ["menu-data"])) : createCommentVNode("", true)
|
|
6010
|
-
]))
|
|
6011
|
-
], 4)), [
|
|
6012
|
-
[vShow, visible.value]
|
|
6013
|
-
]) : createCommentVNode("", true);
|
|
6088
|
+
_: 3
|
|
6089
|
+
});
|
|
6014
6090
|
};
|
|
6015
6091
|
}
|
|
6016
6092
|
});
|
|
6017
6093
|
|
|
6018
|
-
const _hoisted_1$
|
|
6094
|
+
const _hoisted_1$b = {
|
|
6019
6095
|
width: "1em",
|
|
6020
6096
|
height: "1em",
|
|
6021
6097
|
viewBox: "0 0 16 16",
|
|
@@ -6023,26 +6099,26 @@ const _hoisted_1$8 = {
|
|
|
6023
6099
|
fill: "currentColor",
|
|
6024
6100
|
xmlns: "http://www.w3.org/2000/svg"
|
|
6025
6101
|
};
|
|
6026
|
-
const _hoisted_2$
|
|
6102
|
+
const _hoisted_2$7 = /* @__PURE__ */ createElementVNode("path", {
|
|
6027
6103
|
"fill-rule": "evenodd",
|
|
6028
6104
|
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"
|
|
6029
6105
|
}, null, -1);
|
|
6030
|
-
const _hoisted_3$
|
|
6106
|
+
const _hoisted_3$4 = /* @__PURE__ */ createElementVNode("path", {
|
|
6031
6107
|
"fill-rule": "evenodd",
|
|
6032
6108
|
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"
|
|
6033
6109
|
}, null, -1);
|
|
6034
|
-
const _hoisted_4$
|
|
6035
|
-
_hoisted_2$
|
|
6036
|
-
_hoisted_3$
|
|
6110
|
+
const _hoisted_4$4 = [
|
|
6111
|
+
_hoisted_2$7,
|
|
6112
|
+
_hoisted_3$4
|
|
6037
6113
|
];
|
|
6038
|
-
const _sfc_main$
|
|
6114
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
6039
6115
|
...{
|
|
6040
6116
|
name: "MEditorFolderMinusIcon"
|
|
6041
6117
|
},
|
|
6042
6118
|
__name: "FolderMinusIcon",
|
|
6043
6119
|
setup(__props) {
|
|
6044
6120
|
return (_ctx, _cache) => {
|
|
6045
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
6121
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$b, _hoisted_4$4);
|
|
6046
6122
|
};
|
|
6047
6123
|
}
|
|
6048
6124
|
});
|
|
@@ -6122,7 +6198,7 @@ const useMoveToMenu = (services) => {
|
|
|
6122
6198
|
};
|
|
6123
6199
|
};
|
|
6124
6200
|
|
|
6125
|
-
const _sfc_main$
|
|
6201
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
6126
6202
|
...{
|
|
6127
6203
|
name: "MEditorLayerMenu"
|
|
6128
6204
|
},
|
|
@@ -6185,7 +6261,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
6185
6261
|
{
|
|
6186
6262
|
type: "button",
|
|
6187
6263
|
text: "全部折叠",
|
|
6188
|
-
icon: _sfc_main$
|
|
6264
|
+
icon: _sfc_main$i,
|
|
6189
6265
|
display: () => isPage(node.value),
|
|
6190
6266
|
handler: () => {
|
|
6191
6267
|
emit("collapse-all");
|
|
@@ -6211,7 +6287,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
6211
6287
|
show
|
|
6212
6288
|
});
|
|
6213
6289
|
return (_ctx, _cache) => {
|
|
6214
|
-
return openBlock(), createBlock(_sfc_main$
|
|
6290
|
+
return openBlock(), createBlock(_sfc_main$j, {
|
|
6215
6291
|
"menu-data": menuData.value,
|
|
6216
6292
|
ref_key: "menu",
|
|
6217
6293
|
ref: menu,
|
|
@@ -6221,8 +6297,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
6221
6297
|
}
|
|
6222
6298
|
});
|
|
6223
6299
|
|
|
6224
|
-
const _hoisted_1$
|
|
6225
|
-
const _sfc_main$
|
|
6300
|
+
const _hoisted_1$a = { class: "layer-node-tool" };
|
|
6301
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
6226
6302
|
__name: "LayerNode",
|
|
6227
6303
|
props: {
|
|
6228
6304
|
data: {}
|
|
@@ -6243,7 +6319,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
6243
6319
|
const _component_el_icon = resolveComponent("el-icon");
|
|
6244
6320
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
6245
6321
|
createElementVNode("div", null, toDisplayString(`${_ctx.data.name} (${_ctx.data.id})`), 1),
|
|
6246
|
-
createElementVNode("div", _hoisted_1$
|
|
6322
|
+
createElementVNode("div", _hoisted_1$a, [
|
|
6247
6323
|
_ctx.data.type !== "page" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
6248
6324
|
_ctx.data.visible === false ? (openBlock(), createBlock(_component_el_icon, {
|
|
6249
6325
|
key: 0,
|
|
@@ -6272,9 +6348,9 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
6272
6348
|
}
|
|
6273
6349
|
});
|
|
6274
6350
|
|
|
6275
|
-
const _hoisted_1$
|
|
6351
|
+
const _hoisted_1$9 = ["id", "onMouseenter"];
|
|
6276
6352
|
const throttleTime = 150;
|
|
6277
|
-
const _sfc_main$
|
|
6353
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
6278
6354
|
...{
|
|
6279
6355
|
name: "MEditorLayerPanel"
|
|
6280
6356
|
},
|
|
@@ -6522,7 +6598,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
6522
6598
|
return openBlock(), createBlock(unref(TMagicScrollbar), { class: "magic-editor-layer-panel" }, {
|
|
6523
6599
|
default: withCtx(() => [
|
|
6524
6600
|
renderSlot(_ctx.$slots, "layer-panel-header"),
|
|
6525
|
-
createVNode(_sfc_main$
|
|
6601
|
+
createVNode(_sfc_main$s, { onSearch: filterTextChangeHandler }),
|
|
6526
6602
|
values.value.length ? (openBlock(), createBlock(unref(TMagicTree), {
|
|
6527
6603
|
key: 0,
|
|
6528
6604
|
class: "magic-editor-layer-tree",
|
|
@@ -6562,14 +6638,14 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
6562
6638
|
node,
|
|
6563
6639
|
data
|
|
6564
6640
|
}, () => [
|
|
6565
|
-
createVNode(_sfc_main$
|
|
6641
|
+
createVNode(_sfc_main$g, { data }, null, 8, ["data"])
|
|
6566
6642
|
])
|
|
6567
|
-
], 40, _hoisted_1$
|
|
6643
|
+
], 40, _hoisted_1$9)
|
|
6568
6644
|
]),
|
|
6569
6645
|
_: 3
|
|
6570
6646
|
}, 8, ["default-expanded-keys", "default-checked-keys", "current-node-key", "data", "highlight-current", "show-checkbox"])) : createCommentVNode("", true),
|
|
6571
6647
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
6572
|
-
createVNode(_sfc_main$
|
|
6648
|
+
createVNode(_sfc_main$h, {
|
|
6573
6649
|
ref_key: "menu",
|
|
6574
6650
|
ref: menu,
|
|
6575
6651
|
"layer-content-menu": _ctx.layerContentMenu,
|
|
@@ -6583,17 +6659,17 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
6583
6659
|
}
|
|
6584
6660
|
});
|
|
6585
6661
|
|
|
6586
|
-
const _hoisted_1$
|
|
6662
|
+
const _hoisted_1$8 = {
|
|
6587
6663
|
key: 0,
|
|
6588
6664
|
class: "m-editor-sidebar"
|
|
6589
6665
|
};
|
|
6590
|
-
const _hoisted_2$
|
|
6591
|
-
const _hoisted_3$
|
|
6592
|
-
const _hoisted_4$
|
|
6666
|
+
const _hoisted_2$6 = { class: "m-editor-sidebar-header" };
|
|
6667
|
+
const _hoisted_3$3 = ["onClick"];
|
|
6668
|
+
const _hoisted_4$3 = {
|
|
6593
6669
|
key: 1,
|
|
6594
6670
|
class: "magic-editor-tab-panel-title"
|
|
6595
6671
|
};
|
|
6596
|
-
const _sfc_main$
|
|
6672
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
6597
6673
|
...{
|
|
6598
6674
|
name: "MEditorSidebar"
|
|
6599
6675
|
},
|
|
@@ -6612,7 +6688,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
6612
6688
|
type: "component",
|
|
6613
6689
|
icon: Goods,
|
|
6614
6690
|
text: "组件",
|
|
6615
|
-
component: _sfc_main$
|
|
6691
|
+
component: _sfc_main$k,
|
|
6616
6692
|
slots: {}
|
|
6617
6693
|
},
|
|
6618
6694
|
layer: {
|
|
@@ -6623,7 +6699,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
6623
6699
|
props: {
|
|
6624
6700
|
layerContentMenu: props.layerContentMenu
|
|
6625
6701
|
},
|
|
6626
|
-
component: _sfc_main$
|
|
6702
|
+
component: _sfc_main$f,
|
|
6627
6703
|
slots: {}
|
|
6628
6704
|
},
|
|
6629
6705
|
"code-block": {
|
|
@@ -6631,7 +6707,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
6631
6707
|
type: "component",
|
|
6632
6708
|
icon: EditPen,
|
|
6633
6709
|
text: "代码编辑",
|
|
6634
|
-
component: _sfc_main$
|
|
6710
|
+
component: _sfc_main$o,
|
|
6635
6711
|
slots: {}
|
|
6636
6712
|
},
|
|
6637
6713
|
"data-source": {
|
|
@@ -6639,7 +6715,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
6639
6715
|
type: "component",
|
|
6640
6716
|
icon: Coin,
|
|
6641
6717
|
text: "数据源",
|
|
6642
|
-
component: _sfc_main$
|
|
6718
|
+
component: _sfc_main$l,
|
|
6643
6719
|
slots: {}
|
|
6644
6720
|
}
|
|
6645
6721
|
};
|
|
@@ -6656,20 +6732,20 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
6656
6732
|
activeTabName
|
|
6657
6733
|
});
|
|
6658
6734
|
return (_ctx, _cache) => {
|
|
6659
|
-
return _ctx.data.type === "tabs" && _ctx.data.items.length ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
6660
|
-
createElementVNode("div", _hoisted_2$
|
|
6735
|
+
return _ctx.data.type === "tabs" && _ctx.data.items.length ? (openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
6736
|
+
createElementVNode("div", _hoisted_2$6, [
|
|
6661
6737
|
(openBlock(true), createElementBlock(Fragment, null, renderList(sideBarItems.value, (config, index) => {
|
|
6662
6738
|
return openBlock(), createElementBlock("div", {
|
|
6663
6739
|
class: normalizeClass(["m-editor-sidebar-header-item", { "is-active": activeTabName.value === config.text }]),
|
|
6664
6740
|
key: config.$key ?? index,
|
|
6665
6741
|
onClick: ($event) => activeTabName.value = config.text || `${index}`
|
|
6666
6742
|
}, [
|
|
6667
|
-
config.icon ? (openBlock(), createBlock(_sfc_main$
|
|
6743
|
+
config.icon ? (openBlock(), createBlock(_sfc_main$K, {
|
|
6668
6744
|
key: 0,
|
|
6669
6745
|
icon: config.icon
|
|
6670
6746
|
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
6671
|
-
config.text ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
6672
|
-
], 10, _hoisted_3$
|
|
6747
|
+
config.text ? (openBlock(), createElementBlock("div", _hoisted_4$3, toDisplayString(config.text), 1)) : createCommentVNode("", true)
|
|
6748
|
+
], 10, _hoisted_3$3);
|
|
6673
6749
|
}), 128))
|
|
6674
6750
|
]),
|
|
6675
6751
|
(openBlock(true), createElementBlock(Fragment, null, renderList(sideBarItems.value, (config, index) => {
|
|
@@ -6748,304 +6824,42 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
6748
6824
|
}
|
|
6749
6825
|
});
|
|
6750
6826
|
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
}, 1032, ["disabled", "onClick"]),
|
|
6788
|
-
index < path.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_2$2, "/")) : createCommentVNode("", true)
|
|
6789
|
-
], 64);
|
|
6790
|
-
}), 128))
|
|
6791
|
-
])) : createCommentVNode("", true);
|
|
6792
|
-
};
|
|
6793
|
-
}
|
|
6794
|
-
});
|
|
6795
|
-
|
|
6796
|
-
const _hoisted_1$3 = {
|
|
6797
|
-
key: 1,
|
|
6798
|
-
style: { "width": "21px" }
|
|
6799
|
-
};
|
|
6800
|
-
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
6801
|
-
...{
|
|
6802
|
-
name: "MEditorPageBarScrollContainer"
|
|
6803
|
-
},
|
|
6804
|
-
__name: "PageBarScrollContainer",
|
|
6805
|
-
setup(__props) {
|
|
6806
|
-
const services = inject("services");
|
|
6807
|
-
const editorService = services?.editorService;
|
|
6808
|
-
const uiService = services?.uiService;
|
|
6809
|
-
const itemsContainer = ref();
|
|
6810
|
-
const canScroll = ref(false);
|
|
6811
|
-
const showAddPageButton = computed(() => uiService?.get("showAddPageButton"));
|
|
6812
|
-
const itemsContainerWidth = ref(0);
|
|
6813
|
-
const setCanScroll = () => {
|
|
6814
|
-
itemsContainerWidth.value = (pageBar.value?.clientWidth || 0) - 37 * 2 - (showAddPageButton.value ? 37 : 21);
|
|
6815
|
-
nextTick(() => {
|
|
6816
|
-
if (itemsContainer.value) {
|
|
6817
|
-
canScroll.value = itemsContainer.value.scrollWidth - itemsContainerWidth.value > 1;
|
|
6818
|
-
}
|
|
6819
|
-
});
|
|
6820
|
-
};
|
|
6821
|
-
const resizeObserver = new ResizeObserver(() => {
|
|
6822
|
-
setCanScroll();
|
|
6823
|
-
});
|
|
6824
|
-
const pageBar = ref();
|
|
6825
|
-
onMounted(() => {
|
|
6826
|
-
pageBar.value && resizeObserver.observe(pageBar.value);
|
|
6827
|
-
});
|
|
6828
|
-
onUnmounted(() => {
|
|
6829
|
-
resizeObserver.disconnect();
|
|
6830
|
-
});
|
|
6831
|
-
let translateLeft = 0;
|
|
6832
|
-
const scroll = (type) => {
|
|
6833
|
-
if (!itemsContainer.value)
|
|
6834
|
-
return;
|
|
6835
|
-
const maxScrollLeft = itemsContainer.value.scrollWidth - itemsContainerWidth.value;
|
|
6836
|
-
if (type === "left") {
|
|
6837
|
-
translateLeft += 100;
|
|
6838
|
-
if (translateLeft > 0) {
|
|
6839
|
-
translateLeft = 0;
|
|
6840
|
-
}
|
|
6841
|
-
} else if (type === "right") {
|
|
6842
|
-
translateLeft -= 100;
|
|
6843
|
-
if (-translateLeft > maxScrollLeft) {
|
|
6844
|
-
translateLeft = -maxScrollLeft;
|
|
6845
|
-
}
|
|
6846
|
-
} else if (type === "start") {
|
|
6847
|
-
translateLeft = 0;
|
|
6848
|
-
} else if (type === "end") {
|
|
6849
|
-
translateLeft = -maxScrollLeft;
|
|
6850
|
-
}
|
|
6851
|
-
itemsContainer.value.style.transform = `translate(${translateLeft}px, 0px)`;
|
|
6852
|
-
};
|
|
6853
|
-
const pageLength = computed(() => editorService?.get("pageLength"));
|
|
6854
|
-
watch(pageLength, (length = 0, preLength = 0) => {
|
|
6855
|
-
setTimeout(() => {
|
|
6856
|
-
setCanScroll();
|
|
6857
|
-
if (length < preLength) {
|
|
6858
|
-
scroll("start");
|
|
6859
|
-
} else {
|
|
6860
|
-
scroll("end");
|
|
6861
|
-
}
|
|
6862
|
-
});
|
|
6863
|
-
});
|
|
6864
|
-
const addPage = () => {
|
|
6865
|
-
if (!editorService)
|
|
6866
|
-
return;
|
|
6867
|
-
const root = toRaw(editorService.get("root"));
|
|
6868
|
-
if (!root)
|
|
6869
|
-
throw new Error("root 不能为空");
|
|
6870
|
-
const pageConfig = {
|
|
6871
|
-
type: NodeType.PAGE,
|
|
6872
|
-
name: generatePageNameByApp(root)
|
|
6873
|
-
};
|
|
6874
|
-
editorService.add(pageConfig);
|
|
6875
|
-
};
|
|
6876
|
-
return (_ctx, _cache) => {
|
|
6877
|
-
return openBlock(), createElementBlock("div", {
|
|
6878
|
-
class: "m-editor-page-bar",
|
|
6879
|
-
ref_key: "pageBar",
|
|
6880
|
-
ref: pageBar
|
|
6881
|
-
}, [
|
|
6882
|
-
showAddPageButton.value ? (openBlock(), createElementBlock("div", {
|
|
6883
|
-
key: 0,
|
|
6884
|
-
id: "m-editor-page-bar-add-icon",
|
|
6885
|
-
class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
|
|
6886
|
-
onClick: addPage
|
|
6887
|
-
}, [
|
|
6888
|
-
createVNode(_sfc_main$G, { icon: unref(Plus) }, null, 8, ["icon"])
|
|
6889
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_1$3)),
|
|
6890
|
-
canScroll.value ? (openBlock(), createElementBlock("div", {
|
|
6891
|
-
key: 2,
|
|
6892
|
-
class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
|
|
6893
|
-
onClick: _cache[0] || (_cache[0] = ($event) => scroll("left"))
|
|
6894
|
-
}, [
|
|
6895
|
-
createVNode(_sfc_main$G, { icon: unref(ArrowLeftBold) }, null, 8, ["icon"])
|
|
6896
|
-
])) : createCommentVNode("", true),
|
|
6897
|
-
pageLength.value ? (openBlock(), createElementBlock("div", {
|
|
6898
|
-
key: 3,
|
|
6899
|
-
class: "m-editor-page-bar-items",
|
|
6900
|
-
ref_key: "itemsContainer",
|
|
6901
|
-
ref: itemsContainer,
|
|
6902
|
-
style: normalizeStyle(`width: ${itemsContainerWidth.value}px`)
|
|
6903
|
-
}, [
|
|
6904
|
-
renderSlot(_ctx.$slots, "default")
|
|
6905
|
-
], 4)) : createCommentVNode("", true),
|
|
6906
|
-
canScroll.value ? (openBlock(), createElementBlock("div", {
|
|
6907
|
-
key: 4,
|
|
6908
|
-
class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
|
|
6909
|
-
onClick: _cache[1] || (_cache[1] = ($event) => scroll("right"))
|
|
6910
|
-
}, [
|
|
6911
|
-
createVNode(_sfc_main$G, { icon: unref(ArrowRightBold) }, null, 8, ["icon"])
|
|
6912
|
-
])) : createCommentVNode("", true)
|
|
6913
|
-
], 512);
|
|
6914
|
-
};
|
|
6915
|
-
}
|
|
6916
|
-
});
|
|
6917
|
-
|
|
6918
|
-
const _hoisted_1$2 = ["onClick"];
|
|
6919
|
-
const _hoisted_2$1 = { class: "m-editor-page-bar-title" };
|
|
6920
|
-
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
6921
|
-
...{
|
|
6922
|
-
name: "MEditorPageBar"
|
|
6923
|
-
},
|
|
6924
|
-
__name: "PageBar",
|
|
6925
|
-
setup(__props) {
|
|
6926
|
-
const services = inject("services");
|
|
6927
|
-
const editorService = services?.editorService;
|
|
6928
|
-
const root = computed(() => editorService?.get("root"));
|
|
6929
|
-
const page = computed(() => editorService?.get("page"));
|
|
6930
|
-
const switchPage = (page2) => {
|
|
6931
|
-
editorService?.select(page2);
|
|
6932
|
-
};
|
|
6933
|
-
const copy = (node) => {
|
|
6934
|
-
node && editorService?.copy(node);
|
|
6935
|
-
editorService?.paste({
|
|
6936
|
-
left: 0,
|
|
6937
|
-
top: 0
|
|
6938
|
-
});
|
|
6939
|
-
};
|
|
6940
|
-
const remove = (node) => {
|
|
6941
|
-
editorService?.remove(node);
|
|
6942
|
-
};
|
|
6943
|
-
return (_ctx, _cache) => {
|
|
6944
|
-
return openBlock(), createBlock(_sfc_main$8, null, {
|
|
6945
|
-
default: withCtx(() => [
|
|
6946
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(root.value && root.value.items || [], (item) => {
|
|
6947
|
-
return openBlock(), createElementBlock("div", {
|
|
6948
|
-
class: normalizeClass(["m-editor-page-bar-item", { active: page.value?.id === item.id }]),
|
|
6949
|
-
key: item.key,
|
|
6950
|
-
onClick: ($event) => switchPage(item)
|
|
6951
|
-
}, [
|
|
6952
|
-
createElementVNode("div", _hoisted_2$1, [
|
|
6953
|
-
renderSlot(_ctx.$slots, "page-bar-title", { page: item }, () => [
|
|
6954
|
-
createVNode(unref(TMagicTooltip), {
|
|
6955
|
-
effect: "dark",
|
|
6956
|
-
placement: "top-start",
|
|
6957
|
-
content: item.name
|
|
6958
|
-
}, {
|
|
6959
|
-
default: withCtx(() => [
|
|
6960
|
-
createElementVNode("span", null, toDisplayString(item.name || item.id), 1)
|
|
6961
|
-
]),
|
|
6962
|
-
_: 2
|
|
6963
|
-
}, 1032, ["content"])
|
|
6964
|
-
])
|
|
6965
|
-
]),
|
|
6966
|
-
createVNode(unref(TMagicPopover), {
|
|
6967
|
-
"popper-class": "page-bar-popover",
|
|
6968
|
-
placement: "top",
|
|
6969
|
-
width: 160,
|
|
6970
|
-
trigger: "hover"
|
|
6971
|
-
}, {
|
|
6972
|
-
reference: withCtx(() => [
|
|
6973
|
-
createVNode(unref(TMagicIcon), { class: "m-editor-page-bar-menu-icon" }, {
|
|
6974
|
-
default: withCtx(() => [
|
|
6975
|
-
createVNode(unref(CaretBottom))
|
|
6976
|
-
]),
|
|
6977
|
-
_: 1
|
|
6978
|
-
})
|
|
6979
|
-
]),
|
|
6980
|
-
default: withCtx(() => [
|
|
6981
|
-
createElementVNode("div", null, [
|
|
6982
|
-
renderSlot(_ctx.$slots, "page-bar-popover", { page: item }, () => [
|
|
6983
|
-
createVNode(_sfc_main$r, {
|
|
6984
|
-
data: {
|
|
6985
|
-
type: "button",
|
|
6986
|
-
text: "复制",
|
|
6987
|
-
icon: unref(DocumentCopy),
|
|
6988
|
-
handler: () => copy(item)
|
|
6989
|
-
}
|
|
6990
|
-
}, null, 8, ["data"]),
|
|
6991
|
-
createVNode(_sfc_main$r, {
|
|
6992
|
-
data: {
|
|
6993
|
-
type: "button",
|
|
6994
|
-
text: "删除",
|
|
6995
|
-
icon: unref(Delete),
|
|
6996
|
-
handler: () => remove(item)
|
|
6997
|
-
}
|
|
6998
|
-
}, null, 8, ["data"])
|
|
6999
|
-
])
|
|
7000
|
-
])
|
|
7001
|
-
]),
|
|
7002
|
-
_: 2
|
|
7003
|
-
}, 1024)
|
|
7004
|
-
], 10, _hoisted_1$2);
|
|
7005
|
-
}), 128))
|
|
7006
|
-
]),
|
|
7007
|
-
_: 3
|
|
7008
|
-
});
|
|
7009
|
-
};
|
|
7010
|
-
}
|
|
7011
|
-
});
|
|
7012
|
-
|
|
7013
|
-
class ScrollViewer extends EventEmitter {
|
|
7014
|
-
container;
|
|
7015
|
-
target;
|
|
7016
|
-
zoom = 1;
|
|
7017
|
-
scrollLeft = 0;
|
|
7018
|
-
scrollTop = 0;
|
|
7019
|
-
scrollHeight = 0;
|
|
7020
|
-
scrollWidth = 0;
|
|
7021
|
-
width = 0;
|
|
7022
|
-
height = 0;
|
|
7023
|
-
translateXCorrectionValue = 0;
|
|
7024
|
-
translateYCorrectionValue = 0;
|
|
7025
|
-
correctionScrollSize = {
|
|
7026
|
-
width: 0,
|
|
7027
|
-
height: 0
|
|
7028
|
-
};
|
|
7029
|
-
resizeObserver = new ResizeObserver(() => {
|
|
7030
|
-
this.setSize();
|
|
7031
|
-
this.setScrollSize();
|
|
7032
|
-
});
|
|
7033
|
-
constructor(options) {
|
|
7034
|
-
super();
|
|
7035
|
-
this.container = options.container;
|
|
7036
|
-
this.target = options.target;
|
|
7037
|
-
this.zoom = options.zoom;
|
|
7038
|
-
if (this.correctionScrollSize) {
|
|
7039
|
-
this.correctionScrollSize = {
|
|
7040
|
-
...this.correctionScrollSize,
|
|
7041
|
-
...options.correctionScrollSize
|
|
7042
|
-
};
|
|
7043
|
-
}
|
|
7044
|
-
this.container.addEventListener("wheel", this.wheelHandler, false);
|
|
7045
|
-
this.setSize();
|
|
7046
|
-
this.setScrollSize();
|
|
7047
|
-
this.resizeObserver.observe(this.container);
|
|
7048
|
-
this.resizeObserver.observe(this.target);
|
|
6827
|
+
class ScrollViewer extends EventEmitter {
|
|
6828
|
+
container;
|
|
6829
|
+
target;
|
|
6830
|
+
zoom = 1;
|
|
6831
|
+
scrollLeft = 0;
|
|
6832
|
+
scrollTop = 0;
|
|
6833
|
+
scrollHeight = 0;
|
|
6834
|
+
scrollWidth = 0;
|
|
6835
|
+
width = 0;
|
|
6836
|
+
height = 0;
|
|
6837
|
+
translateXCorrectionValue = 0;
|
|
6838
|
+
translateYCorrectionValue = 0;
|
|
6839
|
+
correctionScrollSize = {
|
|
6840
|
+
width: 0,
|
|
6841
|
+
height: 0
|
|
6842
|
+
};
|
|
6843
|
+
resizeObserver = new ResizeObserver(() => {
|
|
6844
|
+
this.setSize();
|
|
6845
|
+
this.setScrollSize();
|
|
6846
|
+
});
|
|
6847
|
+
constructor(options) {
|
|
6848
|
+
super();
|
|
6849
|
+
this.container = options.container;
|
|
6850
|
+
this.target = options.target;
|
|
6851
|
+
this.zoom = options.zoom;
|
|
6852
|
+
if (this.correctionScrollSize) {
|
|
6853
|
+
this.correctionScrollSize = {
|
|
6854
|
+
...this.correctionScrollSize,
|
|
6855
|
+
...options.correctionScrollSize
|
|
6856
|
+
};
|
|
6857
|
+
}
|
|
6858
|
+
this.container.addEventListener("wheel", this.wheelHandler, false);
|
|
6859
|
+
this.setSize();
|
|
6860
|
+
this.setScrollSize();
|
|
6861
|
+
this.resizeObserver.observe(this.container);
|
|
6862
|
+
this.resizeObserver.observe(this.target);
|
|
7049
6863
|
}
|
|
7050
6864
|
destroy() {
|
|
7051
6865
|
this.resizeObserver.disconnect();
|
|
@@ -7138,7 +6952,7 @@ class ScrollViewer extends EventEmitter {
|
|
|
7138
6952
|
};
|
|
7139
6953
|
}
|
|
7140
6954
|
|
|
7141
|
-
const _sfc_main$
|
|
6955
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
7142
6956
|
...{
|
|
7143
6957
|
name: "MEditorScrollBar"
|
|
7144
6958
|
},
|
|
@@ -7227,7 +7041,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
7227
7041
|
|
|
7228
7042
|
const ScrollBar_vue_vue_type_style_index_0_lang = '';
|
|
7229
7043
|
|
|
7230
|
-
const _sfc_main$
|
|
7044
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
7231
7045
|
...{
|
|
7232
7046
|
name: "MEditorScrollViewer"
|
|
7233
7047
|
},
|
|
@@ -7313,14 +7127,14 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
7313
7127
|
}, [
|
|
7314
7128
|
renderSlot(_ctx.$slots, "default")
|
|
7315
7129
|
], 4),
|
|
7316
|
-
scrollHeight.value > _ctx.wrapHeight ? (openBlock(), createBlock(_sfc_main$
|
|
7130
|
+
scrollHeight.value > _ctx.wrapHeight ? (openBlock(), createBlock(_sfc_main$d, {
|
|
7317
7131
|
key: 0,
|
|
7318
7132
|
"scroll-size": scrollHeight.value,
|
|
7319
7133
|
size: _ctx.wrapHeight,
|
|
7320
7134
|
pos: vOffset.value,
|
|
7321
7135
|
onScroll: vScrollHandler
|
|
7322
7136
|
}, null, 8, ["scroll-size", "size", "pos"])) : createCommentVNode("", true),
|
|
7323
|
-
scrollWidth.value > _ctx.wrapWidth ? (openBlock(), createBlock(_sfc_main$
|
|
7137
|
+
scrollWidth.value > _ctx.wrapWidth ? (openBlock(), createBlock(_sfc_main$d, {
|
|
7324
7138
|
key: 1,
|
|
7325
7139
|
"is-horizontal": true,
|
|
7326
7140
|
"scroll-size": scrollWidth.value,
|
|
@@ -7498,50 +7312,340 @@ const useStage = (stageOptions) => {
|
|
|
7498
7312
|
return stage;
|
|
7499
7313
|
};
|
|
7500
7314
|
|
|
7501
|
-
const _hoisted_1$
|
|
7315
|
+
const _hoisted_1$7 = {
|
|
7316
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7317
|
+
class: "icon icon-tabler icon-tabler-pin",
|
|
7318
|
+
width: "24",
|
|
7319
|
+
height: "24",
|
|
7502
7320
|
viewBox: "0 0 24 24",
|
|
7321
|
+
"stroke-width": "2",
|
|
7322
|
+
stroke: "currentColor",
|
|
7503
7323
|
fill: "none",
|
|
7504
|
-
|
|
7324
|
+
"stroke-linecap": "round",
|
|
7325
|
+
"stroke-linejoin": "round"
|
|
7505
7326
|
};
|
|
7506
|
-
const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", {
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
|
|
7510
|
-
fill: "black",
|
|
7511
|
-
"fill-opacity": "0.9"
|
|
7327
|
+
const _hoisted_2$5 = /* @__PURE__ */ createElementVNode("path", {
|
|
7328
|
+
stroke: "none",
|
|
7329
|
+
d: "M0 0h24v24H0z",
|
|
7330
|
+
fill: "none"
|
|
7512
7331
|
}, null, -1);
|
|
7513
|
-
const _hoisted_3 = /* @__PURE__ */ createElementVNode("path", {
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7332
|
+
const _hoisted_3$2 = /* @__PURE__ */ createElementVNode("path", { d: "M15 4.5l-4 4l-4 1.5l-1.5 1.5l7 7l1.5 -1.5l1.5 -4l4 -4" }, null, -1);
|
|
7333
|
+
const _hoisted_4$2 = /* @__PURE__ */ createElementVNode("line", {
|
|
7334
|
+
x1: "9",
|
|
7335
|
+
y1: "15",
|
|
7336
|
+
x2: "4.5",
|
|
7337
|
+
y2: "19.5"
|
|
7519
7338
|
}, null, -1);
|
|
7520
|
-
const
|
|
7521
|
-
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
7525
|
-
|
|
7339
|
+
const _hoisted_5$2 = /* @__PURE__ */ createElementVNode("line", {
|
|
7340
|
+
x1: "14.5",
|
|
7341
|
+
y1: "4",
|
|
7342
|
+
x2: "20",
|
|
7343
|
+
y2: "9.5"
|
|
7344
|
+
}, null, -1);
|
|
7345
|
+
const _hoisted_6$1 = [
|
|
7346
|
+
_hoisted_2$5,
|
|
7347
|
+
_hoisted_3$2,
|
|
7348
|
+
_hoisted_4$2,
|
|
7349
|
+
_hoisted_5$2
|
|
7350
|
+
];
|
|
7351
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
7352
|
+
...{
|
|
7353
|
+
name: "MEditorPinIcon"
|
|
7354
|
+
},
|
|
7355
|
+
__name: "PinIcon",
|
|
7356
|
+
setup(__props) {
|
|
7357
|
+
return (_ctx, _cache) => {
|
|
7358
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$7, _hoisted_6$1);
|
|
7359
|
+
};
|
|
7360
|
+
}
|
|
7361
|
+
});
|
|
7362
|
+
|
|
7363
|
+
const _hoisted_1$6 = {
|
|
7364
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7365
|
+
class: "icon icon-tabler icon-tabler-pinned",
|
|
7366
|
+
width: "24",
|
|
7367
|
+
height: "24",
|
|
7368
|
+
viewBox: "0 0 24 24",
|
|
7369
|
+
"stroke-width": "2",
|
|
7370
|
+
stroke: "currentColor",
|
|
7371
|
+
fill: "none",
|
|
7372
|
+
"stroke-linecap": "round",
|
|
7373
|
+
"stroke-linejoin": "round"
|
|
7374
|
+
};
|
|
7375
|
+
const _hoisted_2$4 = /* @__PURE__ */ createElementVNode("path", {
|
|
7376
|
+
stroke: "none",
|
|
7377
|
+
d: "M0 0h24v24H0z",
|
|
7378
|
+
fill: "none"
|
|
7379
|
+
}, null, -1);
|
|
7380
|
+
const _hoisted_3$1 = /* @__PURE__ */ createElementVNode("path", { d: "M9 4v6l-2 4v2h10v-2l-2 -4v-6" }, null, -1);
|
|
7381
|
+
const _hoisted_4$1 = /* @__PURE__ */ createElementVNode("line", {
|
|
7382
|
+
x1: "12",
|
|
7383
|
+
y1: "16",
|
|
7384
|
+
x2: "12",
|
|
7385
|
+
y2: "21"
|
|
7386
|
+
}, null, -1);
|
|
7387
|
+
const _hoisted_5$1 = /* @__PURE__ */ createElementVNode("line", {
|
|
7388
|
+
x1: "8",
|
|
7389
|
+
y1: "4",
|
|
7390
|
+
x2: "16",
|
|
7391
|
+
y2: "4"
|
|
7392
|
+
}, null, -1);
|
|
7393
|
+
const _hoisted_6 = [
|
|
7394
|
+
_hoisted_2$4,
|
|
7395
|
+
_hoisted_3$1,
|
|
7396
|
+
_hoisted_4$1,
|
|
7397
|
+
_hoisted_5$1
|
|
7398
|
+
];
|
|
7399
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
7400
|
+
...{
|
|
7401
|
+
name: "MEditorPinnedIcon"
|
|
7402
|
+
},
|
|
7403
|
+
__name: "PinnedIcon",
|
|
7404
|
+
setup(__props) {
|
|
7405
|
+
return (_ctx, _cache) => {
|
|
7406
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$6, _hoisted_6);
|
|
7407
|
+
};
|
|
7408
|
+
}
|
|
7409
|
+
});
|
|
7410
|
+
|
|
7411
|
+
const _hoisted_1$5 = /* @__PURE__ */ createElementVNode("span", null, "可选组件", -1);
|
|
7412
|
+
const _hoisted_2$3 = { style: { "margin-right": "10px" } };
|
|
7413
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
7414
|
+
...{
|
|
7415
|
+
name: "MEditorNodeListMenuTitle"
|
|
7416
|
+
},
|
|
7417
|
+
__name: "NodeListMenuTitle",
|
|
7418
|
+
props: {
|
|
7419
|
+
pinned: { type: Boolean }
|
|
7420
|
+
},
|
|
7421
|
+
emits: ["close", "update:pinned", "change"],
|
|
7422
|
+
setup(__props, { emit }) {
|
|
7423
|
+
const props = __props;
|
|
7424
|
+
const pinHandler = () => {
|
|
7425
|
+
emit("update:pinned", !props.pinned);
|
|
7426
|
+
};
|
|
7427
|
+
const closeHandler = () => {
|
|
7428
|
+
emit("close");
|
|
7429
|
+
};
|
|
7430
|
+
const target = ref();
|
|
7431
|
+
useGetSo(target, emit);
|
|
7432
|
+
return (_ctx, _cache) => {
|
|
7433
|
+
return openBlock(), createElementBlock("div", {
|
|
7434
|
+
style: { "text-align": "center", "padding": "5px 0", "font-size": "14px", "cursor": "move", "display": "flex", "justify-content": "space-between", "align-items": "center" },
|
|
7435
|
+
ref_key: "target",
|
|
7436
|
+
ref: target
|
|
7437
|
+
}, [
|
|
7438
|
+
createVNode(unref(TMagicTooltip), {
|
|
7439
|
+
placement: "top",
|
|
7440
|
+
content: _ctx.pinned ? "取消置于顶层自动隐藏" : "置于顶层不消失"
|
|
7441
|
+
}, {
|
|
7442
|
+
default: withCtx(() => [
|
|
7443
|
+
createVNode(_sfc_main$K, {
|
|
7444
|
+
style: { "margin-left": "10px", "cursor": "pointer" },
|
|
7445
|
+
icon: _ctx.pinned ? _sfc_main$a : _sfc_main$b,
|
|
7446
|
+
onClick: pinHandler
|
|
7447
|
+
}, null, 8, ["icon"])
|
|
7448
|
+
]),
|
|
7449
|
+
_: 1
|
|
7450
|
+
}, 8, ["content"]),
|
|
7451
|
+
_hoisted_1$5,
|
|
7452
|
+
createElementVNode("div", _hoisted_2$3, [
|
|
7453
|
+
createVNode(unref(TMagicButton), {
|
|
7454
|
+
text: "",
|
|
7455
|
+
size: "small",
|
|
7456
|
+
onClick: closeHandler
|
|
7457
|
+
}, {
|
|
7458
|
+
default: withCtx(() => [
|
|
7459
|
+
createVNode(_sfc_main$K, { icon: unref(Close) }, null, 8, ["icon"])
|
|
7460
|
+
]),
|
|
7461
|
+
_: 1
|
|
7462
|
+
})
|
|
7463
|
+
])
|
|
7464
|
+
], 512);
|
|
7465
|
+
};
|
|
7466
|
+
}
|
|
7467
|
+
});
|
|
7468
|
+
|
|
7469
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
7470
|
+
__name: "NodeListMenu",
|
|
7471
|
+
props: {
|
|
7472
|
+
isMultiSelect: { type: Boolean }
|
|
7473
|
+
},
|
|
7474
|
+
setup(__props) {
|
|
7475
|
+
const props = __props;
|
|
7476
|
+
const menu = ref();
|
|
7477
|
+
const nodeList = ref([]);
|
|
7478
|
+
const pinned = ref(false);
|
|
7479
|
+
const services = inject("services");
|
|
7480
|
+
const editorService = services?.editorService;
|
|
7481
|
+
const componentListService = services?.componentListService;
|
|
7482
|
+
const stage = computed(() => editorService?.get("stage"));
|
|
7483
|
+
const page = computed(() => editorService?.get("page"));
|
|
7484
|
+
const node = computed(() => editorService?.get("node"));
|
|
7485
|
+
let timeout = null;
|
|
7486
|
+
const cancel = () => {
|
|
7487
|
+
if (timeout) {
|
|
7488
|
+
globalThis.clearTimeout(timeout);
|
|
7489
|
+
}
|
|
7490
|
+
if (pinned.value) {
|
|
7491
|
+
return;
|
|
7492
|
+
}
|
|
7493
|
+
nodeList.value = [];
|
|
7494
|
+
menu.value?.hide();
|
|
7495
|
+
};
|
|
7496
|
+
const unWatch = watch(
|
|
7497
|
+
stage,
|
|
7498
|
+
(stage2) => {
|
|
7499
|
+
if (!stage2)
|
|
7500
|
+
return;
|
|
7501
|
+
stage2.on("drag-start", () => {
|
|
7502
|
+
cancel();
|
|
7503
|
+
});
|
|
7504
|
+
stage2.on("mousemove", (event) => {
|
|
7505
|
+
cancel();
|
|
7506
|
+
if (props.isMultiSelect || stage2.getDragStatus() !== StageDragStatus.END) {
|
|
7507
|
+
return;
|
|
7508
|
+
}
|
|
7509
|
+
timeout = globalThis.setTimeout(() => {
|
|
7510
|
+
const els = stage2?.renderer.getElementsFromPoint(event);
|
|
7511
|
+
const nodes = getNodes(
|
|
7512
|
+
els.map((el) => el.id),
|
|
7513
|
+
page.value?.items
|
|
7514
|
+
);
|
|
7515
|
+
if (pinned.value && nodes.length === 0) {
|
|
7516
|
+
return;
|
|
7517
|
+
}
|
|
7518
|
+
nodeList.value = nodes;
|
|
7519
|
+
if (nodeList.value.length > 1) {
|
|
7520
|
+
menu.value?.show(pinned.value ? void 0 : event);
|
|
7521
|
+
}
|
|
7522
|
+
}, 1500);
|
|
7523
|
+
});
|
|
7524
|
+
stage2.on("mouseleave", () => {
|
|
7525
|
+
cancel();
|
|
7526
|
+
});
|
|
7527
|
+
unWatch();
|
|
7528
|
+
},
|
|
7529
|
+
{
|
|
7530
|
+
immediate: true
|
|
7531
|
+
}
|
|
7532
|
+
);
|
|
7533
|
+
const componentMap = computed(() => {
|
|
7534
|
+
const map = {};
|
|
7535
|
+
componentListService?.getList().forEach((group) => {
|
|
7536
|
+
group.items.forEach((item) => {
|
|
7537
|
+
map[item.type] = item;
|
|
7538
|
+
});
|
|
7539
|
+
});
|
|
7540
|
+
return map;
|
|
7541
|
+
});
|
|
7542
|
+
const menuData = computed(
|
|
7543
|
+
() => nodeList.value.map((node2) => {
|
|
7544
|
+
let text = node2.name;
|
|
7545
|
+
let icon;
|
|
7546
|
+
if (node2.type) {
|
|
7547
|
+
const item = componentMap.value[node2.type];
|
|
7548
|
+
text += ` (${item?.text})`;
|
|
7549
|
+
icon = item?.icon;
|
|
7550
|
+
}
|
|
7551
|
+
return {
|
|
7552
|
+
type: "button",
|
|
7553
|
+
text,
|
|
7554
|
+
id: node2.id,
|
|
7555
|
+
icon,
|
|
7556
|
+
handler: async () => {
|
|
7557
|
+
await editorService?.select(node2);
|
|
7558
|
+
stage.value?.select(node2.id);
|
|
7559
|
+
}
|
|
7560
|
+
};
|
|
7561
|
+
})
|
|
7562
|
+
);
|
|
7563
|
+
const mouseenterHandler = () => {
|
|
7564
|
+
globalThis.setTimeout(() => {
|
|
7565
|
+
if (timeout) {
|
|
7566
|
+
globalThis.clearTimeout(timeout);
|
|
7567
|
+
}
|
|
7568
|
+
}, 300);
|
|
7569
|
+
};
|
|
7570
|
+
const dragMenuHandler = ({ deltaY, deltaX }) => {
|
|
7571
|
+
if (!menu.value)
|
|
7572
|
+
return;
|
|
7573
|
+
const { menuPosition } = menu.value;
|
|
7574
|
+
menu.value?.setPosition({
|
|
7575
|
+
clientY: menuPosition.top + deltaY,
|
|
7576
|
+
clientX: menuPosition.left + deltaX
|
|
7577
|
+
});
|
|
7578
|
+
};
|
|
7579
|
+
const closeHandler = () => {
|
|
7580
|
+
menu.value?.hide();
|
|
7581
|
+
};
|
|
7582
|
+
return (_ctx, _cache) => {
|
|
7583
|
+
return openBlock(), createBlock(_sfc_main$j, {
|
|
7584
|
+
ref_key: "menu",
|
|
7585
|
+
ref: menu,
|
|
7586
|
+
"menu-data": menuData.value,
|
|
7587
|
+
active: node.value?.id,
|
|
7588
|
+
"auto-hide": !pinned.value,
|
|
7589
|
+
onMouseenter: _cache[1] || (_cache[1] = ($event) => mouseenterHandler())
|
|
7590
|
+
}, {
|
|
7591
|
+
title: withCtx(() => [
|
|
7592
|
+
createVNode(_sfc_main$9, {
|
|
7593
|
+
pinned: pinned.value,
|
|
7594
|
+
"onUpdate:pinned": _cache[0] || (_cache[0] = ($event) => pinned.value = $event),
|
|
7595
|
+
onChange: dragMenuHandler,
|
|
7596
|
+
onClose: closeHandler
|
|
7597
|
+
}, null, 8, ["pinned"])
|
|
7598
|
+
]),
|
|
7599
|
+
_: 1
|
|
7600
|
+
}, 8, ["menu-data", "active", "auto-hide"]);
|
|
7601
|
+
};
|
|
7602
|
+
}
|
|
7603
|
+
});
|
|
7604
|
+
|
|
7605
|
+
const _hoisted_1$4 = {
|
|
7606
|
+
viewBox: "0 0 24 24",
|
|
7607
|
+
fill: "none",
|
|
7608
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
7609
|
+
};
|
|
7610
|
+
const _hoisted_2$2 = /* @__PURE__ */ createElementVNode("path", {
|
|
7611
|
+
"fill-rule": "evenodd",
|
|
7612
|
+
"clip-rule": "evenodd",
|
|
7613
|
+
d: "M2 4H21V6H2V4Z",
|
|
7614
|
+
fill: "black",
|
|
7615
|
+
"fill-opacity": "0.9"
|
|
7616
|
+
}, null, -1);
|
|
7617
|
+
const _hoisted_3 = /* @__PURE__ */ createElementVNode("path", {
|
|
7618
|
+
"fill-rule": "evenodd",
|
|
7619
|
+
"clip-rule": "evenodd",
|
|
7620
|
+
d: "M5 11H18V13H5V11Z",
|
|
7621
|
+
fill: "black",
|
|
7622
|
+
"fill-opacity": "0.9"
|
|
7623
|
+
}, null, -1);
|
|
7624
|
+
const _hoisted_4 = /* @__PURE__ */ createElementVNode("path", {
|
|
7625
|
+
"fill-rule": "evenodd",
|
|
7626
|
+
"clip-rule": "evenodd",
|
|
7627
|
+
d: "M2 18H21V20H2V18Z",
|
|
7628
|
+
fill: "black",
|
|
7629
|
+
"fill-opacity": "0.9"
|
|
7526
7630
|
}, null, -1);
|
|
7527
7631
|
const _hoisted_5 = [
|
|
7528
|
-
_hoisted_2,
|
|
7632
|
+
_hoisted_2$2,
|
|
7529
7633
|
_hoisted_3,
|
|
7530
7634
|
_hoisted_4
|
|
7531
7635
|
];
|
|
7532
|
-
const _sfc_main$
|
|
7636
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
7533
7637
|
...{
|
|
7534
7638
|
name: "MEditorCenterIcon"
|
|
7535
7639
|
},
|
|
7536
7640
|
__name: "CenterIcon",
|
|
7537
7641
|
setup(__props) {
|
|
7538
7642
|
return (_ctx, _cache) => {
|
|
7539
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
7643
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$4, _hoisted_5);
|
|
7540
7644
|
};
|
|
7541
7645
|
}
|
|
7542
7646
|
});
|
|
7543
7647
|
|
|
7544
|
-
const _sfc_main$
|
|
7648
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
7545
7649
|
...{
|
|
7546
7650
|
name: "MEditorViewerMenu"
|
|
7547
7651
|
},
|
|
@@ -7564,7 +7668,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
7564
7668
|
{
|
|
7565
7669
|
type: "button",
|
|
7566
7670
|
text: "水平居中",
|
|
7567
|
-
icon: markRaw(_sfc_main$
|
|
7671
|
+
icon: markRaw(_sfc_main$7),
|
|
7568
7672
|
display: () => canCenter.value,
|
|
7569
7673
|
handler: () => {
|
|
7570
7674
|
if (!nodes.value)
|
|
@@ -7660,7 +7764,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
7660
7764
|
};
|
|
7661
7765
|
__expose({ show });
|
|
7662
7766
|
return (_ctx, _cache) => {
|
|
7663
|
-
return openBlock(), createBlock(_sfc_main$
|
|
7767
|
+
return openBlock(), createBlock(_sfc_main$j, {
|
|
7664
7768
|
"menu-data": menuData.value,
|
|
7665
7769
|
ref_key: "menu",
|
|
7666
7770
|
ref: menu
|
|
@@ -7669,7 +7773,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
7669
7773
|
}
|
|
7670
7774
|
});
|
|
7671
7775
|
|
|
7672
|
-
const _sfc_main$
|
|
7776
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
7673
7777
|
...{
|
|
7674
7778
|
name: "MEditorStage"
|
|
7675
7779
|
},
|
|
@@ -7809,7 +7913,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
7809
7913
|
}
|
|
7810
7914
|
};
|
|
7811
7915
|
return (_ctx, _cache) => {
|
|
7812
|
-
return openBlock(), createBlock(_sfc_main$
|
|
7916
|
+
return openBlock(), createBlock(_sfc_main$c, {
|
|
7813
7917
|
class: "m-editor-stage",
|
|
7814
7918
|
ref_key: "stageWrap",
|
|
7815
7919
|
ref: stageWrap,
|
|
@@ -7836,12 +7940,16 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
7836
7940
|
onDragover: dragoverHandler
|
|
7837
7941
|
}, null, 36),
|
|
7838
7942
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
7839
|
-
createVNode(_sfc_main$
|
|
7943
|
+
createVNode(_sfc_main$6, {
|
|
7840
7944
|
ref_key: "menu",
|
|
7841
7945
|
ref: menu,
|
|
7842
7946
|
"is-multi-select": isMultiSelect.value,
|
|
7843
7947
|
"stage-content-menu": _ctx.stageContentMenu
|
|
7844
|
-
}, null, 8, ["is-multi-select", "stage-content-menu"])
|
|
7948
|
+
}, null, 8, ["is-multi-select", "stage-content-menu"]),
|
|
7949
|
+
createVNode(_sfc_main$8, {
|
|
7950
|
+
ref: "nodeList",
|
|
7951
|
+
"is-multi-select": isMultiSelect.value
|
|
7952
|
+
}, null, 8, ["is-multi-select"])
|
|
7845
7953
|
]))
|
|
7846
7954
|
]),
|
|
7847
7955
|
_: 1
|
|
@@ -7850,6 +7958,268 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
7850
7958
|
}
|
|
7851
7959
|
});
|
|
7852
7960
|
|
|
7961
|
+
const _hoisted_1$3 = {
|
|
7962
|
+
key: 0,
|
|
7963
|
+
class: "m-editor-breadcrumb"
|
|
7964
|
+
};
|
|
7965
|
+
const _hoisted_2$1 = { key: 0 };
|
|
7966
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
7967
|
+
...{
|
|
7968
|
+
name: "MEditorBreadcrumb"
|
|
7969
|
+
},
|
|
7970
|
+
__name: "Breadcrumb",
|
|
7971
|
+
setup(__props) {
|
|
7972
|
+
const services = inject("services");
|
|
7973
|
+
const editorService = services?.editorService;
|
|
7974
|
+
const node = computed(() => editorService?.get("node"));
|
|
7975
|
+
const nodes = computed(() => editorService?.get("nodes") || []);
|
|
7976
|
+
const root = computed(() => editorService?.get("root"));
|
|
7977
|
+
const path = computed(() => getNodePath(node.value?.id || "", root.value?.items || []));
|
|
7978
|
+
const select = async (node2) => {
|
|
7979
|
+
await editorService?.select(node2);
|
|
7980
|
+
editorService?.get("stage")?.select(node2.id);
|
|
7981
|
+
};
|
|
7982
|
+
return (_ctx, _cache) => {
|
|
7983
|
+
return nodes.value.length === 1 ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
7984
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(path.value, (item, index) => {
|
|
7985
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
7986
|
+
key: item.id
|
|
7987
|
+
}, [
|
|
7988
|
+
createVNode(unref(TMagicButton), {
|
|
7989
|
+
text: "",
|
|
7990
|
+
disabled: item.id === node.value?.id,
|
|
7991
|
+
onClick: ($event) => select(item)
|
|
7992
|
+
}, {
|
|
7993
|
+
default: withCtx(() => [
|
|
7994
|
+
createTextVNode(toDisplayString(item.name), 1)
|
|
7995
|
+
]),
|
|
7996
|
+
_: 2
|
|
7997
|
+
}, 1032, ["disabled", "onClick"]),
|
|
7998
|
+
index < path.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_2$1, "/")) : createCommentVNode("", true)
|
|
7999
|
+
], 64);
|
|
8000
|
+
}), 128))
|
|
8001
|
+
])) : createCommentVNode("", true);
|
|
8002
|
+
};
|
|
8003
|
+
}
|
|
8004
|
+
});
|
|
8005
|
+
|
|
8006
|
+
const _hoisted_1$2 = {
|
|
8007
|
+
key: 1,
|
|
8008
|
+
style: { "width": "21px" }
|
|
8009
|
+
};
|
|
8010
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
8011
|
+
...{
|
|
8012
|
+
name: "MEditorPageBarScrollContainer"
|
|
8013
|
+
},
|
|
8014
|
+
__name: "PageBarScrollContainer",
|
|
8015
|
+
setup(__props) {
|
|
8016
|
+
const services = inject("services");
|
|
8017
|
+
const editorService = services?.editorService;
|
|
8018
|
+
const uiService = services?.uiService;
|
|
8019
|
+
const itemsContainer = ref();
|
|
8020
|
+
const canScroll = ref(false);
|
|
8021
|
+
const showAddPageButton = computed(() => uiService?.get("showAddPageButton"));
|
|
8022
|
+
const itemsContainerWidth = ref(0);
|
|
8023
|
+
const setCanScroll = () => {
|
|
8024
|
+
itemsContainerWidth.value = (pageBar.value?.clientWidth || 0) - 37 * 2 - (showAddPageButton.value ? 37 : 21);
|
|
8025
|
+
nextTick(() => {
|
|
8026
|
+
if (itemsContainer.value) {
|
|
8027
|
+
canScroll.value = itemsContainer.value.scrollWidth - itemsContainerWidth.value > 1;
|
|
8028
|
+
}
|
|
8029
|
+
});
|
|
8030
|
+
};
|
|
8031
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
8032
|
+
setCanScroll();
|
|
8033
|
+
});
|
|
8034
|
+
const pageBar = ref();
|
|
8035
|
+
onMounted(() => {
|
|
8036
|
+
pageBar.value && resizeObserver.observe(pageBar.value);
|
|
8037
|
+
});
|
|
8038
|
+
onUnmounted(() => {
|
|
8039
|
+
resizeObserver.disconnect();
|
|
8040
|
+
});
|
|
8041
|
+
let translateLeft = 0;
|
|
8042
|
+
const scroll = (type) => {
|
|
8043
|
+
if (!itemsContainer.value)
|
|
8044
|
+
return;
|
|
8045
|
+
const maxScrollLeft = itemsContainer.value.scrollWidth - itemsContainerWidth.value;
|
|
8046
|
+
if (type === "left") {
|
|
8047
|
+
translateLeft += 100;
|
|
8048
|
+
if (translateLeft > 0) {
|
|
8049
|
+
translateLeft = 0;
|
|
8050
|
+
}
|
|
8051
|
+
} else if (type === "right") {
|
|
8052
|
+
translateLeft -= 100;
|
|
8053
|
+
if (-translateLeft > maxScrollLeft) {
|
|
8054
|
+
translateLeft = -maxScrollLeft;
|
|
8055
|
+
}
|
|
8056
|
+
} else if (type === "start") {
|
|
8057
|
+
translateLeft = 0;
|
|
8058
|
+
} else if (type === "end") {
|
|
8059
|
+
translateLeft = -maxScrollLeft;
|
|
8060
|
+
}
|
|
8061
|
+
itemsContainer.value.style.transform = `translate(${translateLeft}px, 0px)`;
|
|
8062
|
+
};
|
|
8063
|
+
const pageLength = computed(() => editorService?.get("pageLength"));
|
|
8064
|
+
watch(pageLength, (length = 0, preLength = 0) => {
|
|
8065
|
+
setTimeout(() => {
|
|
8066
|
+
setCanScroll();
|
|
8067
|
+
if (length < preLength) {
|
|
8068
|
+
scroll("start");
|
|
8069
|
+
} else {
|
|
8070
|
+
scroll("end");
|
|
8071
|
+
}
|
|
8072
|
+
});
|
|
8073
|
+
});
|
|
8074
|
+
const addPage = () => {
|
|
8075
|
+
if (!editorService)
|
|
8076
|
+
return;
|
|
8077
|
+
const root = toRaw(editorService.get("root"));
|
|
8078
|
+
if (!root)
|
|
8079
|
+
throw new Error("root 不能为空");
|
|
8080
|
+
const pageConfig = {
|
|
8081
|
+
type: NodeType.PAGE,
|
|
8082
|
+
name: generatePageNameByApp(root)
|
|
8083
|
+
};
|
|
8084
|
+
editorService.add(pageConfig);
|
|
8085
|
+
};
|
|
8086
|
+
return (_ctx, _cache) => {
|
|
8087
|
+
return openBlock(), createElementBlock("div", {
|
|
8088
|
+
class: "m-editor-page-bar",
|
|
8089
|
+
ref_key: "pageBar",
|
|
8090
|
+
ref: pageBar
|
|
8091
|
+
}, [
|
|
8092
|
+
showAddPageButton.value ? (openBlock(), createElementBlock("div", {
|
|
8093
|
+
key: 0,
|
|
8094
|
+
id: "m-editor-page-bar-add-icon",
|
|
8095
|
+
class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
|
|
8096
|
+
onClick: addPage
|
|
8097
|
+
}, [
|
|
8098
|
+
createVNode(_sfc_main$K, { icon: unref(Plus) }, null, 8, ["icon"])
|
|
8099
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_1$2)),
|
|
8100
|
+
canScroll.value ? (openBlock(), createElementBlock("div", {
|
|
8101
|
+
key: 2,
|
|
8102
|
+
class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
|
|
8103
|
+
onClick: _cache[0] || (_cache[0] = ($event) => scroll("left"))
|
|
8104
|
+
}, [
|
|
8105
|
+
createVNode(_sfc_main$K, { icon: unref(ArrowLeftBold) }, null, 8, ["icon"])
|
|
8106
|
+
])) : createCommentVNode("", true),
|
|
8107
|
+
pageLength.value ? (openBlock(), createElementBlock("div", {
|
|
8108
|
+
key: 3,
|
|
8109
|
+
class: "m-editor-page-bar-items",
|
|
8110
|
+
ref_key: "itemsContainer",
|
|
8111
|
+
ref: itemsContainer,
|
|
8112
|
+
style: normalizeStyle(`width: ${itemsContainerWidth.value}px`)
|
|
8113
|
+
}, [
|
|
8114
|
+
renderSlot(_ctx.$slots, "default")
|
|
8115
|
+
], 4)) : createCommentVNode("", true),
|
|
8116
|
+
canScroll.value ? (openBlock(), createElementBlock("div", {
|
|
8117
|
+
key: 4,
|
|
8118
|
+
class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
|
|
8119
|
+
onClick: _cache[1] || (_cache[1] = ($event) => scroll("right"))
|
|
8120
|
+
}, [
|
|
8121
|
+
createVNode(_sfc_main$K, { icon: unref(ArrowRightBold) }, null, 8, ["icon"])
|
|
8122
|
+
])) : createCommentVNode("", true)
|
|
8123
|
+
], 512);
|
|
8124
|
+
};
|
|
8125
|
+
}
|
|
8126
|
+
});
|
|
8127
|
+
|
|
8128
|
+
const _hoisted_1$1 = ["onClick"];
|
|
8129
|
+
const _hoisted_2 = { class: "m-editor-page-bar-title" };
|
|
8130
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
8131
|
+
...{
|
|
8132
|
+
name: "MEditorPageBar"
|
|
8133
|
+
},
|
|
8134
|
+
__name: "PageBar",
|
|
8135
|
+
setup(__props) {
|
|
8136
|
+
const services = inject("services");
|
|
8137
|
+
const editorService = services?.editorService;
|
|
8138
|
+
const root = computed(() => editorService?.get("root"));
|
|
8139
|
+
const page = computed(() => editorService?.get("page"));
|
|
8140
|
+
const switchPage = (page2) => {
|
|
8141
|
+
editorService?.select(page2);
|
|
8142
|
+
};
|
|
8143
|
+
const copy = (node) => {
|
|
8144
|
+
node && editorService?.copy(node);
|
|
8145
|
+
editorService?.paste({
|
|
8146
|
+
left: 0,
|
|
8147
|
+
top: 0
|
|
8148
|
+
});
|
|
8149
|
+
};
|
|
8150
|
+
const remove = (node) => {
|
|
8151
|
+
editorService?.remove(node);
|
|
8152
|
+
};
|
|
8153
|
+
return (_ctx, _cache) => {
|
|
8154
|
+
return openBlock(), createBlock(_sfc_main$3, null, {
|
|
8155
|
+
default: withCtx(() => [
|
|
8156
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(root.value && root.value.items || [], (item) => {
|
|
8157
|
+
return openBlock(), createElementBlock("div", {
|
|
8158
|
+
class: normalizeClass(["m-editor-page-bar-item", { active: page.value?.id === item.id }]),
|
|
8159
|
+
key: item.key,
|
|
8160
|
+
onClick: ($event) => switchPage(item)
|
|
8161
|
+
}, [
|
|
8162
|
+
createElementVNode("div", _hoisted_2, [
|
|
8163
|
+
renderSlot(_ctx.$slots, "page-bar-title", { page: item }, () => [
|
|
8164
|
+
createVNode(unref(TMagicTooltip), {
|
|
8165
|
+
effect: "dark",
|
|
8166
|
+
placement: "top-start",
|
|
8167
|
+
content: item.name
|
|
8168
|
+
}, {
|
|
8169
|
+
default: withCtx(() => [
|
|
8170
|
+
createElementVNode("span", null, toDisplayString(item.name || item.id), 1)
|
|
8171
|
+
]),
|
|
8172
|
+
_: 2
|
|
8173
|
+
}, 1032, ["content"])
|
|
8174
|
+
])
|
|
8175
|
+
]),
|
|
8176
|
+
createVNode(unref(TMagicPopover), {
|
|
8177
|
+
"popper-class": "page-bar-popover",
|
|
8178
|
+
placement: "top",
|
|
8179
|
+
width: 160,
|
|
8180
|
+
trigger: "hover"
|
|
8181
|
+
}, {
|
|
8182
|
+
reference: withCtx(() => [
|
|
8183
|
+
createVNode(unref(TMagicIcon), { class: "m-editor-page-bar-menu-icon" }, {
|
|
8184
|
+
default: withCtx(() => [
|
|
8185
|
+
createVNode(unref(CaretBottom))
|
|
8186
|
+
]),
|
|
8187
|
+
_: 1
|
|
8188
|
+
})
|
|
8189
|
+
]),
|
|
8190
|
+
default: withCtx(() => [
|
|
8191
|
+
createElementVNode("div", null, [
|
|
8192
|
+
renderSlot(_ctx.$slots, "page-bar-popover", { page: item }, () => [
|
|
8193
|
+
createVNode(_sfc_main$v, {
|
|
8194
|
+
data: {
|
|
8195
|
+
type: "button",
|
|
8196
|
+
text: "复制",
|
|
8197
|
+
icon: unref(DocumentCopy),
|
|
8198
|
+
handler: () => copy(item)
|
|
8199
|
+
}
|
|
8200
|
+
}, null, 8, ["data"]),
|
|
8201
|
+
createVNode(_sfc_main$v, {
|
|
8202
|
+
data: {
|
|
8203
|
+
type: "button",
|
|
8204
|
+
text: "删除",
|
|
8205
|
+
icon: unref(Delete),
|
|
8206
|
+
handler: () => remove(item)
|
|
8207
|
+
}
|
|
8208
|
+
}, null, 8, ["data"])
|
|
8209
|
+
])
|
|
8210
|
+
])
|
|
8211
|
+
]),
|
|
8212
|
+
_: 2
|
|
8213
|
+
}, 1024)
|
|
8214
|
+
], 10, _hoisted_1$1);
|
|
8215
|
+
}), 128))
|
|
8216
|
+
]),
|
|
8217
|
+
_: 3
|
|
8218
|
+
});
|
|
8219
|
+
};
|
|
8220
|
+
}
|
|
8221
|
+
});
|
|
8222
|
+
|
|
7853
8223
|
const _hoisted_1 = { class: "m-editor-workspace" };
|
|
7854
8224
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
7855
8225
|
...{
|
|
@@ -7864,15 +8234,15 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
7864
8234
|
const page = computed(() => services?.editorService.get("page"));
|
|
7865
8235
|
return (_ctx, _cache) => {
|
|
7866
8236
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
7867
|
-
createVNode(_sfc_main$
|
|
8237
|
+
createVNode(_sfc_main$4),
|
|
7868
8238
|
renderSlot(_ctx.$slots, "stage", {}, () => [
|
|
7869
|
-
page.value ? (openBlock(), createBlock(_sfc_main$
|
|
8239
|
+
page.value ? (openBlock(), createBlock(_sfc_main$5, {
|
|
7870
8240
|
key: 0,
|
|
7871
8241
|
"stage-content-menu": _ctx.stageContentMenu
|
|
7872
8242
|
}, null, 8, ["stage-content-menu"])) : createCommentVNode("", true)
|
|
7873
8243
|
]),
|
|
7874
8244
|
renderSlot(_ctx.$slots, "workspace-content"),
|
|
7875
|
-
createVNode(_sfc_main$
|
|
8245
|
+
createVNode(_sfc_main$2, null, {
|
|
7876
8246
|
"page-bar-title": withCtx(({ page: page2 }) => [
|
|
7877
8247
|
renderSlot(_ctx.$slots, "page-bar-title", { page: page2 })
|
|
7878
8248
|
]),
|
|
@@ -9120,11 +9490,11 @@ const initServiceEvents = (props, emit, { editorService, codeBlockService, dataS
|
|
|
9120
9490
|
const _sfc_main = defineComponent({
|
|
9121
9491
|
name: "MEditor",
|
|
9122
9492
|
components: {
|
|
9123
|
-
TMagicNavMenu: _sfc_main$
|
|
9124
|
-
Sidebar: _sfc_main$
|
|
9493
|
+
TMagicNavMenu: _sfc_main$u,
|
|
9494
|
+
Sidebar: _sfc_main$e,
|
|
9125
9495
|
Workspace: _sfc_main$1,
|
|
9126
|
-
PropsPanel: _sfc_main$
|
|
9127
|
-
Framework: _sfc_main$
|
|
9496
|
+
PropsPanel: _sfc_main$t,
|
|
9497
|
+
Framework: _sfc_main$w
|
|
9128
9498
|
},
|
|
9129
9499
|
props: editorProps,
|
|
9130
9500
|
emits: ["props-panel-mounted", "update:modelValue"],
|
|
@@ -9289,22 +9659,22 @@ const index = {
|
|
|
9289
9659
|
app.config.globalProperties.$TMAGIC_EDITOR = option;
|
|
9290
9660
|
setConfig(option);
|
|
9291
9661
|
app.component(Editor.name, Editor);
|
|
9292
|
-
app.component("m-fields-ui-select", _sfc_main$
|
|
9293
|
-
app.component("m-fields-code-link", _sfc_main$
|
|
9294
|
-
app.component("m-fields-vs-code", _sfc_main$
|
|
9295
|
-
app.component("magic-code-editor", _sfc_main$
|
|
9296
|
-
app.component("m-fields-code-select", _sfc_main$
|
|
9297
|
-
app.component("m-fields-code-select-col", _sfc_main$
|
|
9298
|
-
app.component("m-fields-event-select", _sfc_main$
|
|
9299
|
-
app.component("m-fields-data-source-fields", _sfc_main$
|
|
9300
|
-
app.component("m-fields-key-value", _sfc_main$
|
|
9301
|
-
app.component("m-fields-data-source-input", _sfc_main$
|
|
9302
|
-
app.component("m-fields-data-source-select", _sfc_main$
|
|
9303
|
-
app.component("m-fields-data-source-methods", _sfc_main$
|
|
9304
|
-
app.component("m-fields-data-source-method-select", _sfc_main$
|
|
9305
|
-
app.component("m-fields-data-source-field-select", _sfc_main$
|
|
9662
|
+
app.component("m-fields-ui-select", _sfc_main$A);
|
|
9663
|
+
app.component("m-fields-code-link", _sfc_main$O);
|
|
9664
|
+
app.component("m-fields-vs-code", _sfc_main$P);
|
|
9665
|
+
app.component("magic-code-editor", _sfc_main$Q);
|
|
9666
|
+
app.component("m-fields-code-select", _sfc_main$N);
|
|
9667
|
+
app.component("m-fields-code-select-col", _sfc_main$J);
|
|
9668
|
+
app.component("m-fields-event-select", _sfc_main$C);
|
|
9669
|
+
app.component("m-fields-data-source-fields", _sfc_main$I);
|
|
9670
|
+
app.component("m-fields-key-value", _sfc_main$B);
|
|
9671
|
+
app.component("m-fields-data-source-input", _sfc_main$G);
|
|
9672
|
+
app.component("m-fields-data-source-select", _sfc_main$D);
|
|
9673
|
+
app.component("m-fields-data-source-methods", _sfc_main$F);
|
|
9674
|
+
app.component("m-fields-data-source-method-select", _sfc_main$E);
|
|
9675
|
+
app.component("m-fields-data-source-field-select", _sfc_main$H);
|
|
9306
9676
|
}
|
|
9307
9677
|
};
|
|
9308
9678
|
|
|
9309
|
-
export { CODE_DRAFT_STORAGE_KEY, COPY_STORAGE_KEY, _sfc_main$
|
|
9679
|
+
export { CODE_DRAFT_STORAGE_KEY, COPY_STORAGE_KEY, _sfc_main$M as CodeBlockEditor, _sfc_main$p as CodeBlockList, _sfc_main$o as CodeBlockListPanel, CodeDeleteErrorType, _sfc_main$N as CodeSelect, _sfc_main$J as CodeSelectCol, ColumnLayout, _sfc_main$k as ComponentListPanel, _sfc_main$j as ContentMenu, _sfc_main$H as DataSourceFieldSelect, _sfc_main$I as DataSourceFields, _sfc_main$G as DataSourceInput, _sfc_main$E as DataSourceMethodSelect, _sfc_main$F as DataSourceMethods, _sfc_main$D as DataSourceSelect, DepTargetType, _sfc_main$C as EventSelect, Fixed2Other, H_GUIDE_LINE_STORAGE_KEY, _sfc_main$K as Icon, KeyBindingCommand, _sfc_main$B as KeyValue, Keys, LayerOffset, _sfc_main$f as LayerPanel, Layout, _sfc_main$y as LayoutContainer, _sfc_main$t as PropsPanel, _sfc_main$z as Resizer, _sfc_main$y as SplitView, _sfc_main$Q as TMagicCodeEditor, Editor as TMagicEditor, _sfc_main$v as ToolButton, V_GUIDE_LINE_STORAGE_KEY, advancedTabConfig, beforePaste, change2Fixed, codeBlockService, dataSourceService, debug, index as default, depService, displayTabConfig, editorService, error, eventTabConfig, eventsService, fillConfig, fixNodeLeft, fixNodePosition, generatePageName, generatePageNameByApp, getAddParent, getConfig, getDefaultConfig, getDisplayField, getFormConfig, getGuideLineFromCache, getInitPositionStyle, getNodeIndex, getPageList, getPageNameList, getPositionInContainer, getRelativeStyle, historyService, info, isFixed, log, propsService, serializeConfig, setConfig, setLayout, storageService, styleTabConfig, uiService, useCodeBlockEdit, useDataSourceMethod, useStage, warn };
|
|
9310
9680
|
//# sourceMappingURL=tmagic-editor.js.map
|