@tmagic/editor 1.5.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +153 -6
- package/dist/tmagic-editor.js +907 -528
- package/dist/tmagic-editor.umd.cjs +932 -552
- package/package.json +10 -10
- package/src/Editor.vue +18 -5
- package/src/components/CodeBlockEditor.vue +3 -3
- package/src/components/CodeParams.vue +2 -2
- package/src/components/ContentMenu.vue +18 -18
- package/src/components/FloatingBox.vue +3 -3
- package/src/components/Resizer.vue +4 -4
- package/src/components/ScrollBar.vue +3 -3
- package/src/components/ScrollViewer.vue +3 -3
- package/src/components/SplitView.vue +2 -2
- package/src/components/ToolButton.vue +2 -1
- package/src/editorProps.ts +3 -1
- package/src/fields/DataSourceFieldSelect/Index.vue +6 -6
- package/src/fields/DataSourceInput.vue +2 -2
- package/src/fields/DataSourceMethods.vue +2 -2
- package/src/fields/DataSourceMocks.vue +0 -1
- package/src/fields/EventSelect.vue +0 -1
- package/src/fields/KeyValue.vue +2 -2
- package/src/hooks/use-code-block-edit.ts +2 -2
- package/src/hooks/use-getso.ts +7 -7
- package/src/index.ts +2 -1
- package/src/layouts/CodeEditor.vue +2 -2
- package/src/layouts/Framework.vue +5 -8
- package/src/layouts/NavMenu.vue +2 -2
- package/src/layouts/page-bar/PageBar.vue +3 -3
- package/src/layouts/page-bar/PageBarScrollContainer.vue +3 -3
- package/src/layouts/props-panel/FormPanel.vue +123 -0
- package/src/layouts/props-panel/PropsPanel.vue +146 -0
- package/src/layouts/props-panel/use-style-panel.ts +29 -0
- package/src/layouts/sidebar/Sidebar.vue +4 -1
- package/src/layouts/sidebar/code-block/CodeBlockList.vue +12 -1
- package/src/layouts/sidebar/code-block/CodeBlockListPanel.vue +35 -4
- package/src/layouts/sidebar/code-block/useContentMenu.ts +83 -0
- package/src/layouts/sidebar/data-source/DataSourceList.vue +8 -8
- package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +40 -4
- package/src/layouts/sidebar/data-source/useContentMenu.ts +81 -0
- package/src/layouts/sidebar/layer/LayerMenu.vue +7 -13
- package/src/layouts/sidebar/layer/LayerPanel.vue +11 -4
- package/src/layouts/sidebar/layer/use-click.ts +2 -2
- package/src/layouts/sidebar/layer/use-keybinding.ts +2 -2
- package/src/layouts/workspace/Workspace.vue +9 -2
- package/src/layouts/workspace/viewer/NodeListMenu.vue +3 -3
- package/src/layouts/workspace/viewer/Stage.vue +18 -6
- package/src/layouts/workspace/viewer/StageOverlay.vue +2 -2
- package/src/layouts/workspace/viewer/ViewerMenu.vue +4 -6
- package/src/services/storage.ts +2 -1
- package/src/services/ui.ts +1 -0
- package/src/theme/common/var.scss +12 -10
- package/src/theme/component-list-panel.scss +9 -7
- package/src/theme/content-menu.scss +7 -5
- package/src/theme/data-source.scss +3 -1
- package/src/theme/floating-box.scss +4 -2
- package/src/theme/framework.scss +7 -5
- package/src/theme/index.scss +4 -5
- package/src/theme/key-value.scss +2 -2
- package/src/theme/layer-panel.scss +3 -1
- package/src/theme/layout.scss +1 -1
- package/src/theme/nav-menu.scss +7 -5
- package/src/theme/page-bar.scss +17 -15
- package/src/theme/props-panel.scss +81 -1
- package/src/theme/resizer.scss +1 -1
- package/src/theme/sidebar.scss +4 -2
- package/src/theme/stage.scss +3 -1
- package/src/theme/theme.scss +28 -28
- package/src/theme/tree.scss +14 -12
- package/src/type.ts +8 -0
- package/src/utils/content-menu.ts +2 -2
- package/src/utils/props.ts +45 -3
- package/types/index.d.ts +1796 -1230
- package/src/layouts/PropsPanel.vue +0 -131
package/dist/tmagic-editor.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import designPlugin__default, { TMagicIcon, TMagicButton, TMagicCard, getDesignConfig, TMagicSelect, useZIndex,
|
|
1
|
+
import designPlugin__default, { TMagicIcon, TMagicButton, TMagicCard, tMagicMessage, getDesignConfig, TMagicSelect, useZIndex, tMagicMessageBox, TMagicCascader, TMagicTooltip, TMagicTag, TMagicDialog, TMagicSwitch, TMagicInput, TMagicDivider, TMagicDropdown, TMagicDropdownMenu, TMagicDropdownItem, TMagicPopover, TMagicScrollbar, TMagicCollapse, TMagicCollapseItem } from '@tmagic/design';
|
|
2
2
|
export * from '@tmagic/design';
|
|
3
3
|
export { default as designPlugin } from '@tmagic/design';
|
|
4
4
|
import formPlugin__default, { MContainer, MForm, filterFunction, createValues, MFormBox, MSelect, MGroupList, MPanel, createForm } from '@tmagic/form';
|
|
@@ -7,8 +7,8 @@ export { default as formPlugin } from '@tmagic/form';
|
|
|
7
7
|
import tablePlugin__default, { MagicTable } from '@tmagic/table';
|
|
8
8
|
export * from '@tmagic/table';
|
|
9
9
|
export { default as tablePlugin } from '@tmagic/table';
|
|
10
|
-
import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, createElementBlock, normalizeClass, resolveDynamicComponent, toRaw, ref, watch, onMounted, onBeforeUnmount, Teleport, normalizeStyle, computed, reactive, resolveComponent, inject, createCommentVNode, Fragment, renderList, mergeProps, mergeModels, useModel, nextTick, provide, renderSlot, toDisplayString, createTextVNode, isRef, createStaticVNode, watchEffect, withModifiers, toHandlers, createSlots, markRaw, getCurrentInstance, withDirectives, vShow, Transition, resolveDirective, mergeDefaults } from 'vue';
|
|
11
|
-
import { Edit, FullScreen, View, Close, Coin, Delete, Plus, ArrowDown, ArrowLeftBold, ArrowRightBold, Files, Search, CaretBottom, DocumentCopy, Grid, Memo, ScaleToOriginal, ZoomOut, ZoomIn, Right, Back, Document, ArrowRight, CopyDocument, Hide, Goods, List, EditPen, CloseBold, Top, Bottom } from '@element-plus/icons-vue';
|
|
10
|
+
import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, createElementBlock, normalizeClass, resolveDynamicComponent, toRaw, ref, useTemplateRef, watch, onMounted, onBeforeUnmount, Teleport, normalizeStyle, computed, reactive, resolveComponent, inject, createCommentVNode, Fragment, renderList, mergeProps, mergeModels, useModel, nextTick, provide, renderSlot, toDisplayString, createTextVNode, isRef, createStaticVNode, watchEffect, withModifiers, toHandlers, createSlots, markRaw, getCurrentInstance, withDirectives, vShow, Transition, resolveDirective, mergeDefaults } from 'vue';
|
|
11
|
+
import { Edit, FullScreen, View, Close, Coin, Delete, Plus, ArrowDown, ArrowLeftBold, ArrowRightBold, Files, Search, CaretBottom, DocumentCopy, Grid, Memo, ScaleToOriginal, ZoomOut, ZoomIn, Right, Back, Document, Sugar, ArrowRight, CopyDocument, Hide, Goods, List, EditPen, CloseBold, Top, Bottom } from '@element-plus/icons-vue';
|
|
12
12
|
import { throttle, isEmpty, isObject, cloneDeep, mergeWith, uniq, get, map, has, pick, keys } from 'lodash-es';
|
|
13
13
|
import serialize from 'serialize-javascript';
|
|
14
14
|
import { emmetHTML, emmetCSS } from 'emmet-monaco-es';
|
|
@@ -27,8 +27,8 @@ import { detailedDiff } from 'deep-object-diff';
|
|
|
27
27
|
import Sortable from 'sortablejs';
|
|
28
28
|
import KeyController from 'keycon';
|
|
29
29
|
|
|
30
|
-
const _hoisted_1$
|
|
31
|
-
const _sfc_main$
|
|
30
|
+
const _hoisted_1$y = ["src"];
|
|
31
|
+
const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
32
32
|
...{
|
|
33
33
|
name: "MEditorIcon"
|
|
34
34
|
},
|
|
@@ -52,7 +52,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
52
52
|
class: "magic-editor-icon"
|
|
53
53
|
}, {
|
|
54
54
|
default: withCtx(() => [
|
|
55
|
-
createElementVNode("img", { src: _ctx.icon }, null, 8, _hoisted_1$
|
|
55
|
+
createElementVNode("img", { src: _ctx.icon }, null, 8, _hoisted_1$y)
|
|
56
56
|
]),
|
|
57
57
|
_: 1
|
|
58
58
|
})) : typeof _ctx.icon === "string" ? (openBlock(), createElementBlock("i", {
|
|
@@ -80,10 +80,10 @@ const getEditorConfig = (key) => $TMAGIC_EDITOR[key];
|
|
|
80
80
|
emmetHTML(monaco);
|
|
81
81
|
emmetCSS(monaco, ["css", "scss"]);
|
|
82
82
|
|
|
83
|
-
const _hoisted_1$
|
|
83
|
+
const _hoisted_1$x = {
|
|
84
84
|
class: /* @__PURE__ */ normalizeClass(`magic-code-editor`)
|
|
85
85
|
};
|
|
86
|
-
const _sfc_main$
|
|
86
|
+
const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
87
87
|
...{
|
|
88
88
|
name: "MEditorCodeEditor"
|
|
89
89
|
},
|
|
@@ -136,7 +136,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
136
136
|
let vsDiffEditor = null;
|
|
137
137
|
const values = ref("");
|
|
138
138
|
const loading = ref(false);
|
|
139
|
-
const codeEditor =
|
|
139
|
+
const codeEditor = useTemplateRef("codeEditor");
|
|
140
140
|
const resizeObserver = new globalThis.ResizeObserver(
|
|
141
141
|
throttle(() => {
|
|
142
142
|
vsEditor?.layout();
|
|
@@ -240,7 +240,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
240
240
|
}
|
|
241
241
|
});
|
|
242
242
|
return (_ctx, _cache) => {
|
|
243
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
243
|
+
return openBlock(), createElementBlock("div", _hoisted_1$x, [
|
|
244
244
|
(openBlock(), createBlock(Teleport, {
|
|
245
245
|
to: "body",
|
|
246
246
|
disabled: !fullScreen.value
|
|
@@ -256,7 +256,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
256
256
|
onClick: fullScreenHandler
|
|
257
257
|
}, {
|
|
258
258
|
default: withCtx(() => [
|
|
259
|
-
createVNode(_sfc_main$
|
|
259
|
+
createVNode(_sfc_main$Z, { icon: unref(FullScreen) }, null, 8, ["icon"])
|
|
260
260
|
]),
|
|
261
261
|
_: 1
|
|
262
262
|
}),
|
|
@@ -272,7 +272,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
272
272
|
}
|
|
273
273
|
});
|
|
274
274
|
|
|
275
|
-
const _sfc_main$
|
|
275
|
+
const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
276
276
|
...{
|
|
277
277
|
name: "MFieldsVsCode"
|
|
278
278
|
},
|
|
@@ -295,7 +295,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
295
295
|
emit("change", v);
|
|
296
296
|
};
|
|
297
297
|
return (_ctx, _cache) => {
|
|
298
|
-
return openBlock(), createBlock(_sfc_main$
|
|
298
|
+
return openBlock(), createBlock(_sfc_main$Y, {
|
|
299
299
|
height: _ctx.config.height,
|
|
300
300
|
"init-values": _ctx.model[_ctx.name],
|
|
301
301
|
language: _ctx.config.language,
|
|
@@ -310,7 +310,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
310
310
|
}
|
|
311
311
|
});
|
|
312
312
|
|
|
313
|
-
const _sfc_main$
|
|
313
|
+
const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
314
314
|
...{
|
|
315
315
|
name: "MFieldsCodeLink"
|
|
316
316
|
},
|
|
@@ -389,7 +389,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
389
389
|
}
|
|
390
390
|
});
|
|
391
391
|
|
|
392
|
-
const _sfc_main$
|
|
392
|
+
const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
393
393
|
...{
|
|
394
394
|
name: "MFieldsCodeSelect"
|
|
395
395
|
},
|
|
@@ -528,6 +528,7 @@ const numberOptions = [
|
|
|
528
528
|
];
|
|
529
529
|
const styleTabConfig = {
|
|
530
530
|
title: "样式",
|
|
531
|
+
display: ({ services }) => !(services.uiService.get("showStylePanel") ?? true),
|
|
531
532
|
items: [
|
|
532
533
|
{
|
|
533
534
|
name: "style",
|
|
@@ -540,6 +541,7 @@ const styleTabConfig = {
|
|
|
540
541
|
type: "data-source-field-select",
|
|
541
542
|
name: "position",
|
|
542
543
|
text: "固定定位",
|
|
544
|
+
labelPosition: "left",
|
|
543
545
|
checkStrictly: false,
|
|
544
546
|
dataSourceFieldType: ["string"],
|
|
545
547
|
fieldConfig: {
|
|
@@ -597,6 +599,27 @@ const styleTabConfig = {
|
|
|
597
599
|
type: "fieldset",
|
|
598
600
|
legend: "盒子",
|
|
599
601
|
items: [
|
|
602
|
+
{
|
|
603
|
+
type: "data-source-field-select",
|
|
604
|
+
name: "display",
|
|
605
|
+
text: "display",
|
|
606
|
+
checkStrictly: false,
|
|
607
|
+
dataSourceFieldType: ["string"],
|
|
608
|
+
fieldConfig: {
|
|
609
|
+
type: "select",
|
|
610
|
+
clearable: true,
|
|
611
|
+
allowCreate: true,
|
|
612
|
+
options: [
|
|
613
|
+
{ text: "block", value: "block" },
|
|
614
|
+
{ text: "flex", value: "flex" },
|
|
615
|
+
{ text: "none", value: "none" },
|
|
616
|
+
{ text: "inline-block", value: "inline-block" },
|
|
617
|
+
{ text: "grid", value: "grid" },
|
|
618
|
+
{ text: "inline", value: "inline" },
|
|
619
|
+
{ text: "initial", value: "initial" }
|
|
620
|
+
]
|
|
621
|
+
}
|
|
622
|
+
},
|
|
600
623
|
{
|
|
601
624
|
type: "data-source-field-select",
|
|
602
625
|
name: "width",
|
|
@@ -625,13 +648,16 @@ const styleTabConfig = {
|
|
|
625
648
|
dataSourceFieldType: ["string"],
|
|
626
649
|
fieldConfig: {
|
|
627
650
|
type: "select",
|
|
651
|
+
clearable: true,
|
|
652
|
+
allowCreate: true,
|
|
628
653
|
options: [
|
|
629
654
|
{ text: "visible", value: "visible" },
|
|
630
655
|
{ text: "hidden", value: "hidden" },
|
|
631
656
|
{ text: "clip", value: "clip" },
|
|
632
657
|
{ text: "scroll", value: "scroll" },
|
|
633
658
|
{ text: "auto", value: "auto" },
|
|
634
|
-
{ text: "overlay", value: "overlay" }
|
|
659
|
+
{ text: "overlay", value: "overlay" },
|
|
660
|
+
{ text: "initial", value: "initial" }
|
|
635
661
|
]
|
|
636
662
|
}
|
|
637
663
|
}
|
|
@@ -698,7 +724,7 @@ const styleTabConfig = {
|
|
|
698
724
|
checkStrictly: false,
|
|
699
725
|
dataSourceFieldType: ["string"],
|
|
700
726
|
fieldConfig: {
|
|
701
|
-
type: "
|
|
727
|
+
type: "img-upload"
|
|
702
728
|
}
|
|
703
729
|
},
|
|
704
730
|
{
|
|
@@ -827,11 +853,13 @@ const advancedTabConfig = {
|
|
|
827
853
|
{
|
|
828
854
|
name: "created",
|
|
829
855
|
text: "created",
|
|
856
|
+
labelPosition: "top",
|
|
830
857
|
type: "code-select"
|
|
831
858
|
},
|
|
832
859
|
{
|
|
833
860
|
name: "mounted",
|
|
834
861
|
text: "mounted",
|
|
862
|
+
labelPosition: "top",
|
|
835
863
|
type: "code-select"
|
|
836
864
|
}
|
|
837
865
|
]
|
|
@@ -865,8 +893,21 @@ const fillConfig$1 = (config = [], labelWidth = "80px") => [
|
|
|
865
893
|
// 组件id,必须要有
|
|
866
894
|
{
|
|
867
895
|
name: "id",
|
|
868
|
-
|
|
869
|
-
|
|
896
|
+
text: "ID",
|
|
897
|
+
type: "text",
|
|
898
|
+
disabled: true,
|
|
899
|
+
append: {
|
|
900
|
+
type: "button",
|
|
901
|
+
text: "复制",
|
|
902
|
+
handler: async (vm, { model }) => {
|
|
903
|
+
try {
|
|
904
|
+
await navigator.clipboard.writeText(`${model.id}`);
|
|
905
|
+
tMagicMessage.success("已复制");
|
|
906
|
+
} catch (err) {
|
|
907
|
+
tMagicMessage.error("复制失败");
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
}
|
|
870
911
|
},
|
|
871
912
|
{
|
|
872
913
|
name: "name",
|
|
@@ -1757,7 +1798,8 @@ class WebStorage extends BaseService {
|
|
|
1757
1798
|
case "number" /* NUMBER */:
|
|
1758
1799
|
return Number(item);
|
|
1759
1800
|
case "boolean" /* BOOLEAN */:
|
|
1760
|
-
|
|
1801
|
+
if (item === "true") return true;
|
|
1802
|
+
if (item === "false") return false;
|
|
1761
1803
|
default:
|
|
1762
1804
|
return item;
|
|
1763
1805
|
}
|
|
@@ -3230,7 +3272,7 @@ const updateStatus = (nodeStatusMap, id, status) => {
|
|
|
3230
3272
|
});
|
|
3231
3273
|
};
|
|
3232
3274
|
|
|
3233
|
-
const _sfc_main$
|
|
3275
|
+
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
3234
3276
|
...{
|
|
3235
3277
|
name: "MEditorCodeParams"
|
|
3236
3278
|
},
|
|
@@ -3246,7 +3288,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
3246
3288
|
setup(__props, { emit: __emit }) {
|
|
3247
3289
|
const props = __props;
|
|
3248
3290
|
const emit = __emit;
|
|
3249
|
-
const form =
|
|
3291
|
+
const form = useTemplateRef("form");
|
|
3250
3292
|
const getFormConfig = (items = []) => [
|
|
3251
3293
|
{
|
|
3252
3294
|
type: "fieldset",
|
|
@@ -3290,9 +3332,9 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
3290
3332
|
}
|
|
3291
3333
|
});
|
|
3292
3334
|
|
|
3293
|
-
const _hoisted_1$
|
|
3294
|
-
const _hoisted_2$
|
|
3295
|
-
const _sfc_main$
|
|
3335
|
+
const _hoisted_1$w = { class: "m-fields-code-select-col" };
|
|
3336
|
+
const _hoisted_2$i = { class: "code-select-container" };
|
|
3337
|
+
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
3296
3338
|
...{
|
|
3297
3339
|
name: "MFieldsCodeSelectCol"
|
|
3298
3340
|
},
|
|
@@ -3388,8 +3430,8 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
3388
3430
|
eventBus?.emit("edit-code", id);
|
|
3389
3431
|
};
|
|
3390
3432
|
return (_ctx, _cache) => {
|
|
3391
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3392
|
-
createElementVNode("div", _hoisted_2$
|
|
3433
|
+
return openBlock(), createElementBlock("div", _hoisted_1$w, [
|
|
3434
|
+
createElementVNode("div", _hoisted_2$i, [
|
|
3393
3435
|
createVNode(unref(MContainer), {
|
|
3394
3436
|
class: "select",
|
|
3395
3437
|
config: selectConfig,
|
|
@@ -3404,14 +3446,14 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
3404
3446
|
onClick: _cache[0] || (_cache[0] = ($event) => editCode(_ctx.model[_ctx.name]))
|
|
3405
3447
|
}, {
|
|
3406
3448
|
default: withCtx(() => [
|
|
3407
|
-
createVNode(_sfc_main$
|
|
3449
|
+
createVNode(_sfc_main$Z, {
|
|
3408
3450
|
icon: !notEditable.value ? unref(Edit) : unref(View)
|
|
3409
3451
|
}, null, 8, ["icon"])
|
|
3410
3452
|
]),
|
|
3411
3453
|
_: 1
|
|
3412
3454
|
}, 8, ["size"])) : createCommentVNode("", true)
|
|
3413
3455
|
]),
|
|
3414
|
-
paramsConfig.value.length ? (openBlock(), createBlock(_sfc_main$
|
|
3456
|
+
paramsConfig.value.length ? (openBlock(), createBlock(_sfc_main$U, {
|
|
3415
3457
|
name: "params",
|
|
3416
3458
|
key: _ctx.model[_ctx.name],
|
|
3417
3459
|
model: _ctx.model,
|
|
@@ -3424,7 +3466,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
3424
3466
|
}
|
|
3425
3467
|
});
|
|
3426
3468
|
|
|
3427
|
-
const _sfc_main$
|
|
3469
|
+
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
3428
3470
|
...{
|
|
3429
3471
|
name: "MFieldsCondOpSelect"
|
|
3430
3472
|
},
|
|
@@ -3510,7 +3552,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
3510
3552
|
}
|
|
3511
3553
|
});
|
|
3512
3554
|
|
|
3513
|
-
const _sfc_main$
|
|
3555
|
+
const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
3514
3556
|
__name: "FloatingBox",
|
|
3515
3557
|
props: /* @__PURE__ */ mergeModels({
|
|
3516
3558
|
position: { default: () => ({ left: 0, top: 0 }) },
|
|
@@ -3530,8 +3572,8 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
3530
3572
|
const height = useModel(__props, "height");
|
|
3531
3573
|
const visible = useModel(__props, "visible");
|
|
3532
3574
|
const props = __props;
|
|
3533
|
-
const target =
|
|
3534
|
-
const titleEl =
|
|
3575
|
+
const target = useTemplateRef("target");
|
|
3576
|
+
const titleEl = useTemplateRef("titleEl");
|
|
3535
3577
|
const zIndex = useZIndex();
|
|
3536
3578
|
const curZIndex = ref(0);
|
|
3537
3579
|
const titleHeight = ref(0);
|
|
@@ -3665,7 +3707,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
3665
3707
|
onClick: closeHandler
|
|
3666
3708
|
}, {
|
|
3667
3709
|
default: withCtx(() => [
|
|
3668
|
-
createVNode(_sfc_main$
|
|
3710
|
+
createVNode(_sfc_main$Z, { icon: unref(Close) }, null, 8, ["icon"])
|
|
3669
3711
|
]),
|
|
3670
3712
|
_: 1
|
|
3671
3713
|
})
|
|
@@ -3686,7 +3728,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
3686
3728
|
const useCodeBlockEdit = (codeBlockService) => {
|
|
3687
3729
|
const codeConfig = ref();
|
|
3688
3730
|
const codeId = ref();
|
|
3689
|
-
const codeBlockEditor =
|
|
3731
|
+
const codeBlockEditor = useTemplateRef("codeBlockEditor");
|
|
3690
3732
|
const createCodeBlock = async () => {
|
|
3691
3733
|
if (!codeBlockService) {
|
|
3692
3734
|
tMagicMessage.error("新增代码块失败");
|
|
@@ -3743,6 +3785,7 @@ const useCodeBlockEdit = (codeBlockService) => {
|
|
|
3743
3785
|
const state = reactive({
|
|
3744
3786
|
uiSelectMode: false,
|
|
3745
3787
|
showSrc: false,
|
|
3788
|
+
showStylePanel: true,
|
|
3746
3789
|
zoom: 1,
|
|
3747
3790
|
stageContainerRect: {
|
|
3748
3791
|
width: 0,
|
|
@@ -4105,7 +4148,7 @@ const useFilter = (nodeData, nodeStatusMap, filterNodeMethod) => {
|
|
|
4105
4148
|
|
|
4106
4149
|
const useGetSo = (target, emit) => {
|
|
4107
4150
|
let getso;
|
|
4108
|
-
const
|
|
4151
|
+
const isDragging = ref(false);
|
|
4109
4152
|
onMounted(() => {
|
|
4110
4153
|
if (!target.value) return;
|
|
4111
4154
|
getso = new Gesto(target.value, {
|
|
@@ -4115,17 +4158,17 @@ const useGetSo = (target, emit) => {
|
|
|
4115
4158
|
if (!target.value) return;
|
|
4116
4159
|
emit("change", e);
|
|
4117
4160
|
}).on("dragStart", () => {
|
|
4118
|
-
|
|
4161
|
+
isDragging.value = true;
|
|
4119
4162
|
}).on("dragEnd", () => {
|
|
4120
|
-
|
|
4163
|
+
isDragging.value = false;
|
|
4121
4164
|
});
|
|
4122
4165
|
});
|
|
4123
4166
|
onBeforeUnmount(() => {
|
|
4124
4167
|
getso?.unset();
|
|
4125
|
-
|
|
4168
|
+
isDragging.value = false;
|
|
4126
4169
|
});
|
|
4127
4170
|
return {
|
|
4128
|
-
|
|
4171
|
+
isDragging
|
|
4129
4172
|
};
|
|
4130
4173
|
};
|
|
4131
4174
|
|
|
@@ -4187,9 +4230,9 @@ const useNodeStatus$1 = (nodeData) => {
|
|
|
4187
4230
|
};
|
|
4188
4231
|
};
|
|
4189
4232
|
|
|
4190
|
-
const _hoisted_1$
|
|
4191
|
-
const _hoisted_2$
|
|
4192
|
-
const _sfc_main$
|
|
4233
|
+
const _hoisted_1$v = { class: "m-editor-data-source-fields" };
|
|
4234
|
+
const _hoisted_2$h = { class: "m-editor-data-source-fields-footer" };
|
|
4235
|
+
const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
4193
4236
|
...{
|
|
4194
4237
|
name: "MFieldsDataSourceFields"
|
|
4195
4238
|
},
|
|
@@ -4453,12 +4496,12 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
4453
4496
|
const parentFloating = inject("parentFloating", ref(null));
|
|
4454
4497
|
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
|
|
4455
4498
|
return (_ctx, _cache) => {
|
|
4456
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
4499
|
+
return openBlock(), createElementBlock("div", _hoisted_1$v, [
|
|
4457
4500
|
createVNode(unref(MagicTable), {
|
|
4458
4501
|
data: _ctx.model[_ctx.name],
|
|
4459
4502
|
columns: fieldColumns
|
|
4460
4503
|
}, null, 8, ["data"]),
|
|
4461
|
-
createElementVNode("div", _hoisted_2$
|
|
4504
|
+
createElementVNode("div", _hoisted_2$h, [
|
|
4462
4505
|
createVNode(unref(TMagicButton), {
|
|
4463
4506
|
size: "small",
|
|
4464
4507
|
disabled: _ctx.disabled,
|
|
@@ -4483,7 +4526,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
4483
4526
|
_: 1
|
|
4484
4527
|
}, 8, ["disabled"])
|
|
4485
4528
|
]),
|
|
4486
|
-
createVNode(_sfc_main$
|
|
4529
|
+
createVNode(_sfc_main$R, {
|
|
4487
4530
|
visible: addDialogVisible.value,
|
|
4488
4531
|
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => addDialogVisible.value = $event),
|
|
4489
4532
|
width: width.value,
|
|
@@ -4506,7 +4549,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
4506
4549
|
]),
|
|
4507
4550
|
_: 1
|
|
4508
4551
|
}, 8, ["visible", "width", "height", "title", "position"]),
|
|
4509
|
-
createVNode(_sfc_main$
|
|
4552
|
+
createVNode(_sfc_main$R, {
|
|
4510
4553
|
visible: addFromJsonDialogVisible.value,
|
|
4511
4554
|
"onUpdate:visible": _cache[5] || (_cache[5] = ($event) => addFromJsonDialogVisible.value = $event),
|
|
4512
4555
|
width: width.value,
|
|
@@ -4531,8 +4574,8 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
4531
4574
|
}
|
|
4532
4575
|
});
|
|
4533
4576
|
|
|
4534
|
-
const _hoisted_1$
|
|
4535
|
-
const _sfc_main$
|
|
4577
|
+
const _hoisted_1$u = { class: "m-editor-data-source-field-select" };
|
|
4578
|
+
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
4536
4579
|
__name: "FieldSelect",
|
|
4537
4580
|
props: /* @__PURE__ */ mergeModels({
|
|
4538
4581
|
value: {},
|
|
@@ -4613,7 +4656,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
4613
4656
|
eventBus?.emit("edit-data-source", removeDataSourceFieldPrefix(id));
|
|
4614
4657
|
};
|
|
4615
4658
|
return (_ctx, _cache) => {
|
|
4616
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
4659
|
+
return openBlock(), createElementBlock("div", _hoisted_1$u, [
|
|
4617
4660
|
_ctx.checkStrictly ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4618
4661
|
createVNode(unref(TMagicSelect), {
|
|
4619
4662
|
"model-value": selectDataSourceId.value,
|
|
@@ -4681,7 +4724,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
4681
4724
|
onClick: _cache[0] || (_cache[0] = ($event) => editHandler(selectDataSourceId.value))
|
|
4682
4725
|
}, {
|
|
4683
4726
|
default: withCtx(() => [
|
|
4684
|
-
createVNode(_sfc_main$
|
|
4727
|
+
createVNode(_sfc_main$Z, {
|
|
4685
4728
|
icon: !notEditable.value ? unref(Edit) : unref(View)
|
|
4686
4729
|
}, null, 8, ["icon"])
|
|
4687
4730
|
]),
|
|
@@ -4695,8 +4738,8 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
4695
4738
|
}
|
|
4696
4739
|
});
|
|
4697
4740
|
|
|
4698
|
-
const _hoisted_1$
|
|
4699
|
-
const _sfc_main$
|
|
4741
|
+
const _hoisted_1$t = { class: "m-fields-data-source-field-select" };
|
|
4742
|
+
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
4700
4743
|
...{
|
|
4701
4744
|
name: "MFieldsDataSourceFieldSelect"
|
|
4702
4745
|
},
|
|
@@ -4768,15 +4811,15 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
4768
4811
|
}
|
|
4769
4812
|
return value ?? props.config.value === "key";
|
|
4770
4813
|
});
|
|
4771
|
-
const onChangeHandler = (value) => {
|
|
4814
|
+
const onChangeHandler = (value, eventData) => {
|
|
4772
4815
|
if (!Array.isArray(value)) {
|
|
4773
|
-
emit("change", value);
|
|
4816
|
+
emit("change", value, eventData);
|
|
4774
4817
|
return;
|
|
4775
4818
|
}
|
|
4776
4819
|
const [dsId, ...keys] = value;
|
|
4777
4820
|
const dataSource = dataSources.value.find((ds) => ds.id === removeDataSourceFieldPrefix(dsId));
|
|
4778
4821
|
if (!dataSource) {
|
|
4779
|
-
emit("change", value);
|
|
4822
|
+
emit("change", value, eventData);
|
|
4780
4823
|
return;
|
|
4781
4824
|
}
|
|
4782
4825
|
let fields = dataSource.fields || [];
|
|
@@ -4790,15 +4833,15 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
4790
4833
|
dataSourceFieldType.push("any");
|
|
4791
4834
|
}
|
|
4792
4835
|
if (!keys.length || field?.type && (field.type === "any" || dataSourceFieldType.includes("any") || dataSourceFieldType.includes(field.type))) {
|
|
4793
|
-
emit("change", value);
|
|
4836
|
+
emit("change", value, eventData);
|
|
4794
4837
|
} else {
|
|
4795
4838
|
tMagicMessage.error(`请选择类型为${dataSourceFieldType.join("或")}的字段`);
|
|
4796
|
-
emit("change", [dsId]);
|
|
4839
|
+
emit("change", [dsId], eventData);
|
|
4797
4840
|
}
|
|
4798
4841
|
};
|
|
4799
4842
|
return (_ctx, _cache) => {
|
|
4800
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
4801
|
-
showDataSourceFieldSelect.value || !_ctx.config.fieldConfig ? (openBlock(), createBlock(_sfc_main$
|
|
4843
|
+
return openBlock(), createElementBlock("div", _hoisted_1$t, [
|
|
4844
|
+
showDataSourceFieldSelect.value || !_ctx.config.fieldConfig ? (openBlock(), createBlock(_sfc_main$P, {
|
|
4802
4845
|
key: 0,
|
|
4803
4846
|
"model-value": _ctx.model[_ctx.name],
|
|
4804
4847
|
disabled: _ctx.disabled,
|
|
@@ -4833,7 +4876,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
4833
4876
|
onClick: _cache[0] || (_cache[0] = ($event) => showDataSourceFieldSelect.value = !showDataSourceFieldSelect.value)
|
|
4834
4877
|
}, {
|
|
4835
4878
|
default: withCtx(() => [
|
|
4836
|
-
createVNode(_sfc_main$
|
|
4879
|
+
createVNode(_sfc_main$Z, { icon: unref(Coin) }, null, 8, ["icon"])
|
|
4837
4880
|
]),
|
|
4838
4881
|
_: 1
|
|
4839
4882
|
}, 8, ["type", "size"])
|
|
@@ -4845,10 +4888,10 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
4845
4888
|
}
|
|
4846
4889
|
});
|
|
4847
4890
|
|
|
4848
|
-
const _hoisted_1$
|
|
4849
|
-
const _hoisted_2$
|
|
4891
|
+
const _hoisted_1$s = { style: { "display": "flex", "flex-direction": "column", "line-height": "1.2em" } };
|
|
4892
|
+
const _hoisted_2$g = { style: { "font-size": "10px", "color": "rgba(0, 0, 0, 0.6)" } };
|
|
4850
4893
|
const _hoisted_3$4 = { class: "el-input__inner t-input__inner" };
|
|
4851
|
-
const _sfc_main$
|
|
4894
|
+
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
4852
4895
|
...{
|
|
4853
4896
|
name: "MFieldsDataSourceInput"
|
|
4854
4897
|
},
|
|
@@ -4869,7 +4912,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
4869
4912
|
const props = __props;
|
|
4870
4913
|
const emit = __emit;
|
|
4871
4914
|
const { dataSourceService } = inject("services") || {};
|
|
4872
|
-
const autocomplete =
|
|
4915
|
+
const autocomplete = useTemplateRef("autocomplete");
|
|
4873
4916
|
const isFocused = ref(false);
|
|
4874
4917
|
const state = ref("");
|
|
4875
4918
|
const displayState = ref([]);
|
|
@@ -5048,12 +5091,12 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
5048
5091
|
}
|
|
5049
5092
|
), {
|
|
5050
5093
|
suffix: withCtx(() => [
|
|
5051
|
-
createVNode(_sfc_main$
|
|
5094
|
+
createVNode(_sfc_main$Z, { icon: unref(Coin) }, null, 8, ["icon"])
|
|
5052
5095
|
]),
|
|
5053
5096
|
default: withCtx(({ item }) => [
|
|
5054
|
-
createElementVNode("div", _hoisted_1$
|
|
5097
|
+
createElementVNode("div", _hoisted_1$s, [
|
|
5055
5098
|
createElementVNode("div", null, toDisplayString(item.text), 1),
|
|
5056
|
-
createElementVNode("span", _hoisted_2$
|
|
5099
|
+
createElementVNode("span", _hoisted_2$g, toDisplayString(item.value), 1)
|
|
5057
5100
|
])
|
|
5058
5101
|
]),
|
|
5059
5102
|
_: 1
|
|
@@ -5083,7 +5126,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
5083
5126
|
}, 1032, ["size"])) : createCommentVNode("", true)
|
|
5084
5127
|
], 64);
|
|
5085
5128
|
}), 256)),
|
|
5086
|
-
createVNode(_sfc_main$
|
|
5129
|
+
createVNode(_sfc_main$Z, {
|
|
5087
5130
|
class: "tmagic-data-source-input-icon",
|
|
5088
5131
|
icon: unref(Coin)
|
|
5089
5132
|
}, null, 8, ["icon"])
|
|
@@ -5094,11 +5137,11 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
5094
5137
|
}
|
|
5095
5138
|
});
|
|
5096
5139
|
|
|
5097
|
-
const _hoisted_1$
|
|
5098
|
-
const _hoisted_2$
|
|
5140
|
+
const _hoisted_1$r = { style: { "display": "flex", "margin-bottom": "10px" } };
|
|
5141
|
+
const _hoisted_2$f = { style: { "flex": "1" } };
|
|
5099
5142
|
const _hoisted_3$3 = { style: { "flex": "1" } };
|
|
5100
5143
|
const _hoisted_4$3 = { class: "dialog-footer" };
|
|
5101
|
-
const _sfc_main$
|
|
5144
|
+
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
5102
5145
|
...{
|
|
5103
5146
|
name: "MEditorCodeBlockEditor"
|
|
5104
5147
|
},
|
|
@@ -5124,7 +5167,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
5124
5167
|
const { height: codeBlockEditorHeight } = useEditorContentHeight();
|
|
5125
5168
|
const difVisible = ref(false);
|
|
5126
5169
|
const { rect: windowRect } = useWindowRect();
|
|
5127
|
-
const magicVsEditor =
|
|
5170
|
+
const magicVsEditor = useTemplateRef("magicVsEditor");
|
|
5128
5171
|
const diffChange = () => {
|
|
5129
5172
|
if (!magicVsEditor.value || !formBox.value?.form) {
|
|
5130
5173
|
return;
|
|
@@ -5233,7 +5276,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
5233
5276
|
const errorHandler = (error) => {
|
|
5234
5277
|
tMagicMessage.error(error.message);
|
|
5235
5278
|
};
|
|
5236
|
-
const formBox =
|
|
5279
|
+
const formBox = useTemplateRef("formBox");
|
|
5237
5280
|
const changedValue = ref();
|
|
5238
5281
|
const changeHandler = (values) => {
|
|
5239
5282
|
changedValue.value = values;
|
|
@@ -5271,7 +5314,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
5271
5314
|
});
|
|
5272
5315
|
return (_ctx, _cache) => {
|
|
5273
5316
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
5274
|
-
createVNode(_sfc_main$
|
|
5317
|
+
createVNode(_sfc_main$R, {
|
|
5275
5318
|
visible: boxVisible.value,
|
|
5276
5319
|
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => boxVisible.value = $event),
|
|
5277
5320
|
width: width.value,
|
|
@@ -5348,8 +5391,8 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
5348
5391
|
])
|
|
5349
5392
|
]),
|
|
5350
5393
|
default: withCtx(() => [
|
|
5351
|
-
createElementVNode("div", _hoisted_1$
|
|
5352
|
-
createElementVNode("div", _hoisted_2$
|
|
5394
|
+
createElementVNode("div", _hoisted_1$r, [
|
|
5395
|
+
createElementVNode("div", _hoisted_2$f, [
|
|
5353
5396
|
createVNode(unref(TMagicTag), {
|
|
5354
5397
|
size: "small",
|
|
5355
5398
|
type: "info"
|
|
@@ -5372,14 +5415,14 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
5372
5415
|
})
|
|
5373
5416
|
])
|
|
5374
5417
|
]),
|
|
5375
|
-
difVisible.value ? (openBlock(), createBlock(_sfc_main$
|
|
5418
|
+
difVisible.value ? (openBlock(), createBlock(_sfc_main$Y, {
|
|
5376
5419
|
key: 0,
|
|
5377
5420
|
ref_key: "magicVsEditor",
|
|
5378
5421
|
ref: magicVsEditor,
|
|
5379
5422
|
type: "diff",
|
|
5380
5423
|
language: "json",
|
|
5381
5424
|
initValues: _ctx.content.content,
|
|
5382
|
-
modifiedValues: formBox
|
|
5425
|
+
modifiedValues: unref(formBox)?.form?.values.content,
|
|
5383
5426
|
style: normalizeStyle(`height: ${unref(windowRect).height - 150}px`)
|
|
5384
5427
|
}, null, 8, ["initValues", "modifiedValues", "style"])) : createCommentVNode("", true)
|
|
5385
5428
|
]),
|
|
@@ -5391,9 +5434,9 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
5391
5434
|
}
|
|
5392
5435
|
});
|
|
5393
5436
|
|
|
5394
|
-
const _hoisted_1$
|
|
5395
|
-
const _hoisted_2$
|
|
5396
|
-
const _sfc_main$
|
|
5437
|
+
const _hoisted_1$q = { class: "m-editor-data-source-methods" };
|
|
5438
|
+
const _hoisted_2$e = { class: "m-editor-data-source-methods-footer" };
|
|
5439
|
+
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
5397
5440
|
...{
|
|
5398
5441
|
name: "MFieldsDataSourceMethods"
|
|
5399
5442
|
},
|
|
@@ -5414,7 +5457,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
5414
5457
|
const props = __props;
|
|
5415
5458
|
const emit = __emit;
|
|
5416
5459
|
const codeConfig = ref();
|
|
5417
|
-
const codeBlockEditor =
|
|
5460
|
+
const codeBlockEditor = useTemplateRef("codeBlockEditor");
|
|
5418
5461
|
let editIndex = -1;
|
|
5419
5462
|
const methodColumns = [
|
|
5420
5463
|
{
|
|
@@ -5514,12 +5557,12 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
5514
5557
|
codeBlockEditor.value?.hide();
|
|
5515
5558
|
};
|
|
5516
5559
|
return (_ctx, _cache) => {
|
|
5517
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
5560
|
+
return openBlock(), createElementBlock("div", _hoisted_1$q, [
|
|
5518
5561
|
createVNode(unref(MagicTable), {
|
|
5519
5562
|
data: _ctx.model[_ctx.name],
|
|
5520
5563
|
columns: methodColumns
|
|
5521
5564
|
}, null, 8, ["data"]),
|
|
5522
|
-
createElementVNode("div", _hoisted_2$
|
|
5565
|
+
createElementVNode("div", _hoisted_2$e, [
|
|
5523
5566
|
createVNode(unref(TMagicButton), {
|
|
5524
5567
|
size: "small",
|
|
5525
5568
|
type: "primary",
|
|
@@ -5533,7 +5576,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
5533
5576
|
_: 1
|
|
5534
5577
|
}, 8, ["disabled"])
|
|
5535
5578
|
]),
|
|
5536
|
-
codeConfig.value ? (openBlock(), createBlock(_sfc_main$
|
|
5579
|
+
codeConfig.value ? (openBlock(), createBlock(_sfc_main$M, {
|
|
5537
5580
|
key: 0,
|
|
5538
5581
|
ref_key: "codeBlockEditor",
|
|
5539
5582
|
ref: codeBlockEditor,
|
|
@@ -5548,9 +5591,9 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
5548
5591
|
}
|
|
5549
5592
|
});
|
|
5550
5593
|
|
|
5551
|
-
const _hoisted_1$
|
|
5552
|
-
const _hoisted_2$
|
|
5553
|
-
const _sfc_main$
|
|
5594
|
+
const _hoisted_1$p = { class: "m-fields-data-source-method-select" };
|
|
5595
|
+
const _hoisted_2$d = { class: "data-source-method-select-container" };
|
|
5596
|
+
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
5554
5597
|
...{
|
|
5555
5598
|
name: "MFieldsDataSourceMethodSelect"
|
|
5556
5599
|
},
|
|
@@ -5636,8 +5679,8 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
5636
5679
|
eventBus?.emit("edit-data-source", id);
|
|
5637
5680
|
};
|
|
5638
5681
|
return (_ctx, _cache) => {
|
|
5639
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
5640
|
-
createElementVNode("div", _hoisted_2$
|
|
5682
|
+
return openBlock(), createElementBlock("div", _hoisted_1$p, [
|
|
5683
|
+
createElementVNode("div", _hoisted_2$d, [
|
|
5641
5684
|
createVNode(unref(MContainer), {
|
|
5642
5685
|
class: "select",
|
|
5643
5686
|
config: cascaderConfig.value,
|
|
@@ -5656,7 +5699,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
5656
5699
|
onClick: editCodeHandler
|
|
5657
5700
|
}, {
|
|
5658
5701
|
default: withCtx(() => [
|
|
5659
|
-
createVNode(_sfc_main$
|
|
5702
|
+
createVNode(_sfc_main$Z, {
|
|
5660
5703
|
icon: !notEditable.value ? unref(Edit) : unref(View)
|
|
5661
5704
|
}, null, 8, ["icon"])
|
|
5662
5705
|
]),
|
|
@@ -5666,7 +5709,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
5666
5709
|
_: 1
|
|
5667
5710
|
}, 8, ["content"])) : createCommentVNode("", true)
|
|
5668
5711
|
]),
|
|
5669
|
-
paramsConfig.value.length ? (openBlock(), createBlock(_sfc_main$
|
|
5712
|
+
paramsConfig.value.length ? (openBlock(), createBlock(_sfc_main$U, {
|
|
5670
5713
|
key: 0,
|
|
5671
5714
|
name: "params",
|
|
5672
5715
|
model: _ctx.model,
|
|
@@ -5680,9 +5723,9 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
5680
5723
|
}
|
|
5681
5724
|
});
|
|
5682
5725
|
|
|
5683
|
-
const _hoisted_1$
|
|
5684
|
-
const _hoisted_2$
|
|
5685
|
-
const _sfc_main$
|
|
5726
|
+
const _hoisted_1$o = { class: "m-editor-data-source-fields" };
|
|
5727
|
+
const _hoisted_2$c = { class: "m-editor-data-source-fields-footer" };
|
|
5728
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
5686
5729
|
...{
|
|
5687
5730
|
name: "MFieldsDataSourceMocks"
|
|
5688
5731
|
},
|
|
@@ -5771,7 +5814,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
5771
5814
|
const columns = [
|
|
5772
5815
|
{
|
|
5773
5816
|
type: "expand",
|
|
5774
|
-
component: _sfc_main$
|
|
5817
|
+
component: _sfc_main$Y,
|
|
5775
5818
|
props: (row) => ({
|
|
5776
5819
|
initValues: row.data,
|
|
5777
5820
|
language: "json",
|
|
@@ -5886,12 +5929,12 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
5886
5929
|
const parentFloating = inject("parentFloating", ref(null));
|
|
5887
5930
|
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
|
|
5888
5931
|
return (_ctx, _cache) => {
|
|
5889
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
5932
|
+
return openBlock(), createElementBlock("div", _hoisted_1$o, [
|
|
5890
5933
|
createVNode(unref(MagicTable), {
|
|
5891
5934
|
data: _ctx.model[_ctx.name],
|
|
5892
5935
|
columns
|
|
5893
5936
|
}, null, 8, ["data"]),
|
|
5894
|
-
createElementVNode("div", _hoisted_2$
|
|
5937
|
+
createElementVNode("div", _hoisted_2$c, [
|
|
5895
5938
|
createVNode(unref(TMagicButton), {
|
|
5896
5939
|
size: "small",
|
|
5897
5940
|
type: "primary",
|
|
@@ -5905,7 +5948,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
5905
5948
|
_: 1
|
|
5906
5949
|
}, 8, ["disabled"])
|
|
5907
5950
|
]),
|
|
5908
|
-
createVNode(_sfc_main$
|
|
5951
|
+
createVNode(_sfc_main$R, {
|
|
5909
5952
|
visible: addDialogVisible.value,
|
|
5910
5953
|
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => addDialogVisible.value = $event),
|
|
5911
5954
|
width: width.value,
|
|
@@ -5917,7 +5960,6 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
5917
5960
|
}, {
|
|
5918
5961
|
body: withCtx(() => [
|
|
5919
5962
|
createVNode(unref(MFormBox), {
|
|
5920
|
-
ref: "addDialog",
|
|
5921
5963
|
"label-width": "120px",
|
|
5922
5964
|
config: formConfig,
|
|
5923
5965
|
values: formValues.value,
|
|
@@ -5933,8 +5975,8 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
5933
5975
|
}
|
|
5934
5976
|
});
|
|
5935
5977
|
|
|
5936
|
-
const _hoisted_1$
|
|
5937
|
-
const _sfc_main$
|
|
5978
|
+
const _hoisted_1$n = { class: "m-fields-data-source-select" };
|
|
5979
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
5938
5980
|
...{
|
|
5939
5981
|
name: "MFieldsDataSourceSelect"
|
|
5940
5982
|
},
|
|
@@ -5991,7 +6033,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
5991
6033
|
eventBus?.emit("edit-data-source", id);
|
|
5992
6034
|
};
|
|
5993
6035
|
return (_ctx, _cache) => {
|
|
5994
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
6036
|
+
return openBlock(), createElementBlock("div", _hoisted_1$n, [
|
|
5995
6037
|
createVNode(unref(MSelect), {
|
|
5996
6038
|
model: _ctx.model,
|
|
5997
6039
|
name: _ctx.name,
|
|
@@ -6013,7 +6055,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
6013
6055
|
onClick: editHandler
|
|
6014
6056
|
}, {
|
|
6015
6057
|
default: withCtx(() => [
|
|
6016
|
-
createVNode(_sfc_main$
|
|
6058
|
+
createVNode(_sfc_main$Z, {
|
|
6017
6059
|
icon: !notEditable.value ? unref(Edit) : unref(View)
|
|
6018
6060
|
}, null, 8, ["icon"])
|
|
6019
6061
|
]),
|
|
@@ -6027,7 +6069,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
6027
6069
|
}
|
|
6028
6070
|
});
|
|
6029
6071
|
|
|
6030
|
-
const _sfc_main$
|
|
6072
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
6031
6073
|
...{
|
|
6032
6074
|
name: "m-fields-display-conds"
|
|
6033
6075
|
},
|
|
@@ -6158,12 +6200,12 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
6158
6200
|
}
|
|
6159
6201
|
});
|
|
6160
6202
|
|
|
6161
|
-
const _hoisted_1$
|
|
6162
|
-
const _hoisted_2$
|
|
6203
|
+
const _hoisted_1$m = { class: "m-fields-event-select" };
|
|
6204
|
+
const _hoisted_2$b = {
|
|
6163
6205
|
key: 1,
|
|
6164
6206
|
class: "fullWidth"
|
|
6165
6207
|
};
|
|
6166
|
-
const _sfc_main$
|
|
6208
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
6167
6209
|
...{
|
|
6168
6210
|
name: "MFieldsEventSelect"
|
|
6169
6211
|
},
|
|
@@ -6439,17 +6481,16 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
6439
6481
|
const onChangeHandler = (v, eventData) => emit("change", props.model[props.name], eventData);
|
|
6440
6482
|
return (_ctx, _cache) => {
|
|
6441
6483
|
const _component_m_form_table = resolveComponent("m-form-table");
|
|
6442
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
6484
|
+
return openBlock(), createElementBlock("div", _hoisted_1$m, [
|
|
6443
6485
|
isOldVersion.value ? (openBlock(), createBlock(_component_m_form_table, {
|
|
6444
6486
|
key: 0,
|
|
6445
|
-
ref: "eventForm",
|
|
6446
6487
|
name: "events",
|
|
6447
6488
|
size: _ctx.size,
|
|
6448
6489
|
disabled: _ctx.disabled,
|
|
6449
6490
|
model: _ctx.model,
|
|
6450
6491
|
config: tableConfig.value,
|
|
6451
6492
|
onChange: onChangeHandler
|
|
6452
|
-
}, null, 8, ["size", "disabled", "model", "config"])) : (openBlock(), createElementBlock("div", _hoisted_2$
|
|
6493
|
+
}, null, 8, ["size", "disabled", "model", "config"])) : (openBlock(), createElementBlock("div", _hoisted_2$b, [
|
|
6453
6494
|
createVNode(unref(TMagicButton), {
|
|
6454
6495
|
class: "create-button",
|
|
6455
6496
|
type: "primary",
|
|
@@ -6501,29 +6542,29 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
6501
6542
|
}
|
|
6502
6543
|
});
|
|
6503
6544
|
|
|
6504
|
-
const _hoisted_1$
|
|
6545
|
+
const _hoisted_1$l = {
|
|
6505
6546
|
viewBox: "0 0 32 32",
|
|
6506
6547
|
version: "1.1",
|
|
6507
6548
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6508
6549
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
6509
6550
|
};
|
|
6510
|
-
const _sfc_main$
|
|
6551
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
6511
6552
|
...{
|
|
6512
6553
|
name: "MEditorCodeIcon"
|
|
6513
6554
|
},
|
|
6514
6555
|
__name: "CodeIcon",
|
|
6515
6556
|
setup(__props) {
|
|
6516
6557
|
return (_ctx, _cache) => {
|
|
6517
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
6558
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$l, _cache[0] || (_cache[0] = [
|
|
6518
6559
|
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)
|
|
6519
6560
|
]));
|
|
6520
6561
|
};
|
|
6521
6562
|
}
|
|
6522
6563
|
});
|
|
6523
6564
|
|
|
6524
|
-
const _hoisted_1$
|
|
6525
|
-
const _hoisted_2$
|
|
6526
|
-
const _sfc_main$
|
|
6565
|
+
const _hoisted_1$k = { class: "m-fields-key-value" };
|
|
6566
|
+
const _hoisted_2$a = { key: 0 };
|
|
6567
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
6527
6568
|
...{
|
|
6528
6569
|
name: "MFieldsKeyValue"
|
|
6529
6570
|
},
|
|
@@ -6585,8 +6626,8 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
6585
6626
|
emit("change", v);
|
|
6586
6627
|
};
|
|
6587
6628
|
return (_ctx, _cache) => {
|
|
6588
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
6589
|
-
!showCode.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
6629
|
+
return openBlock(), createElementBlock("div", _hoisted_1$k, [
|
|
6630
|
+
!showCode.value ? (openBlock(), createElementBlock("div", _hoisted_2$a, [
|
|
6590
6631
|
(openBlock(true), createElementBlock(Fragment, null, renderList(records.value, (item, index) => {
|
|
6591
6632
|
return openBlock(), createElementBlock("div", {
|
|
6592
6633
|
class: "m-fields-key-value-item",
|
|
@@ -6600,7 +6641,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
6600
6641
|
size: _ctx.size,
|
|
6601
6642
|
onChange: keyChangeHandler
|
|
6602
6643
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "size"]),
|
|
6603
|
-
_cache[1] || (_cache[1] = createElementVNode("span", { class: "m-
|
|
6644
|
+
_cache[1] || (_cache[1] = createElementVNode("span", { class: "m-fields-key-value-delimiter" }, ":", -1)),
|
|
6604
6645
|
createVNode(unref(TMagicInput), {
|
|
6605
6646
|
placeholder: "value",
|
|
6606
6647
|
modelValue: records.value[index][1],
|
|
@@ -6610,7 +6651,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
6610
6651
|
onChange: valueChangeHandler
|
|
6611
6652
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "size"]),
|
|
6612
6653
|
createVNode(unref(TMagicButton), {
|
|
6613
|
-
class: "m-
|
|
6654
|
+
class: "m-fields-key-value-delete",
|
|
6614
6655
|
type: "danger",
|
|
6615
6656
|
size: _ctx.size,
|
|
6616
6657
|
disabled: _ctx.disabled,
|
|
@@ -6635,7 +6676,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
6635
6676
|
_: 1
|
|
6636
6677
|
}, 8, ["size", "disabled", "icon"])
|
|
6637
6678
|
])) : createCommentVNode("", true),
|
|
6638
|
-
_ctx.config.advanced && showCode.value ? (openBlock(), createBlock(_sfc_main$
|
|
6679
|
+
_ctx.config.advanced && showCode.value ? (openBlock(), createBlock(_sfc_main$Y, {
|
|
6639
6680
|
key: 1,
|
|
6640
6681
|
height: "200px",
|
|
6641
6682
|
"init-values": _ctx.model[_ctx.name],
|
|
@@ -6651,7 +6692,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
6651
6692
|
size: "default",
|
|
6652
6693
|
disabled: _ctx.disabled,
|
|
6653
6694
|
link: "",
|
|
6654
|
-
icon: _sfc_main$
|
|
6695
|
+
icon: _sfc_main$F,
|
|
6655
6696
|
onClick: _cache[0] || (_cache[0] = ($event) => showCode.value = !showCode.value)
|
|
6656
6697
|
}, null, 8, ["disabled"])) : createCommentVNode("", true)
|
|
6657
6698
|
]);
|
|
@@ -6659,9 +6700,9 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
6659
6700
|
}
|
|
6660
6701
|
});
|
|
6661
6702
|
|
|
6662
|
-
const _hoisted_1$
|
|
6663
|
-
const _hoisted_2$
|
|
6664
|
-
const _sfc_main$
|
|
6703
|
+
const _hoisted_1$j = { class: "m-fields-page-fragment-select" };
|
|
6704
|
+
const _hoisted_2$9 = { class: "page-fragment-select-container" };
|
|
6705
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
6665
6706
|
...{
|
|
6666
6707
|
name: "MFieldsPageFragmentSelect"
|
|
6667
6708
|
},
|
|
@@ -6707,8 +6748,8 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
6707
6748
|
};
|
|
6708
6749
|
return (_ctx, _cache) => {
|
|
6709
6750
|
const _component_m_form_container = resolveComponent("m-form-container");
|
|
6710
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
6711
|
-
createElementVNode("div", _hoisted_2$
|
|
6751
|
+
return openBlock(), createElementBlock("div", _hoisted_1$j, [
|
|
6752
|
+
createElementVNode("div", _hoisted_2$9, [
|
|
6712
6753
|
createVNode(_component_m_form_container, {
|
|
6713
6754
|
class: "select",
|
|
6714
6755
|
config: selectConfig,
|
|
@@ -6716,7 +6757,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
6716
6757
|
size: _ctx.size,
|
|
6717
6758
|
onChange: changeHandler
|
|
6718
6759
|
}, null, 8, ["model", "size"]),
|
|
6719
|
-
_ctx.model[_ctx.name] ? (openBlock(), createBlock(_sfc_main$
|
|
6760
|
+
_ctx.model[_ctx.name] ? (openBlock(), createBlock(_sfc_main$Z, {
|
|
6720
6761
|
key: 0,
|
|
6721
6762
|
class: "icon",
|
|
6722
6763
|
icon: unref(Edit),
|
|
@@ -6728,12 +6769,12 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
6728
6769
|
}
|
|
6729
6770
|
});
|
|
6730
6771
|
|
|
6731
|
-
const _hoisted_1$
|
|
6772
|
+
const _hoisted_1$i = {
|
|
6732
6773
|
key: 1,
|
|
6733
6774
|
class: "m-fields-ui-select",
|
|
6734
6775
|
style: { "display": "flex" }
|
|
6735
6776
|
};
|
|
6736
|
-
const _sfc_main$
|
|
6777
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
6737
6778
|
...{
|
|
6738
6779
|
name: "MFieldsUISelect"
|
|
6739
6780
|
},
|
|
@@ -6831,7 +6872,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
6831
6872
|
])),
|
|
6832
6873
|
_: 1
|
|
6833
6874
|
}, 8, ["icon", "disabled", "size"])
|
|
6834
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_1$
|
|
6875
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_1$i, [
|
|
6835
6876
|
val.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
6836
6877
|
createVNode(unref(TMagicTooltip), {
|
|
6837
6878
|
content: "清除",
|
|
@@ -6898,7 +6939,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
6898
6939
|
}
|
|
6899
6940
|
});
|
|
6900
6941
|
|
|
6901
|
-
const _sfc_main$
|
|
6942
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
6902
6943
|
...{
|
|
6903
6944
|
name: "MEditorResizer"
|
|
6904
6945
|
},
|
|
@@ -6906,13 +6947,13 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
6906
6947
|
emits: ["change"],
|
|
6907
6948
|
setup(__props, { emit: __emit }) {
|
|
6908
6949
|
const emit = __emit;
|
|
6909
|
-
const target =
|
|
6910
|
-
const {
|
|
6950
|
+
const target = useTemplateRef("target");
|
|
6951
|
+
const { isDragging } = useGetSo(target, emit);
|
|
6911
6952
|
return (_ctx, _cache) => {
|
|
6912
6953
|
return openBlock(), createElementBlock("span", {
|
|
6913
6954
|
ref_key: "target",
|
|
6914
6955
|
ref: target,
|
|
6915
|
-
class: normalizeClass(["m-editor-resizer", { "m-editor-resizer-
|
|
6956
|
+
class: normalizeClass(["m-editor-resizer", { "m-editor-resizer-dragging": unref(isDragging) }])
|
|
6916
6957
|
}, [
|
|
6917
6958
|
renderSlot(_ctx.$slots, "default")
|
|
6918
6959
|
], 2);
|
|
@@ -6920,7 +6961,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
6920
6961
|
}
|
|
6921
6962
|
});
|
|
6922
6963
|
|
|
6923
|
-
const _sfc_main$
|
|
6964
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
6924
6965
|
...{
|
|
6925
6966
|
name: "MEditorSplitView"
|
|
6926
6967
|
},
|
|
@@ -6940,7 +6981,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
6940
6981
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
6941
6982
|
const emit = __emit;
|
|
6942
6983
|
const props = __props;
|
|
6943
|
-
const el =
|
|
6984
|
+
const el = useTemplateRef("el");
|
|
6944
6985
|
const hasLeft = computed(() => typeof props.left !== "undefined");
|
|
6945
6986
|
const hasRight = computed(() => typeof props.right !== "undefined");
|
|
6946
6987
|
const center = ref(0);
|
|
@@ -7058,7 +7099,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
7058
7099
|
}, [
|
|
7059
7100
|
renderSlot(_ctx.$slots, "left")
|
|
7060
7101
|
], 6),
|
|
7061
|
-
createVNode(_sfc_main$
|
|
7102
|
+
createVNode(_sfc_main$B, { onChange: changeLeft })
|
|
7062
7103
|
], 64)) : createCommentVNode("", true),
|
|
7063
7104
|
createElementVNode("div", {
|
|
7064
7105
|
class: normalizeClass(["m-editor-layout-center", _ctx.centerClass]),
|
|
@@ -7067,7 +7108,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
7067
7108
|
renderSlot(_ctx.$slots, "center")
|
|
7068
7109
|
], 6),
|
|
7069
7110
|
hasRight.value && _ctx.$slots.right ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
7070
|
-
createVNode(_sfc_main$
|
|
7111
|
+
createVNode(_sfc_main$B, { onChange: changeRight }),
|
|
7071
7112
|
createElementVNode("div", {
|
|
7072
7113
|
class: normalizeClass(["m-editor-layout-right", _ctx.rightClass]),
|
|
7073
7114
|
style: normalizeStyle(`width: ${_ctx.right}px`)
|
|
@@ -7080,12 +7121,12 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
7080
7121
|
}
|
|
7081
7122
|
});
|
|
7082
7123
|
|
|
7083
|
-
const _hoisted_1$
|
|
7124
|
+
const _hoisted_1$h = {
|
|
7084
7125
|
key: 1,
|
|
7085
7126
|
class: "menu-item-text"
|
|
7086
7127
|
};
|
|
7087
|
-
const _hoisted_2$
|
|
7088
|
-
const _sfc_main$
|
|
7128
|
+
const _hoisted_2$8 = { class: "el-dropdown-link menubar-menu-button" };
|
|
7129
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
7089
7130
|
...{
|
|
7090
7131
|
name: "MEditorToolButton"
|
|
7091
7132
|
},
|
|
@@ -7141,7 +7182,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
7141
7182
|
};
|
|
7142
7183
|
const mouseupHandler = (item, event) => {
|
|
7143
7184
|
if (props.eventType !== "mouseup") return;
|
|
7144
|
-
if (item.type === "button") {
|
|
7185
|
+
if (item.type === "button" && event.button === 0) {
|
|
7145
7186
|
buttonHandler(item, event);
|
|
7146
7187
|
}
|
|
7147
7188
|
};
|
|
@@ -7156,7 +7197,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
7156
7197
|
_ctx.data.type === "divider" ? (openBlock(), createBlock(unref(TMagicDivider), {
|
|
7157
7198
|
key: 0,
|
|
7158
7199
|
direction: _ctx.data.direction || "vertical"
|
|
7159
|
-
}, null, 8, ["direction"])) : _ctx.data.type === "text" ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
7200
|
+
}, null, 8, ["direction"])) : _ctx.data.type === "text" ? (openBlock(), createElementBlock("div", _hoisted_1$h, toDisplayString(_ctx.data.text), 1)) : _ctx.data.type === "button" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
7160
7201
|
_ctx.data.tooltip ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
7161
7202
|
key: 0,
|
|
7162
7203
|
effect: "dark",
|
|
@@ -7170,7 +7211,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
7170
7211
|
disabled: disabled.value
|
|
7171
7212
|
}, {
|
|
7172
7213
|
default: withCtx(() => [
|
|
7173
|
-
_ctx.data.icon ? (openBlock(), createBlock(_sfc_main$
|
|
7214
|
+
_ctx.data.icon ? (openBlock(), createBlock(_sfc_main$Z, {
|
|
7174
7215
|
key: 0,
|
|
7175
7216
|
icon: _ctx.data.icon
|
|
7176
7217
|
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
@@ -7188,7 +7229,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
7188
7229
|
title: _ctx.data.text
|
|
7189
7230
|
}, {
|
|
7190
7231
|
default: withCtx(() => [
|
|
7191
|
-
_ctx.data.icon ? (openBlock(), createBlock(_sfc_main$
|
|
7232
|
+
_ctx.data.icon ? (openBlock(), createBlock(_sfc_main$Z, {
|
|
7192
7233
|
key: 0,
|
|
7193
7234
|
icon: _ctx.data.icon
|
|
7194
7235
|
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
@@ -7221,7 +7262,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
7221
7262
|
})) : createCommentVNode("", true)
|
|
7222
7263
|
]),
|
|
7223
7264
|
default: withCtx(() => [
|
|
7224
|
-
createElementVNode("span", _hoisted_2$
|
|
7265
|
+
createElementVNode("span", _hoisted_2$8, [
|
|
7225
7266
|
createTextVNode(toDisplayString(_ctx.data.text), 1),
|
|
7226
7267
|
createVNode(unref(TMagicIcon), { class: "el-icon--right" }, {
|
|
7227
7268
|
default: withCtx(() => [
|
|
@@ -7238,16 +7279,16 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
7238
7279
|
}
|
|
7239
7280
|
});
|
|
7240
7281
|
|
|
7241
|
-
const _hoisted_1$
|
|
7282
|
+
const _hoisted_1$g = {
|
|
7242
7283
|
key: 0,
|
|
7243
7284
|
id: "m-editor-page-bar-add-icon",
|
|
7244
7285
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon"
|
|
7245
7286
|
};
|
|
7246
|
-
const _hoisted_2$
|
|
7287
|
+
const _hoisted_2$7 = {
|
|
7247
7288
|
key: 1,
|
|
7248
7289
|
style: { "width": "21px" }
|
|
7249
7290
|
};
|
|
7250
|
-
const _sfc_main$
|
|
7291
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
7251
7292
|
...{
|
|
7252
7293
|
name: "MEditorPageBarAddButton"
|
|
7253
7294
|
},
|
|
@@ -7269,13 +7310,13 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
7269
7310
|
editorService.add(pageConfig);
|
|
7270
7311
|
};
|
|
7271
7312
|
return (_ctx, _cache) => {
|
|
7272
|
-
return showAddPageButton.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
7313
|
+
return showAddPageButton.value ? (openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
7273
7314
|
createVNode(unref(TMagicPopover), { "popper-class": "data-source-list-panel-add-menu" }, {
|
|
7274
7315
|
reference: withCtx(() => [
|
|
7275
|
-
createVNode(_sfc_main$
|
|
7316
|
+
createVNode(_sfc_main$Z, { icon: unref(Plus) }, null, 8, ["icon"])
|
|
7276
7317
|
]),
|
|
7277
7318
|
default: withCtx(() => [
|
|
7278
|
-
createVNode(_sfc_main$
|
|
7319
|
+
createVNode(_sfc_main$z, {
|
|
7279
7320
|
data: {
|
|
7280
7321
|
type: "button",
|
|
7281
7322
|
text: "页面",
|
|
@@ -7284,7 +7325,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
7284
7325
|
}
|
|
7285
7326
|
}
|
|
7286
7327
|
}, null, 8, ["data"]),
|
|
7287
|
-
createVNode(_sfc_main$
|
|
7328
|
+
createVNode(_sfc_main$z, {
|
|
7288
7329
|
data: {
|
|
7289
7330
|
type: "button",
|
|
7290
7331
|
text: "页面片",
|
|
@@ -7296,12 +7337,12 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
7296
7337
|
]),
|
|
7297
7338
|
_: 1
|
|
7298
7339
|
})
|
|
7299
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_2$
|
|
7340
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_2$7));
|
|
7300
7341
|
};
|
|
7301
7342
|
}
|
|
7302
7343
|
});
|
|
7303
7344
|
|
|
7304
|
-
const _sfc_main$
|
|
7345
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
7305
7346
|
...{
|
|
7306
7347
|
name: "MEditorPageBarScrollContainer"
|
|
7307
7348
|
},
|
|
@@ -7315,7 +7356,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
7315
7356
|
const services = inject("services");
|
|
7316
7357
|
const editorService = services?.editorService;
|
|
7317
7358
|
const uiService = services?.uiService;
|
|
7318
|
-
const itemsContainer =
|
|
7359
|
+
const itemsContainer = useTemplateRef("itemsContainer");
|
|
7319
7360
|
const canScroll = ref(false);
|
|
7320
7361
|
const showAddPageButton = computed(() => uiService?.get("showAddPageButton"));
|
|
7321
7362
|
const showPageListButton = computed(() => uiService?.get("showPageListButton"));
|
|
@@ -7331,7 +7372,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
7331
7372
|
const resizeObserver = new ResizeObserver(() => {
|
|
7332
7373
|
setCanScroll();
|
|
7333
7374
|
});
|
|
7334
|
-
const pageBar =
|
|
7375
|
+
const pageBar = useTemplateRef("pageBar");
|
|
7335
7376
|
onMounted(() => {
|
|
7336
7377
|
pageBar.value && resizeObserver.observe(pageBar.value);
|
|
7337
7378
|
});
|
|
@@ -7440,26 +7481,26 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
7440
7481
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon m-editor-page-bar-item-left-icon",
|
|
7441
7482
|
onClick: _cache[0] || (_cache[0] = ($event) => scroll("left"))
|
|
7442
7483
|
}, [
|
|
7443
|
-
createVNode(_sfc_main$
|
|
7484
|
+
createVNode(_sfc_main$Z, { icon: unref(ArrowLeftBold) }, null, 8, ["icon"])
|
|
7444
7485
|
])) : createCommentVNode("", true),
|
|
7445
7486
|
canScroll.value ? (openBlock(), createElementBlock("div", {
|
|
7446
7487
|
key: 2,
|
|
7447
7488
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon m-editor-page-bar-item-right-icon",
|
|
7448
7489
|
onClick: _cache[1] || (_cache[1] = ($event) => scroll("right"))
|
|
7449
7490
|
}, [
|
|
7450
|
-
createVNode(_sfc_main$
|
|
7491
|
+
createVNode(_sfc_main$Z, { icon: unref(ArrowRightBold) }, null, 8, ["icon"])
|
|
7451
7492
|
])) : createCommentVNode("", true)
|
|
7452
7493
|
], 512);
|
|
7453
7494
|
};
|
|
7454
7495
|
}
|
|
7455
7496
|
});
|
|
7456
7497
|
|
|
7457
|
-
const _hoisted_1$
|
|
7498
|
+
const _hoisted_1$f = {
|
|
7458
7499
|
key: 0,
|
|
7459
7500
|
id: "m-editor-page-bar-list-icon",
|
|
7460
7501
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon"
|
|
7461
7502
|
};
|
|
7462
|
-
const _sfc_main$
|
|
7503
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
7463
7504
|
...{
|
|
7464
7505
|
name: "MEditorPageList"
|
|
7465
7506
|
},
|
|
@@ -7477,7 +7518,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
7477
7518
|
await editorService?.select(id);
|
|
7478
7519
|
};
|
|
7479
7520
|
return (_ctx, _cache) => {
|
|
7480
|
-
return showPageListButton.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
7521
|
+
return showPageListButton.value ? (openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
7481
7522
|
createVNode(unref(TMagicPopover), {
|
|
7482
7523
|
"popper-class": "page-bar-popover",
|
|
7483
7524
|
placement: "top",
|
|
@@ -7497,7 +7538,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
7497
7538
|
createElementVNode("div", null, [
|
|
7498
7539
|
renderSlot(_ctx.$slots, "page-list-popover", { list: _ctx.list }, () => [
|
|
7499
7540
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.list, (item, index) => {
|
|
7500
|
-
return openBlock(), createBlock(_sfc_main$
|
|
7541
|
+
return openBlock(), createBlock(_sfc_main$z, {
|
|
7501
7542
|
data: {
|
|
7502
7543
|
type: "button",
|
|
7503
7544
|
text: item.devconfig?.tabName || item.name || item.id,
|
|
@@ -7517,8 +7558,8 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
7517
7558
|
}
|
|
7518
7559
|
});
|
|
7519
7560
|
|
|
7520
|
-
const _hoisted_1$
|
|
7521
|
-
const _sfc_main$
|
|
7561
|
+
const _hoisted_1$e = { class: "m-editor-page-bar-item m-editor-page-bar-item-icon m-editor-page-bar-search" };
|
|
7562
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
7522
7563
|
__name: "Search",
|
|
7523
7564
|
props: {
|
|
7524
7565
|
"query": {},
|
|
@@ -7556,8 +7597,8 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
7556
7597
|
emit("search", values);
|
|
7557
7598
|
};
|
|
7558
7599
|
return (_ctx, _cache) => {
|
|
7559
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
7560
|
-
createVNode(_sfc_main$
|
|
7600
|
+
return openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
7601
|
+
createVNode(_sfc_main$Z, {
|
|
7561
7602
|
icon: unref(Search),
|
|
7562
7603
|
onClick: _cache[0] || (_cache[0] = ($event) => visible.value = !visible.value),
|
|
7563
7604
|
class: normalizeClass({ "icon-active": visible.value })
|
|
@@ -7581,11 +7622,11 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
7581
7622
|
}
|
|
7582
7623
|
});
|
|
7583
7624
|
|
|
7584
|
-
const _hoisted_1$
|
|
7585
|
-
const _hoisted_2$
|
|
7625
|
+
const _hoisted_1$d = { class: "m-editor-page-bar-tabs" };
|
|
7626
|
+
const _hoisted_2$6 = ["data-page-id", "onClick"];
|
|
7586
7627
|
const _hoisted_3$2 = { class: "m-editor-page-bar-title" };
|
|
7587
7628
|
const _hoisted_4$2 = ["title"];
|
|
7588
|
-
const _sfc_main$
|
|
7629
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
7589
7630
|
...{
|
|
7590
7631
|
name: "MEditorPageBar"
|
|
7591
7632
|
},
|
|
@@ -7633,8 +7674,8 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
7633
7674
|
const remove = (node) => {
|
|
7634
7675
|
editorService?.remove(node);
|
|
7635
7676
|
};
|
|
7636
|
-
const pageBarScrollContainer =
|
|
7637
|
-
const pageBarItems =
|
|
7677
|
+
const pageBarScrollContainer = useTemplateRef("pageBarScrollContainer");
|
|
7678
|
+
const pageBarItems = useTemplateRef("pageBarItems");
|
|
7638
7679
|
watch(page, (page2) => {
|
|
7639
7680
|
if (!page2 || !pageBarScrollContainer.value?.itemsContainerWidth || !pageBarItems.value || pageBarItems.value.length < 2) {
|
|
7640
7681
|
return;
|
|
@@ -7661,8 +7702,8 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
7661
7702
|
}
|
|
7662
7703
|
});
|
|
7663
7704
|
return (_ctx, _cache) => {
|
|
7664
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
7665
|
-
createVNode(_sfc_main$
|
|
7705
|
+
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
7706
|
+
createVNode(_sfc_main$x, {
|
|
7666
7707
|
ref_key: "pageBarScrollContainer",
|
|
7667
7708
|
ref: pageBarScrollContainer,
|
|
7668
7709
|
"page-bar-sort-options": _ctx.pageBarSortOptions,
|
|
@@ -7670,13 +7711,13 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
7670
7711
|
}, {
|
|
7671
7712
|
prepend: withCtx(() => [
|
|
7672
7713
|
renderSlot(_ctx.$slots, "page-bar-add-button", {}, () => [
|
|
7673
|
-
createVNode(_sfc_main$
|
|
7714
|
+
createVNode(_sfc_main$y)
|
|
7674
7715
|
]),
|
|
7675
|
-
createVNode(_sfc_main$
|
|
7716
|
+
createVNode(_sfc_main$v, {
|
|
7676
7717
|
query: query.value,
|
|
7677
7718
|
"onUpdate:query": _cache[0] || (_cache[0] = ($event) => query.value = $event)
|
|
7678
7719
|
}, null, 8, ["query"]),
|
|
7679
|
-
createVNode(_sfc_main$
|
|
7720
|
+
createVNode(_sfc_main$w, { list: list.value }, {
|
|
7680
7721
|
"page-list-popover": withCtx(({ list: list2 }) => [
|
|
7681
7722
|
renderSlot(_ctx.$slots, "page-list-popover", { list: list2 })
|
|
7682
7723
|
]),
|
|
@@ -7719,7 +7760,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
7719
7760
|
default: withCtx(() => [
|
|
7720
7761
|
createElementVNode("div", null, [
|
|
7721
7762
|
renderSlot(_ctx.$slots, "page-bar-popover", { page: item }, () => [
|
|
7722
|
-
createVNode(_sfc_main$
|
|
7763
|
+
createVNode(_sfc_main$z, {
|
|
7723
7764
|
data: {
|
|
7724
7765
|
type: "button",
|
|
7725
7766
|
text: "复制",
|
|
@@ -7727,7 +7768,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
7727
7768
|
handler: () => copy(item)
|
|
7728
7769
|
}
|
|
7729
7770
|
}, null, 8, ["data"]),
|
|
7730
|
-
createVNode(_sfc_main$
|
|
7771
|
+
createVNode(_sfc_main$z, {
|
|
7731
7772
|
data: {
|
|
7732
7773
|
type: "button",
|
|
7733
7774
|
text: "删除",
|
|
@@ -7740,7 +7781,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
7740
7781
|
]),
|
|
7741
7782
|
_: 2
|
|
7742
7783
|
}, 1024)
|
|
7743
|
-
], 10, _hoisted_2$
|
|
7784
|
+
], 10, _hoisted_2$6);
|
|
7744
7785
|
}), 128))
|
|
7745
7786
|
]),
|
|
7746
7787
|
_: 3
|
|
@@ -7750,9 +7791,9 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
7750
7791
|
}
|
|
7751
7792
|
});
|
|
7752
7793
|
|
|
7753
|
-
const _hoisted_1$
|
|
7754
|
-
const _hoisted_2$
|
|
7755
|
-
const _sfc_main$
|
|
7794
|
+
const _hoisted_1$c = { class: "m-editor-empty-panel" };
|
|
7795
|
+
const _hoisted_2$5 = { class: "m-editor-empty-content" };
|
|
7796
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
7756
7797
|
...{
|
|
7757
7798
|
name: "MEditorAddPageBox"
|
|
7758
7799
|
},
|
|
@@ -7774,14 +7815,14 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
7774
7815
|
});
|
|
7775
7816
|
};
|
|
7776
7817
|
return (_ctx, _cache) => {
|
|
7777
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
7778
|
-
createElementVNode("div", _hoisted_2$
|
|
7818
|
+
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
7819
|
+
createElementVNode("div", _hoisted_2$5, [
|
|
7779
7820
|
createElementVNode("div", {
|
|
7780
7821
|
class: "m-editor-empty-button",
|
|
7781
7822
|
onClick: _cache[0] || (_cache[0] = ($event) => clickHandler(unref(NodeType).PAGE))
|
|
7782
7823
|
}, [
|
|
7783
7824
|
createElementVNode("div", null, [
|
|
7784
|
-
createVNode(_sfc_main$
|
|
7825
|
+
createVNode(_sfc_main$Z, { icon: unref(Plus) }, null, 8, ["icon"])
|
|
7785
7826
|
]),
|
|
7786
7827
|
_cache[2] || (_cache[2] = createElementVNode("p", null, "新增页面", -1))
|
|
7787
7828
|
]),
|
|
@@ -7791,7 +7832,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
7791
7832
|
onClick: _cache[1] || (_cache[1] = ($event) => clickHandler(unref(NodeType).PAGE_FRAGMENT))
|
|
7792
7833
|
}, [
|
|
7793
7834
|
createElementVNode("div", null, [
|
|
7794
|
-
createVNode(_sfc_main$
|
|
7835
|
+
createVNode(_sfc_main$Z, { icon: unref(Plus) }, null, 8, ["icon"])
|
|
7795
7836
|
]),
|
|
7796
7837
|
_cache[3] || (_cache[3] = createElementVNode("p", null, "新增页面片", -1))
|
|
7797
7838
|
])) : createCommentVNode("", true)
|
|
@@ -7805,7 +7846,7 @@ const DEFAULT_LEFT_COLUMN_WIDTH = 310;
|
|
|
7805
7846
|
const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
|
|
7806
7847
|
const LEFT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorLeftColumnWidthData";
|
|
7807
7848
|
const RIGHT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorRightColumnWidthData";
|
|
7808
|
-
const _sfc_main$
|
|
7849
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
7809
7850
|
...{
|
|
7810
7851
|
name: "MEditorFramework"
|
|
7811
7852
|
},
|
|
@@ -7818,8 +7859,8 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
7818
7859
|
setup(__props) {
|
|
7819
7860
|
const codeOptions = inject("codeOptions", {});
|
|
7820
7861
|
const { editorService, uiService } = inject("services") || {};
|
|
7821
|
-
const content =
|
|
7822
|
-
const splitView =
|
|
7862
|
+
const content = useTemplateRef("content");
|
|
7863
|
+
const splitView = useTemplateRef("splitView");
|
|
7823
7864
|
const root = computed(() => editorService?.get("root"));
|
|
7824
7865
|
const page = computed(() => editorService?.get("page"));
|
|
7825
7866
|
const pageLength = computed(() => editorService?.get("pageLength") || 0);
|
|
@@ -7883,13 +7924,13 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
7883
7924
|
renderSlot(_ctx.$slots, "nav"),
|
|
7884
7925
|
renderSlot(_ctx.$slots, "content-before"),
|
|
7885
7926
|
showSrc.value ? renderSlot(_ctx.$slots, "src-code", { key: 0 }, () => [
|
|
7886
|
-
createVNode(_sfc_main$
|
|
7927
|
+
createVNode(_sfc_main$Y, {
|
|
7887
7928
|
class: "m-editor-content",
|
|
7888
7929
|
"init-values": root.value,
|
|
7889
7930
|
options: unref(codeOptions),
|
|
7890
7931
|
onSave: saveCode
|
|
7891
7932
|
}, null, 8, ["init-values", "options"])
|
|
7892
|
-
]) : (openBlock(), createBlock(_sfc_main$
|
|
7933
|
+
]) : (openBlock(), createBlock(_sfc_main$A, {
|
|
7893
7934
|
key: 1,
|
|
7894
7935
|
ref_key: "splitView",
|
|
7895
7936
|
ref: splitView,
|
|
@@ -7902,7 +7943,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
7902
7943
|
right: columnWidth.value.right,
|
|
7903
7944
|
"onUpdate:right": _cache[1] || (_cache[1] = ($event) => columnWidth.value.right = $event),
|
|
7904
7945
|
"min-left": 65,
|
|
7905
|
-
"min-right":
|
|
7946
|
+
"min-right": 420,
|
|
7906
7947
|
"min-center": 100,
|
|
7907
7948
|
width: frameworkRect.value?.width || 0,
|
|
7908
7949
|
onChange: columnWidthChange
|
|
@@ -7912,10 +7953,10 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
7912
7953
|
]),
|
|
7913
7954
|
center: withCtx(() => [
|
|
7914
7955
|
page.value ? renderSlot(_ctx.$slots, "workspace", { key: 0 }) : renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
|
|
7915
|
-
createVNode(_sfc_main$
|
|
7956
|
+
createVNode(_sfc_main$t, { "disabled-page-fragment": _ctx.disabledPageFragment }, null, 8, ["disabled-page-fragment"])
|
|
7916
7957
|
]),
|
|
7917
7958
|
renderSlot(_ctx.$slots, "page-bar", {}, () => [
|
|
7918
|
-
createVNode(_sfc_main$
|
|
7959
|
+
createVNode(_sfc_main$u, {
|
|
7919
7960
|
"disabled-page-fragment": _ctx.disabledPageFragment,
|
|
7920
7961
|
"page-bar-sort-options": _ctx.pageBarSortOptions,
|
|
7921
7962
|
"filter-function": _ctx.pageFilterFunction
|
|
@@ -7941,12 +7982,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
7941
7982
|
page.value ? {
|
|
7942
7983
|
name: "right",
|
|
7943
7984
|
fn: withCtx(() => [
|
|
7944
|
-
|
|
7945
|
-
default: withCtx(() => [
|
|
7946
|
-
renderSlot(_ctx.$slots, "props-panel")
|
|
7947
|
-
]),
|
|
7948
|
-
_: 3
|
|
7949
|
-
})
|
|
7985
|
+
renderSlot(_ctx.$slots, "props-panel")
|
|
7950
7986
|
]),
|
|
7951
7987
|
key: "0"
|
|
7952
7988
|
} : void 0
|
|
@@ -7958,7 +7994,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
7958
7994
|
}
|
|
7959
7995
|
});
|
|
7960
7996
|
|
|
7961
|
-
const _sfc_main$
|
|
7997
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
7962
7998
|
...{
|
|
7963
7999
|
name: "MEditorNavMenu"
|
|
7964
8000
|
},
|
|
@@ -8119,7 +8155,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
8119
8155
|
});
|
|
8120
8156
|
}
|
|
8121
8157
|
});
|
|
8122
|
-
const navMenu =
|
|
8158
|
+
const navMenu = useTemplateRef("navMenu");
|
|
8123
8159
|
onMounted(() => {
|
|
8124
8160
|
navMenu.value && resizeObserver.observe(navMenu.value);
|
|
8125
8161
|
});
|
|
@@ -8140,7 +8176,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
8140
8176
|
style: normalizeStyle(`width: ${columnWidth.value?.[key]}px`)
|
|
8141
8177
|
}, [
|
|
8142
8178
|
(openBlock(true), createElementBlock(Fragment, null, renderList(buttons.value[key], (item, index) => {
|
|
8143
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8179
|
+
return openBlock(), createBlock(_sfc_main$z, {
|
|
8144
8180
|
data: item,
|
|
8145
8181
|
key: index
|
|
8146
8182
|
}, null, 8, ["data"]);
|
|
@@ -8152,7 +8188,132 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
8152
8188
|
}
|
|
8153
8189
|
});
|
|
8154
8190
|
|
|
8191
|
+
const _hoisted_1$b = { class: "m-editor-props-form-panel" };
|
|
8192
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
8193
|
+
...{
|
|
8194
|
+
name: "MEditorFormPanel"
|
|
8195
|
+
},
|
|
8196
|
+
__name: "FormPanel",
|
|
8197
|
+
props: {
|
|
8198
|
+
config: {},
|
|
8199
|
+
values: {},
|
|
8200
|
+
disabledShowSrc: { type: Boolean },
|
|
8201
|
+
labelWidth: {},
|
|
8202
|
+
codeValueKey: {},
|
|
8203
|
+
labelPosition: {},
|
|
8204
|
+
extendState: { type: Function }
|
|
8205
|
+
},
|
|
8206
|
+
emits: ["submit", "submit-error", "form-error", "mounted"],
|
|
8207
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
8208
|
+
const props = __props;
|
|
8209
|
+
const emit = __emit;
|
|
8210
|
+
const services = inject("services");
|
|
8211
|
+
const codeOptions = inject("codeOptions", {});
|
|
8212
|
+
const showSrc = ref(false);
|
|
8213
|
+
const propsPanelSize = computed(() => services?.uiService.get("propsPanelSize") || "small");
|
|
8214
|
+
const { height: editorContentHeight } = useEditorContentHeight();
|
|
8215
|
+
const stage = computed(() => services?.editorService.get("stage"));
|
|
8216
|
+
const configForm = useTemplateRef("configForm");
|
|
8217
|
+
watchEffect(() => {
|
|
8218
|
+
if (configForm.value) {
|
|
8219
|
+
configForm.value.formState.stage = stage.value;
|
|
8220
|
+
configForm.value.formState.services = services;
|
|
8221
|
+
}
|
|
8222
|
+
});
|
|
8223
|
+
const internalInstance = getCurrentInstance();
|
|
8224
|
+
onMounted(() => {
|
|
8225
|
+
emit("mounted", internalInstance);
|
|
8226
|
+
});
|
|
8227
|
+
const submit = async (v, eventData) => {
|
|
8228
|
+
try {
|
|
8229
|
+
const values = await configForm.value?.submitForm();
|
|
8230
|
+
emit("submit", values, eventData);
|
|
8231
|
+
} catch (e) {
|
|
8232
|
+
emit("submit-error", e);
|
|
8233
|
+
}
|
|
8234
|
+
};
|
|
8235
|
+
const errorHandler = (e) => {
|
|
8236
|
+
emit("form-error", e);
|
|
8237
|
+
};
|
|
8238
|
+
const saveCode = (values) => {
|
|
8239
|
+
emit("submit", props.codeValueKey ? { [props.codeValueKey]: values } : values);
|
|
8240
|
+
};
|
|
8241
|
+
__expose({ configForm, submit });
|
|
8242
|
+
return (_ctx, _cache) => {
|
|
8243
|
+
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
8244
|
+
renderSlot(_ctx.$slots, "props-form-panel-header"),
|
|
8245
|
+
createVNode(unref(TMagicScrollbar), null, {
|
|
8246
|
+
default: withCtx(() => [
|
|
8247
|
+
createVNode(unref(MForm), {
|
|
8248
|
+
ref_key: "configForm",
|
|
8249
|
+
ref: configForm,
|
|
8250
|
+
class: normalizeClass(propsPanelSize.value),
|
|
8251
|
+
"popper-class": `m-editor-props-panel-popper ${propsPanelSize.value}`,
|
|
8252
|
+
"label-width": _ctx.labelWidth,
|
|
8253
|
+
"label-position": _ctx.labelPosition,
|
|
8254
|
+
size: propsPanelSize.value,
|
|
8255
|
+
"init-values": _ctx.values,
|
|
8256
|
+
config: _ctx.config,
|
|
8257
|
+
"extend-state": _ctx.extendState,
|
|
8258
|
+
onChange: submit,
|
|
8259
|
+
onError: errorHandler
|
|
8260
|
+
}, null, 8, ["class", "popper-class", "label-width", "label-position", "size", "init-values", "config", "extend-state"])
|
|
8261
|
+
]),
|
|
8262
|
+
_: 1
|
|
8263
|
+
}),
|
|
8264
|
+
!_ctx.disabledShowSrc ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
8265
|
+
key: 0,
|
|
8266
|
+
class: "m-editor-props-panel-src-icon",
|
|
8267
|
+
circle: "",
|
|
8268
|
+
title: "源码",
|
|
8269
|
+
type: showSrc.value ? "primary" : "",
|
|
8270
|
+
onClick: _cache[0] || (_cache[0] = ($event) => showSrc.value = !showSrc.value)
|
|
8271
|
+
}, {
|
|
8272
|
+
default: withCtx(() => [
|
|
8273
|
+
createVNode(_sfc_main$Z, { icon: unref(Document) }, null, 8, ["icon"])
|
|
8274
|
+
]),
|
|
8275
|
+
_: 1
|
|
8276
|
+
}, 8, ["type"])) : createCommentVNode("", true),
|
|
8277
|
+
showSrc.value ? (openBlock(), createBlock(_sfc_main$Y, {
|
|
8278
|
+
key: 1,
|
|
8279
|
+
class: "m-editor-props-panel-src-code",
|
|
8280
|
+
height: `${unref(editorContentHeight)}px`,
|
|
8281
|
+
"init-values": _ctx.codeValueKey ? _ctx.values[_ctx.codeValueKey] : _ctx.values,
|
|
8282
|
+
options: unref(codeOptions),
|
|
8283
|
+
parse: true,
|
|
8284
|
+
onSave: saveCode
|
|
8285
|
+
}, null, 8, ["height", "init-values", "options"])) : createCommentVNode("", true)
|
|
8286
|
+
]);
|
|
8287
|
+
};
|
|
8288
|
+
}
|
|
8289
|
+
});
|
|
8290
|
+
|
|
8291
|
+
const useStylePanel = (services) => {
|
|
8292
|
+
const showStylePanelStorageKey = "props-panel-show-style-panel";
|
|
8293
|
+
const showStylePanelStorageValue = services?.storageService.getItem(showStylePanelStorageKey, {
|
|
8294
|
+
protocol: Protocol.BOOLEAN
|
|
8295
|
+
});
|
|
8296
|
+
if (typeof showStylePanelStorageValue === "boolean") {
|
|
8297
|
+
services?.uiService.set("showStylePanel", showStylePanelStorageValue);
|
|
8298
|
+
}
|
|
8299
|
+
const showStylePanel = computed(() => services?.uiService.get("showStylePanel") ?? true);
|
|
8300
|
+
const showStylePanelHandler = () => {
|
|
8301
|
+
services?.uiService.set("showStylePanel", true);
|
|
8302
|
+
services?.storageService.setItem(showStylePanelStorageKey, true, { protocol: Protocol.BOOLEAN });
|
|
8303
|
+
};
|
|
8304
|
+
const closeStylePanelHandler = () => {
|
|
8305
|
+
services?.uiService.set("showStylePanel", false);
|
|
8306
|
+
services?.storageService.setItem(showStylePanelStorageKey, false, { protocol: Protocol.BOOLEAN });
|
|
8307
|
+
};
|
|
8308
|
+
return {
|
|
8309
|
+
showStylePanel,
|
|
8310
|
+
showStylePanelHandler,
|
|
8311
|
+
closeStylePanelHandler
|
|
8312
|
+
};
|
|
8313
|
+
};
|
|
8314
|
+
|
|
8155
8315
|
const _hoisted_1$a = { class: "m-editor-props-panel" };
|
|
8316
|
+
const _hoisted_2$4 = { class: "m-editor-props-style-panel-title" };
|
|
8156
8317
|
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
8157
8318
|
...{
|
|
8158
8319
|
name: "MEditorPropsPanel"
|
|
@@ -8162,21 +8323,20 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
8162
8323
|
disabledShowSrc: { type: Boolean },
|
|
8163
8324
|
extendState: { type: Function }
|
|
8164
8325
|
},
|
|
8165
|
-
emits: ["
|
|
8326
|
+
emits: ["submit-error", "form-error", "mounted"],
|
|
8166
8327
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
8167
|
-
const codeOptions = inject("codeOptions", {});
|
|
8168
8328
|
const emit = __emit;
|
|
8169
|
-
const
|
|
8170
|
-
const internalInstance = getCurrentInstance();
|
|
8329
|
+
const services = inject("services");
|
|
8171
8330
|
const values = ref({});
|
|
8172
|
-
const configForm = ref();
|
|
8173
8331
|
const curFormConfig = ref([]);
|
|
8174
|
-
const services = inject("services");
|
|
8175
8332
|
const node = computed(() => services?.editorService.get("node"));
|
|
8176
8333
|
const nodes = computed(() => services?.editorService.get("nodes") || []);
|
|
8177
|
-
const
|
|
8178
|
-
|
|
8179
|
-
|
|
8334
|
+
const styleFormConfig = [
|
|
8335
|
+
{
|
|
8336
|
+
tabPosition: "right",
|
|
8337
|
+
items: styleTabConfig.items
|
|
8338
|
+
}
|
|
8339
|
+
];
|
|
8180
8340
|
const init = async () => {
|
|
8181
8341
|
if (!node.value) {
|
|
8182
8342
|
curFormConfig.value = [];
|
|
@@ -8188,21 +8348,15 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
8188
8348
|
};
|
|
8189
8349
|
watchEffect(init);
|
|
8190
8350
|
services?.propsService.on("props-configs-change", init);
|
|
8191
|
-
onMounted(() => {
|
|
8192
|
-
emit("mounted", internalInstance);
|
|
8193
|
-
});
|
|
8194
8351
|
onBeforeUnmount(() => {
|
|
8195
8352
|
services?.propsService.off("props-configs-change", init);
|
|
8196
8353
|
});
|
|
8197
|
-
watchEffect(() => {
|
|
8198
|
-
if (configForm.value && stage.value) {
|
|
8199
|
-
configForm.value.formState.stage = stage.value;
|
|
8200
|
-
}
|
|
8201
|
-
});
|
|
8202
8354
|
const submit = async (v, eventData) => {
|
|
8203
8355
|
try {
|
|
8204
|
-
|
|
8205
|
-
|
|
8356
|
+
if (!v.id) {
|
|
8357
|
+
v.id = values.value.id;
|
|
8358
|
+
}
|
|
8359
|
+
services?.editorService.update(v, { changeRecords: eventData?.changeRecords });
|
|
8206
8360
|
} catch (e) {
|
|
8207
8361
|
emit("submit-error", e);
|
|
8208
8362
|
}
|
|
@@ -8210,48 +8364,76 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
8210
8364
|
const errorHandler = (e) => {
|
|
8211
8365
|
emit("form-error", e);
|
|
8212
8366
|
};
|
|
8213
|
-
const
|
|
8214
|
-
|
|
8367
|
+
const mountedHandler = (e) => {
|
|
8368
|
+
emit("mounted", e);
|
|
8215
8369
|
};
|
|
8216
|
-
|
|
8370
|
+
const { showStylePanel, showStylePanelHandler, closeStylePanelHandler } = useStylePanel(services);
|
|
8371
|
+
const propertyFormPanelRef = useTemplateRef("propertyFormPanel");
|
|
8372
|
+
__expose({
|
|
8373
|
+
getFormState() {
|
|
8374
|
+
return propertyFormPanelRef.value?.configForm?.formState;
|
|
8375
|
+
},
|
|
8376
|
+
submit
|
|
8377
|
+
});
|
|
8217
8378
|
return (_ctx, _cache) => {
|
|
8218
8379
|
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
8219
8380
|
renderSlot(_ctx.$slots, "props-panel-header"),
|
|
8220
|
-
createVNode(
|
|
8221
|
-
|
|
8222
|
-
|
|
8223
|
-
class: normalizeClass(propsPanelSize.value),
|
|
8224
|
-
"popper-class": `m-editor-props-panel-popper ${propsPanelSize.value}`,
|
|
8225
|
-
size: propsPanelSize.value,
|
|
8226
|
-
"init-values": values.value,
|
|
8381
|
+
createVNode(_sfc_main$q, {
|
|
8382
|
+
ref: "propertyFormPanel",
|
|
8383
|
+
class: normalizeClass(["m-editor-props-property-panel", { "show-style-panel": unref(showStylePanel) }]),
|
|
8227
8384
|
config: curFormConfig.value,
|
|
8228
|
-
|
|
8229
|
-
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
|
|
8385
|
+
values: values.value,
|
|
8386
|
+
disabledShowSrc: _ctx.disabledShowSrc,
|
|
8387
|
+
extendState: _ctx.extendState,
|
|
8388
|
+
onSubmit: submit,
|
|
8389
|
+
onSubmitError: errorHandler,
|
|
8390
|
+
onFormError: errorHandler,
|
|
8391
|
+
onMounted: mountedHandler
|
|
8392
|
+
}, null, 8, ["class", "config", "values", "disabledShowSrc", "extendState"]),
|
|
8393
|
+
unref(showStylePanel) ? (openBlock(), createBlock(_sfc_main$q, {
|
|
8233
8394
|
key: 0,
|
|
8234
|
-
class: "m-editor-props-panel
|
|
8395
|
+
class: "m-editor-props-style-panel",
|
|
8396
|
+
"label-position": "top",
|
|
8397
|
+
"code-value-key": "style",
|
|
8398
|
+
config: styleFormConfig,
|
|
8399
|
+
values: values.value,
|
|
8400
|
+
disabledShowSrc: _ctx.disabledShowSrc,
|
|
8401
|
+
extendState: _ctx.extendState,
|
|
8402
|
+
onSubmit: submit,
|
|
8403
|
+
onSubmitError: errorHandler,
|
|
8404
|
+
onFormError: errorHandler
|
|
8405
|
+
}, {
|
|
8406
|
+
"props-form-panel-header": withCtx(() => [
|
|
8407
|
+
createElementVNode("div", _hoisted_2$4, [
|
|
8408
|
+
_cache[0] || (_cache[0] = createElementVNode("span", null, "样式", -1)),
|
|
8409
|
+
createElementVNode("div", null, [
|
|
8410
|
+
createVNode(unref(TMagicButton), {
|
|
8411
|
+
link: "",
|
|
8412
|
+
size: "small",
|
|
8413
|
+
onClick: unref(closeStylePanelHandler)
|
|
8414
|
+
}, {
|
|
8415
|
+
default: withCtx(() => [
|
|
8416
|
+
createVNode(_sfc_main$Z, { icon: unref(Close) }, null, 8, ["icon"])
|
|
8417
|
+
]),
|
|
8418
|
+
_: 1
|
|
8419
|
+
}, 8, ["onClick"])
|
|
8420
|
+
])
|
|
8421
|
+
])
|
|
8422
|
+
]),
|
|
8423
|
+
_: 1
|
|
8424
|
+
}, 8, ["values", "disabledShowSrc", "extendState"])) : createCommentVNode("", true),
|
|
8425
|
+
!unref(showStylePanel) ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
8426
|
+
key: 1,
|
|
8427
|
+
class: "m-editor-props-panel-style-icon",
|
|
8235
8428
|
circle: "",
|
|
8236
|
-
|
|
8237
|
-
|
|
8238
|
-
type: showSrc.value ? "primary" : "",
|
|
8239
|
-
onClick: _cache[0] || (_cache[0] = ($event) => showSrc.value = !showSrc.value)
|
|
8429
|
+
type: unref(showStylePanel) ? "primary" : "",
|
|
8430
|
+
onClick: unref(showStylePanelHandler)
|
|
8240
8431
|
}, {
|
|
8241
8432
|
default: withCtx(() => [
|
|
8242
|
-
createVNode(_sfc_main$
|
|
8433
|
+
createVNode(_sfc_main$Z, { icon: unref(Sugar) }, null, 8, ["icon"])
|
|
8243
8434
|
]),
|
|
8244
8435
|
_: 1
|
|
8245
|
-
}, 8, ["type"])) : createCommentVNode("", true)
|
|
8246
|
-
showSrc.value ? (openBlock(), createBlock(_sfc_main$X, {
|
|
8247
|
-
key: 1,
|
|
8248
|
-
class: "m-editor-props-panel-src-code",
|
|
8249
|
-
height: `${unref(editorContentHeight)}px`,
|
|
8250
|
-
"init-values": values.value,
|
|
8251
|
-
options: unref(codeOptions),
|
|
8252
|
-
parse: true,
|
|
8253
|
-
onSave: saveCode
|
|
8254
|
-
}, null, 8, ["height", "init-values", "options"])) : createCommentVNode("", true)
|
|
8436
|
+
}, 8, ["type", "onClick"])) : createCommentVNode("", true)
|
|
8255
8437
|
], 512)), [
|
|
8256
8438
|
[vShow, nodes.value.length === 1]
|
|
8257
8439
|
]);
|
|
@@ -8261,7 +8443,174 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
8261
8443
|
|
|
8262
8444
|
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
8263
8445
|
...{
|
|
8264
|
-
name: "
|
|
8446
|
+
name: "MEditorContentMenu"
|
|
8447
|
+
},
|
|
8448
|
+
__name: "ContentMenu",
|
|
8449
|
+
props: {
|
|
8450
|
+
menuData: { default: () => [] },
|
|
8451
|
+
isSubMenu: { type: Boolean, default: false },
|
|
8452
|
+
active: {},
|
|
8453
|
+
autoHide: { type: Boolean, default: true }
|
|
8454
|
+
},
|
|
8455
|
+
emits: ["hide", "show", "mouseenter"],
|
|
8456
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
8457
|
+
const props = __props;
|
|
8458
|
+
const emit = __emit;
|
|
8459
|
+
const menu = useTemplateRef("menu");
|
|
8460
|
+
const buttons = useTemplateRef("buttons");
|
|
8461
|
+
const subMenu = useTemplateRef("subMenu");
|
|
8462
|
+
const visible = ref(false);
|
|
8463
|
+
const subMenuData = ref([]);
|
|
8464
|
+
const zIndex = useZIndex();
|
|
8465
|
+
const curZIndex = ref(0);
|
|
8466
|
+
const menuPosition = ref({
|
|
8467
|
+
left: 0,
|
|
8468
|
+
top: 0
|
|
8469
|
+
});
|
|
8470
|
+
const menuStyle = computed(() => ({
|
|
8471
|
+
top: `${menuPosition.value.top + 2}px`,
|
|
8472
|
+
left: `${menuPosition.value.left + 2}px`,
|
|
8473
|
+
zIndex: curZIndex.value
|
|
8474
|
+
}));
|
|
8475
|
+
const contains = (el) => menu.value?.contains(el) || subMenu.value?.contains(el);
|
|
8476
|
+
const hide = () => {
|
|
8477
|
+
if (!visible.value) return;
|
|
8478
|
+
visible.value = false;
|
|
8479
|
+
subMenu.value?.hide();
|
|
8480
|
+
emit("hide");
|
|
8481
|
+
};
|
|
8482
|
+
const clickHandler = (event) => {
|
|
8483
|
+
if (!props.autoHide) return;
|
|
8484
|
+
if (event.button === 0) {
|
|
8485
|
+
hide();
|
|
8486
|
+
}
|
|
8487
|
+
};
|
|
8488
|
+
const outsideClickHideHandler = (e) => {
|
|
8489
|
+
if (!props.autoHide) return;
|
|
8490
|
+
const target = e.target;
|
|
8491
|
+
if (!visible.value || !target) {
|
|
8492
|
+
return;
|
|
8493
|
+
}
|
|
8494
|
+
if (contains(target)) {
|
|
8495
|
+
return;
|
|
8496
|
+
}
|
|
8497
|
+
hide();
|
|
8498
|
+
};
|
|
8499
|
+
const setPosition = (e) => {
|
|
8500
|
+
const menuHeight = menu.value?.clientHeight || 0;
|
|
8501
|
+
let top = e.clientY;
|
|
8502
|
+
if (menuHeight + e.clientY > document.body.clientHeight) {
|
|
8503
|
+
top = document.body.clientHeight - menuHeight;
|
|
8504
|
+
}
|
|
8505
|
+
menuPosition.value = {
|
|
8506
|
+
top,
|
|
8507
|
+
left: e.clientX
|
|
8508
|
+
};
|
|
8509
|
+
};
|
|
8510
|
+
const show = (e) => {
|
|
8511
|
+
visible.value = true;
|
|
8512
|
+
nextTick(() => {
|
|
8513
|
+
e && setPosition(e);
|
|
8514
|
+
curZIndex.value = zIndex.nextZIndex();
|
|
8515
|
+
emit("show");
|
|
8516
|
+
});
|
|
8517
|
+
};
|
|
8518
|
+
const showSubMenu = (item, index) => {
|
|
8519
|
+
const menuItem = item;
|
|
8520
|
+
if (typeof item !== "object") {
|
|
8521
|
+
return;
|
|
8522
|
+
}
|
|
8523
|
+
subMenuData.value = menuItem.items || [];
|
|
8524
|
+
setTimeout(() => {
|
|
8525
|
+
if (!visible.value) {
|
|
8526
|
+
return;
|
|
8527
|
+
}
|
|
8528
|
+
if (menu.value) {
|
|
8529
|
+
let y = menu.value.offsetTop;
|
|
8530
|
+
if (buttons.value?.[index].$el) {
|
|
8531
|
+
const rect = buttons.value?.[index].$el.getBoundingClientRect();
|
|
8532
|
+
y = rect.top;
|
|
8533
|
+
}
|
|
8534
|
+
subMenu.value?.show({
|
|
8535
|
+
clientX: menu.value.offsetLeft + menu.value.clientWidth - 2,
|
|
8536
|
+
clientY: y
|
|
8537
|
+
});
|
|
8538
|
+
}
|
|
8539
|
+
}, 0);
|
|
8540
|
+
};
|
|
8541
|
+
const mouseenterHandler = () => {
|
|
8542
|
+
emit("mouseenter");
|
|
8543
|
+
};
|
|
8544
|
+
onMounted(() => {
|
|
8545
|
+
if (props.isSubMenu) return;
|
|
8546
|
+
globalThis.addEventListener("mousedown", outsideClickHideHandler, true);
|
|
8547
|
+
});
|
|
8548
|
+
onBeforeUnmount(() => {
|
|
8549
|
+
if (props.isSubMenu) return;
|
|
8550
|
+
globalThis.removeEventListener("mousedown", outsideClickHideHandler, true);
|
|
8551
|
+
});
|
|
8552
|
+
__expose({
|
|
8553
|
+
menu,
|
|
8554
|
+
menuPosition,
|
|
8555
|
+
hide,
|
|
8556
|
+
show,
|
|
8557
|
+
contains,
|
|
8558
|
+
setPosition
|
|
8559
|
+
});
|
|
8560
|
+
return (_ctx, _cache) => {
|
|
8561
|
+
const _component_content_menu = resolveComponent("content-menu", true);
|
|
8562
|
+
return openBlock(), createBlock(Transition, { name: "fade" }, {
|
|
8563
|
+
default: withCtx(() => [
|
|
8564
|
+
withDirectives(createElementVNode("div", {
|
|
8565
|
+
class: "magic-editor-content-menu",
|
|
8566
|
+
ref_key: "menu",
|
|
8567
|
+
ref: menu,
|
|
8568
|
+
style: normalizeStyle(menuStyle.value),
|
|
8569
|
+
onMouseenter: _cache[0] || (_cache[0] = ($event) => mouseenterHandler()),
|
|
8570
|
+
onContextmenu: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
8571
|
+
}, ["prevent"]))
|
|
8572
|
+
}, [
|
|
8573
|
+
renderSlot(_ctx.$slots, "title"),
|
|
8574
|
+
createElementVNode("div", null, [
|
|
8575
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuData, (item, index) => {
|
|
8576
|
+
return openBlock(), createBlock(_sfc_main$z, {
|
|
8577
|
+
"event-type": "mouseup",
|
|
8578
|
+
ref_for: true,
|
|
8579
|
+
ref_key: "buttons",
|
|
8580
|
+
ref: buttons,
|
|
8581
|
+
class: normalizeClass({ active: _ctx.active && item.id === _ctx.active }),
|
|
8582
|
+
data: item,
|
|
8583
|
+
key: index,
|
|
8584
|
+
onMouseup: clickHandler,
|
|
8585
|
+
onMouseenter: ($event) => showSubMenu(item, index)
|
|
8586
|
+
}, null, 8, ["class", "data", "onMouseenter"]);
|
|
8587
|
+
}), 128))
|
|
8588
|
+
]),
|
|
8589
|
+
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
8590
|
+
subMenuData.value.length ? (openBlock(), createBlock(_component_content_menu, {
|
|
8591
|
+
key: 0,
|
|
8592
|
+
class: "sub-menu",
|
|
8593
|
+
ref_key: "subMenu",
|
|
8594
|
+
ref: subMenu,
|
|
8595
|
+
active: _ctx.active,
|
|
8596
|
+
"menu-data": subMenuData.value,
|
|
8597
|
+
"is-sub-menu": true,
|
|
8598
|
+
onHide: hide
|
|
8599
|
+
}, null, 8, ["active", "menu-data"])) : createCommentVNode("", true)
|
|
8600
|
+
]))
|
|
8601
|
+
], 36), [
|
|
8602
|
+
[vShow, visible.value]
|
|
8603
|
+
])
|
|
8604
|
+
]),
|
|
8605
|
+
_: 3
|
|
8606
|
+
});
|
|
8607
|
+
};
|
|
8608
|
+
}
|
|
8609
|
+
});
|
|
8610
|
+
|
|
8611
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
8612
|
+
...{
|
|
8613
|
+
name: "MEditorSearchInput"
|
|
8265
8614
|
},
|
|
8266
8615
|
__name: "SearchInput",
|
|
8267
8616
|
emits: ["search"],
|
|
@@ -8307,7 +8656,7 @@ const _hoisted_4$1 = {
|
|
|
8307
8656
|
key: 0,
|
|
8308
8657
|
class: "m-editor-tree-node-children"
|
|
8309
8658
|
};
|
|
8310
|
-
const _sfc_main$
|
|
8659
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
8311
8660
|
...{
|
|
8312
8661
|
name: "MEditorTreeNode"
|
|
8313
8662
|
},
|
|
@@ -8381,7 +8730,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
8381
8730
|
onContextmenu: nodeContentmenuHandler,
|
|
8382
8731
|
onMouseenter: mouseenterHandler
|
|
8383
8732
|
}, [
|
|
8384
|
-
createVNode(_sfc_main$
|
|
8733
|
+
createVNode(_sfc_main$Z, {
|
|
8385
8734
|
class: "expand-icon",
|
|
8386
8735
|
style: normalizeStyle(hasChildren.value ? "" : "color: transparent; cursor: default"),
|
|
8387
8736
|
icon: expanded.value ? unref(ArrowDown) : unref(ArrowRight),
|
|
@@ -8437,7 +8786,7 @@ const _hoisted_1$8 = {
|
|
|
8437
8786
|
key: 1,
|
|
8438
8787
|
class: "m-editor-tree-empty"
|
|
8439
8788
|
};
|
|
8440
|
-
const _sfc_main$
|
|
8789
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
8441
8790
|
...{
|
|
8442
8791
|
name: "MEditorTree"
|
|
8443
8792
|
},
|
|
@@ -8462,7 +8811,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
8462
8811
|
onDragover: handleDragOver
|
|
8463
8812
|
}, [
|
|
8464
8813
|
_ctx.data?.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.data, (item) => {
|
|
8465
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8814
|
+
return openBlock(), createBlock(_sfc_main$m, {
|
|
8466
8815
|
key: item.id,
|
|
8467
8816
|
data: item,
|
|
8468
8817
|
indent: _ctx.indent,
|
|
@@ -8488,7 +8837,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
8488
8837
|
}
|
|
8489
8838
|
});
|
|
8490
8839
|
|
|
8491
|
-
const _sfc_main$
|
|
8840
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
8492
8841
|
...{
|
|
8493
8842
|
name: "MEditorCodeBlockList"
|
|
8494
8843
|
},
|
|
@@ -8498,7 +8847,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
8498
8847
|
nextLevelIndentIncrement: {},
|
|
8499
8848
|
customError: { type: Function }
|
|
8500
8849
|
},
|
|
8501
|
-
emits: ["edit", "remove"],
|
|
8850
|
+
emits: ["edit", "remove", "node-contextmenu"],
|
|
8502
8851
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
8503
8852
|
const props = __props;
|
|
8504
8853
|
const emit = __emit;
|
|
@@ -8579,20 +8928,29 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
8579
8928
|
if (typeof props.customError === "function") {
|
|
8580
8929
|
props.customError(id, existBinds ? CodeDeleteErrorType.BIND : CodeDeleteErrorType.UNDELETEABLE);
|
|
8581
8930
|
} else {
|
|
8582
|
-
|
|
8931
|
+
if (existBinds) {
|
|
8932
|
+
tMagicMessage.error("代码块存在绑定关系,不可删除");
|
|
8933
|
+
} else {
|
|
8934
|
+
tMagicMessage.error("代码块不可删除");
|
|
8935
|
+
}
|
|
8583
8936
|
}
|
|
8584
8937
|
}
|
|
8585
8938
|
};
|
|
8939
|
+
const nodeContentMenuHandler = (event, data) => {
|
|
8940
|
+
emit("node-contextmenu", event, data);
|
|
8941
|
+
};
|
|
8586
8942
|
__expose({
|
|
8587
|
-
filter: filterTextChangeHandler
|
|
8943
|
+
filter: filterTextChangeHandler,
|
|
8944
|
+
deleteCode
|
|
8588
8945
|
});
|
|
8589
8946
|
return (_ctx, _cache) => {
|
|
8590
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8947
|
+
return openBlock(), createBlock(_sfc_main$l, {
|
|
8591
8948
|
data: codeList.value,
|
|
8592
8949
|
"node-status-map": unref(nodeStatusMap),
|
|
8593
8950
|
indent: _ctx.indent,
|
|
8594
8951
|
"next-level-indent-increment": _ctx.nextLevelIndentIncrement,
|
|
8595
|
-
onNodeClick: clickHandler
|
|
8952
|
+
onNodeClick: clickHandler,
|
|
8953
|
+
onNodeContextmenu: nodeContentMenuHandler
|
|
8596
8954
|
}, {
|
|
8597
8955
|
"tree-node-label": withCtx(({ data }) => [
|
|
8598
8956
|
createElementVNode("div", {
|
|
@@ -8622,7 +8980,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
8622
8980
|
placement: "bottom"
|
|
8623
8981
|
}, {
|
|
8624
8982
|
default: withCtx(() => [
|
|
8625
|
-
createVNode(_sfc_main$
|
|
8983
|
+
createVNode(_sfc_main$Z, {
|
|
8626
8984
|
icon: editable.value ? unref(Edit) : unref(View),
|
|
8627
8985
|
class: "edit-icon",
|
|
8628
8986
|
onClick: withModifiers(($event) => editCode(`${data.key}`), ["stop"])
|
|
@@ -8637,7 +8995,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
8637
8995
|
placement: "bottom"
|
|
8638
8996
|
}, {
|
|
8639
8997
|
default: withCtx(() => [
|
|
8640
|
-
createVNode(_sfc_main$
|
|
8998
|
+
createVNode(_sfc_main$Z, {
|
|
8641
8999
|
icon: unref(Close),
|
|
8642
9000
|
class: "edit-icon",
|
|
8643
9001
|
onClick: withModifiers(($event) => deleteCode(`${data.key}`), ["stop"])
|
|
@@ -8656,8 +9014,74 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
8656
9014
|
}
|
|
8657
9015
|
});
|
|
8658
9016
|
|
|
9017
|
+
const useContentMenu$1 = (deleteCode) => {
|
|
9018
|
+
const eventBus = inject("eventBus");
|
|
9019
|
+
const menuRef = useTemplateRef("menu");
|
|
9020
|
+
let selectId = "";
|
|
9021
|
+
const menuData = [
|
|
9022
|
+
{
|
|
9023
|
+
type: "button",
|
|
9024
|
+
text: "编辑",
|
|
9025
|
+
icon: Edit,
|
|
9026
|
+
display: (services) => services?.codeBlockService?.getEditStatus() ?? true,
|
|
9027
|
+
handler: () => {
|
|
9028
|
+
if (!selectId) {
|
|
9029
|
+
return;
|
|
9030
|
+
}
|
|
9031
|
+
eventBus?.emit("edit-code", selectId);
|
|
9032
|
+
}
|
|
9033
|
+
},
|
|
9034
|
+
{
|
|
9035
|
+
type: "button",
|
|
9036
|
+
text: "复制并粘贴至当前",
|
|
9037
|
+
icon: markRaw(CopyDocument),
|
|
9038
|
+
handler: async ({ codeBlockService }) => {
|
|
9039
|
+
if (!selectId) {
|
|
9040
|
+
return;
|
|
9041
|
+
}
|
|
9042
|
+
const codeBlock = codeBlockService.getCodeContentById(selectId);
|
|
9043
|
+
if (!codeBlock) {
|
|
9044
|
+
return;
|
|
9045
|
+
}
|
|
9046
|
+
const newCodeId = await codeBlockService.getUniqueId();
|
|
9047
|
+
codeBlockService.setCodeDslById(newCodeId, cloneDeep(codeBlock));
|
|
9048
|
+
}
|
|
9049
|
+
},
|
|
9050
|
+
{
|
|
9051
|
+
type: "button",
|
|
9052
|
+
text: "删除",
|
|
9053
|
+
icon: Delete,
|
|
9054
|
+
handler: () => {
|
|
9055
|
+
if (!selectId) {
|
|
9056
|
+
return;
|
|
9057
|
+
}
|
|
9058
|
+
deleteCode(selectId);
|
|
9059
|
+
}
|
|
9060
|
+
}
|
|
9061
|
+
];
|
|
9062
|
+
const nodeContentMenuHandler = (event, data) => {
|
|
9063
|
+
event.preventDefault();
|
|
9064
|
+
if (data.type === "code") {
|
|
9065
|
+
menuRef.value?.show(event);
|
|
9066
|
+
if (data.id) {
|
|
9067
|
+
selectId = `${data.id}`;
|
|
9068
|
+
} else {
|
|
9069
|
+
selectId = "";
|
|
9070
|
+
}
|
|
9071
|
+
}
|
|
9072
|
+
};
|
|
9073
|
+
const contentMenuHideHandler = () => {
|
|
9074
|
+
selectId = "";
|
|
9075
|
+
};
|
|
9076
|
+
return {
|
|
9077
|
+
menuData,
|
|
9078
|
+
nodeContentMenuHandler,
|
|
9079
|
+
contentMenuHideHandler
|
|
9080
|
+
};
|
|
9081
|
+
};
|
|
9082
|
+
|
|
8659
9083
|
const _hoisted_1$7 = { class: "search-wrapper" };
|
|
8660
|
-
const _sfc_main$
|
|
9084
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
8661
9085
|
...{
|
|
8662
9086
|
name: "MEditorCodeBlockListPanel"
|
|
8663
9087
|
},
|
|
@@ -8665,27 +9089,37 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
8665
9089
|
props: {
|
|
8666
9090
|
indent: {},
|
|
8667
9091
|
nextLevelIndentIncrement: {},
|
|
8668
|
-
customError: { type: Function }
|
|
9092
|
+
customError: { type: Function },
|
|
9093
|
+
customContentMenu: { type: Function }
|
|
8669
9094
|
},
|
|
8670
9095
|
setup(__props) {
|
|
9096
|
+
const props = __props;
|
|
8671
9097
|
const eventBus = inject("eventBus");
|
|
8672
9098
|
const { codeBlockService } = inject("services") || {};
|
|
8673
9099
|
const editable = computed(() => codeBlockService?.getEditStatus());
|
|
8674
9100
|
const { codeBlockEditor, codeConfig, editCode, deleteCode, createCodeBlock, submitCodeBlockHandler } = useCodeBlockEdit(codeBlockService);
|
|
8675
|
-
const codeBlockList =
|
|
9101
|
+
const codeBlockList = useTemplateRef("codeBlockList");
|
|
8676
9102
|
const filterTextChangeHandler = (val) => {
|
|
8677
9103
|
codeBlockList.value?.filter(val);
|
|
8678
9104
|
};
|
|
8679
9105
|
eventBus?.on("edit-code", (id) => {
|
|
8680
9106
|
editCode(id);
|
|
8681
9107
|
});
|
|
9108
|
+
const {
|
|
9109
|
+
nodeContentMenuHandler,
|
|
9110
|
+
menuData: contentMenuData,
|
|
9111
|
+
contentMenuHideHandler
|
|
9112
|
+
} = useContentMenu$1((id) => {
|
|
9113
|
+
codeBlockList.value?.deleteCode(id);
|
|
9114
|
+
});
|
|
9115
|
+
const menuData = computed(() => props.customContentMenu(contentMenuData, "code-block"));
|
|
8682
9116
|
return (_ctx, _cache) => {
|
|
8683
9117
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
8684
9118
|
createVNode(unref(TMagicScrollbar), { class: "m-editor-code-block-list m-editor-layer-panel" }, {
|
|
8685
9119
|
default: withCtx(() => [
|
|
8686
9120
|
renderSlot(_ctx.$slots, "code-block-panel-header", {}, () => [
|
|
8687
9121
|
createElementVNode("div", _hoisted_1$7, [
|
|
8688
|
-
createVNode(_sfc_main$
|
|
9122
|
+
createVNode(_sfc_main$n, { onSearch: filterTextChangeHandler }),
|
|
8689
9123
|
editable.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
8690
9124
|
key: 0,
|
|
8691
9125
|
class: "create-code-button",
|
|
@@ -8701,14 +9135,15 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
8701
9135
|
renderSlot(_ctx.$slots, "code-block-panel-search")
|
|
8702
9136
|
])
|
|
8703
9137
|
]),
|
|
8704
|
-
createVNode(_sfc_main$
|
|
9138
|
+
createVNode(_sfc_main$k, {
|
|
8705
9139
|
ref_key: "codeBlockList",
|
|
8706
9140
|
ref: codeBlockList,
|
|
8707
9141
|
"custom-error": _ctx.customError,
|
|
8708
9142
|
indent: _ctx.indent,
|
|
8709
9143
|
"next-level-indent-increment": _ctx.nextLevelIndentIncrement,
|
|
8710
9144
|
onEdit: unref(editCode),
|
|
8711
|
-
onRemove: unref(deleteCode)
|
|
9145
|
+
onRemove: unref(deleteCode),
|
|
9146
|
+
onNodeContextmenu: unref(nodeContentMenuHandler)
|
|
8712
9147
|
}, {
|
|
8713
9148
|
"code-block-panel-tool": withCtx(({ id, data }) => [
|
|
8714
9149
|
renderSlot(_ctx.$slots, "code-block-panel-tool", {
|
|
@@ -8717,18 +9152,27 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
8717
9152
|
})
|
|
8718
9153
|
]),
|
|
8719
9154
|
_: 3
|
|
8720
|
-
}, 8, ["custom-error", "indent", "next-level-indent-increment", "onEdit", "onRemove"])
|
|
9155
|
+
}, 8, ["custom-error", "indent", "next-level-indent-increment", "onEdit", "onRemove", "onNodeContextmenu"])
|
|
8721
9156
|
]),
|
|
8722
9157
|
_: 3
|
|
8723
9158
|
}),
|
|
8724
|
-
unref(codeConfig) ? (openBlock(), createBlock(_sfc_main$
|
|
9159
|
+
unref(codeConfig) ? (openBlock(), createBlock(_sfc_main$M, {
|
|
8725
9160
|
key: 0,
|
|
8726
9161
|
ref_key: "codeBlockEditor",
|
|
8727
9162
|
ref: codeBlockEditor,
|
|
8728
9163
|
disabled: !editable.value,
|
|
8729
9164
|
content: unref(codeConfig),
|
|
8730
9165
|
onSubmit: unref(submitCodeBlockHandler)
|
|
8731
|
-
}, null, 8, ["disabled", "content", "onSubmit"])) : createCommentVNode("", true)
|
|
9166
|
+
}, null, 8, ["disabled", "content", "onSubmit"])) : createCommentVNode("", true),
|
|
9167
|
+
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
9168
|
+
menuData.value.length ? (openBlock(), createBlock(_sfc_main$o, {
|
|
9169
|
+
key: 0,
|
|
9170
|
+
"menu-data": menuData.value,
|
|
9171
|
+
ref: "menu",
|
|
9172
|
+
style: { "overflow": "initial" },
|
|
9173
|
+
onHide: unref(contentMenuHideHandler)
|
|
9174
|
+
}, null, 8, ["menu-data", "onHide"])) : createCommentVNode("", true)
|
|
9175
|
+
]))
|
|
8732
9176
|
], 64);
|
|
8733
9177
|
};
|
|
8734
9178
|
}
|
|
@@ -8765,7 +9209,7 @@ const useDataSourceEdit = (dataSourceService) => {
|
|
|
8765
9209
|
};
|
|
8766
9210
|
};
|
|
8767
9211
|
|
|
8768
|
-
const _sfc_main$
|
|
9212
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
8769
9213
|
...{
|
|
8770
9214
|
name: "MEditorDataSourceConfigPanel"
|
|
8771
9215
|
},
|
|
@@ -8812,7 +9256,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
8812
9256
|
}
|
|
8813
9257
|
});
|
|
8814
9258
|
return (_ctx, _cache) => {
|
|
8815
|
-
return openBlock(), createBlock(_sfc_main$
|
|
9259
|
+
return openBlock(), createBlock(_sfc_main$R, {
|
|
8816
9260
|
visible: boxVisible.value,
|
|
8817
9261
|
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => boxVisible.value = $event),
|
|
8818
9262
|
width: width.value,
|
|
@@ -8840,7 +9284,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
8840
9284
|
}
|
|
8841
9285
|
});
|
|
8842
9286
|
|
|
8843
|
-
const _sfc_main$
|
|
9287
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
8844
9288
|
...{
|
|
8845
9289
|
name: "MEditorDataSourceList"
|
|
8846
9290
|
},
|
|
@@ -8849,7 +9293,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
8849
9293
|
indent: {},
|
|
8850
9294
|
nextLevelIndentIncrement: {}
|
|
8851
9295
|
},
|
|
8852
|
-
emits: ["edit", "remove"],
|
|
9296
|
+
emits: ["edit", "remove", "node-contextmenu"],
|
|
8853
9297
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
8854
9298
|
const emit = __emit;
|
|
8855
9299
|
const { depService, editorService, dataSourceService } = inject("services") || {};
|
|
@@ -8921,11 +9365,6 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
8921
9365
|
emit("edit", id);
|
|
8922
9366
|
};
|
|
8923
9367
|
const removeHandler = async (id) => {
|
|
8924
|
-
await tMagicMessageBox.confirm("确定删除?", "提示", {
|
|
8925
|
-
confirmButtonText: "确定",
|
|
8926
|
-
cancelButtonText: "取消",
|
|
8927
|
-
type: "warning"
|
|
8928
|
-
});
|
|
8929
9368
|
emit("remove", id);
|
|
8930
9369
|
};
|
|
8931
9370
|
const selectComp = (compId) => {
|
|
@@ -8938,16 +9377,20 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
8938
9377
|
selectComp(data.key);
|
|
8939
9378
|
}
|
|
8940
9379
|
};
|
|
9380
|
+
const nodeContentMenuHandler = (event, data) => {
|
|
9381
|
+
emit("node-contextmenu", event, data);
|
|
9382
|
+
};
|
|
8941
9383
|
__expose({
|
|
8942
9384
|
filter: filterTextChangeHandler
|
|
8943
9385
|
});
|
|
8944
9386
|
return (_ctx, _cache) => {
|
|
8945
|
-
return openBlock(), createBlock(_sfc_main$
|
|
9387
|
+
return openBlock(), createBlock(_sfc_main$l, {
|
|
8946
9388
|
data: list.value,
|
|
8947
9389
|
"node-status-map": unref(nodeStatusMap),
|
|
8948
9390
|
indent: _ctx.indent,
|
|
8949
9391
|
"next-level-indent-increment": _ctx.nextLevelIndentIncrement,
|
|
8950
|
-
onNodeClick: clickHandler
|
|
9392
|
+
onNodeClick: clickHandler,
|
|
9393
|
+
onNodeContextmenu: nodeContentMenuHandler
|
|
8951
9394
|
}, {
|
|
8952
9395
|
"tree-node-label": withCtx(({ data }) => [
|
|
8953
9396
|
createElementVNode("div", {
|
|
@@ -8977,7 +9420,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
8977
9420
|
placement: "bottom"
|
|
8978
9421
|
}, {
|
|
8979
9422
|
default: withCtx(() => [
|
|
8980
|
-
createVNode(_sfc_main$
|
|
9423
|
+
createVNode(_sfc_main$Z, {
|
|
8981
9424
|
icon: editable.value ? unref(Edit) : unref(View),
|
|
8982
9425
|
class: "edit-icon",
|
|
8983
9426
|
onClick: withModifiers(($event) => editHandler(`${data.key}`), ["stop"])
|
|
@@ -8992,7 +9435,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
8992
9435
|
placement: "bottom"
|
|
8993
9436
|
}, {
|
|
8994
9437
|
default: withCtx(() => [
|
|
8995
|
-
createVNode(_sfc_main$
|
|
9438
|
+
createVNode(_sfc_main$Z, {
|
|
8996
9439
|
icon: unref(Close),
|
|
8997
9440
|
class: "edit-icon",
|
|
8998
9441
|
onClick: withModifiers(($event) => removeHandler(`${data.key}`), ["stop"])
|
|
@@ -9008,17 +9451,84 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
9008
9451
|
}
|
|
9009
9452
|
});
|
|
9010
9453
|
|
|
9454
|
+
const useContentMenu = () => {
|
|
9455
|
+
const eventBus = inject("eventBus");
|
|
9456
|
+
const menuRef = useTemplateRef("menu");
|
|
9457
|
+
let selectId = "";
|
|
9458
|
+
const menuData = [
|
|
9459
|
+
{
|
|
9460
|
+
type: "button",
|
|
9461
|
+
text: "编辑",
|
|
9462
|
+
icon: Edit,
|
|
9463
|
+
display: (services) => services?.dataSourceService?.get("editable") ?? true,
|
|
9464
|
+
handler: () => {
|
|
9465
|
+
if (!selectId) {
|
|
9466
|
+
return;
|
|
9467
|
+
}
|
|
9468
|
+
eventBus?.emit("edit-data-source", selectId);
|
|
9469
|
+
}
|
|
9470
|
+
},
|
|
9471
|
+
{
|
|
9472
|
+
type: "button",
|
|
9473
|
+
text: "复制并粘贴至当前",
|
|
9474
|
+
icon: markRaw(CopyDocument),
|
|
9475
|
+
handler: ({ dataSourceService }) => {
|
|
9476
|
+
if (!selectId) {
|
|
9477
|
+
return;
|
|
9478
|
+
}
|
|
9479
|
+
const ds = dataSourceService.getDataSourceById(selectId);
|
|
9480
|
+
if (!ds) {
|
|
9481
|
+
return;
|
|
9482
|
+
}
|
|
9483
|
+
dataSourceService.add(cloneDeep(ds));
|
|
9484
|
+
}
|
|
9485
|
+
},
|
|
9486
|
+
{
|
|
9487
|
+
type: "button",
|
|
9488
|
+
text: "删除",
|
|
9489
|
+
icon: Delete,
|
|
9490
|
+
handler: () => {
|
|
9491
|
+
if (!selectId) {
|
|
9492
|
+
return;
|
|
9493
|
+
}
|
|
9494
|
+
eventBus?.emit("remove-data-source", selectId);
|
|
9495
|
+
}
|
|
9496
|
+
}
|
|
9497
|
+
];
|
|
9498
|
+
const nodeContentMenuHandler = (event, data) => {
|
|
9499
|
+
event.preventDefault();
|
|
9500
|
+
if (data.type === "ds") {
|
|
9501
|
+
menuRef.value?.show(event);
|
|
9502
|
+
if (data.id) {
|
|
9503
|
+
selectId = `${data.id}`;
|
|
9504
|
+
} else {
|
|
9505
|
+
selectId = "";
|
|
9506
|
+
}
|
|
9507
|
+
}
|
|
9508
|
+
};
|
|
9509
|
+
const contentMenuHideHandler = () => {
|
|
9510
|
+
selectId = "";
|
|
9511
|
+
};
|
|
9512
|
+
return {
|
|
9513
|
+
menuData,
|
|
9514
|
+
nodeContentMenuHandler,
|
|
9515
|
+
contentMenuHideHandler
|
|
9516
|
+
};
|
|
9517
|
+
};
|
|
9518
|
+
|
|
9011
9519
|
const _hoisted_1$6 = { class: "search-wrapper" };
|
|
9012
|
-
const _sfc_main$
|
|
9520
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
9013
9521
|
...{
|
|
9014
9522
|
name: "MEditorDataSourceListPanel"
|
|
9015
9523
|
},
|
|
9016
9524
|
__name: "DataSourceListPanel",
|
|
9017
9525
|
props: {
|
|
9018
9526
|
indent: {},
|
|
9019
|
-
nextLevelIndentIncrement: {}
|
|
9527
|
+
nextLevelIndentIncrement: {},
|
|
9528
|
+
customContentMenu: { type: Function }
|
|
9020
9529
|
},
|
|
9021
9530
|
setup(__props) {
|
|
9531
|
+
const props = __props;
|
|
9022
9532
|
const eventBus = inject("eventBus");
|
|
9023
9533
|
const { dataSourceService } = inject("services") || {};
|
|
9024
9534
|
const { editDialog, dataSourceValues, dialogTitle, editable, editHandler, submitDataSourceHandler } = useDataSourceEdit(dataSourceService);
|
|
@@ -9043,7 +9553,12 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
9043
9553
|
dialogTitle.value = `新增${datasourceType?.text || ""}`;
|
|
9044
9554
|
editDialog.value.show();
|
|
9045
9555
|
};
|
|
9046
|
-
const removeHandler = (id) => {
|
|
9556
|
+
const removeHandler = async (id) => {
|
|
9557
|
+
await tMagicMessageBox.confirm("确定删除?", "提示", {
|
|
9558
|
+
confirmButtonText: "确定",
|
|
9559
|
+
cancelButtonText: "取消",
|
|
9560
|
+
type: "warning"
|
|
9561
|
+
});
|
|
9047
9562
|
dataSourceService?.remove(id);
|
|
9048
9563
|
};
|
|
9049
9564
|
const dataSourceList = ref();
|
|
@@ -9053,12 +9568,19 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
9053
9568
|
eventBus?.on("edit-data-source", (id) => {
|
|
9054
9569
|
editHandler(id);
|
|
9055
9570
|
});
|
|
9571
|
+
eventBus?.on("remove-data-source", (id) => {
|
|
9572
|
+
removeHandler(id);
|
|
9573
|
+
});
|
|
9574
|
+
const { nodeContentMenuHandler, menuData: contentMenuData, contentMenuHideHandler } = useContentMenu();
|
|
9575
|
+
const menuData = computed(
|
|
9576
|
+
() => props.customContentMenu(contentMenuData, "data-source")
|
|
9577
|
+
);
|
|
9056
9578
|
return (_ctx, _cache) => {
|
|
9057
9579
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
9058
9580
|
createVNode(unref(TMagicScrollbar), { class: "data-source-list-panel m-editor-layer-panel" }, {
|
|
9059
9581
|
default: withCtx(() => [
|
|
9060
9582
|
createElementVNode("div", _hoisted_1$6, [
|
|
9061
|
-
createVNode(_sfc_main$
|
|
9583
|
+
createVNode(_sfc_main$n, { onSearch: filterTextChangeHandler }),
|
|
9062
9584
|
unref(editable) ? (openBlock(), createBlock(unref(TMagicPopover), {
|
|
9063
9585
|
key: 0,
|
|
9064
9586
|
placement: "right",
|
|
@@ -9079,7 +9601,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
9079
9601
|
]),
|
|
9080
9602
|
default: withCtx(() => [
|
|
9081
9603
|
(openBlock(true), createElementBlock(Fragment, null, renderList(datasourceTypeList.value, (item, index) => {
|
|
9082
|
-
return openBlock(), createBlock(_sfc_main$
|
|
9604
|
+
return openBlock(), createBlock(_sfc_main$z, {
|
|
9083
9605
|
data: {
|
|
9084
9606
|
type: "button",
|
|
9085
9607
|
text: item.text,
|
|
@@ -9095,195 +9617,40 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
9095
9617
|
})) : createCommentVNode("", true),
|
|
9096
9618
|
renderSlot(_ctx.$slots, "data-source-panel-search")
|
|
9097
9619
|
]),
|
|
9098
|
-
createVNode(_sfc_main$
|
|
9620
|
+
createVNode(_sfc_main$h, {
|
|
9099
9621
|
ref_key: "dataSourceList",
|
|
9100
9622
|
ref: dataSourceList,
|
|
9101
9623
|
indent: _ctx.indent,
|
|
9102
9624
|
"next-level-indent-increment": _ctx.nextLevelIndentIncrement,
|
|
9103
9625
|
onEdit: unref(editHandler),
|
|
9104
|
-
onRemove: removeHandler
|
|
9105
|
-
|
|
9626
|
+
onRemove: removeHandler,
|
|
9627
|
+
onNodeContextmenu: unref(nodeContentMenuHandler)
|
|
9628
|
+
}, null, 8, ["indent", "next-level-indent-increment", "onEdit", "onNodeContextmenu"])
|
|
9106
9629
|
]),
|
|
9107
9630
|
_: 3
|
|
9108
9631
|
}),
|
|
9109
|
-
createVNode(_sfc_main$
|
|
9632
|
+
createVNode(_sfc_main$i, {
|
|
9110
9633
|
ref_key: "editDialog",
|
|
9111
9634
|
ref: editDialog,
|
|
9112
9635
|
disabled: !unref(editable),
|
|
9113
9636
|
values: unref(dataSourceValues),
|
|
9114
9637
|
title: unref(dialogTitle),
|
|
9115
9638
|
onSubmit: unref(submitDataSourceHandler)
|
|
9116
|
-
}, null, 8, ["disabled", "values", "title", "onSubmit"])
|
|
9639
|
+
}, null, 8, ["disabled", "values", "title", "onSubmit"]),
|
|
9640
|
+
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
9641
|
+
menuData.value.length ? (openBlock(), createBlock(_sfc_main$o, {
|
|
9642
|
+
key: 0,
|
|
9643
|
+
"menu-data": menuData.value,
|
|
9644
|
+
ref: "menu",
|
|
9645
|
+
style: { "overflow": "initial" },
|
|
9646
|
+
onHide: unref(contentMenuHideHandler)
|
|
9647
|
+
}, null, 8, ["menu-data", "onHide"])) : createCommentVNode("", true)
|
|
9648
|
+
]))
|
|
9117
9649
|
], 64);
|
|
9118
9650
|
};
|
|
9119
9651
|
}
|
|
9120
9652
|
});
|
|
9121
9653
|
|
|
9122
|
-
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
9123
|
-
...{
|
|
9124
|
-
name: "MEditorContentMenu"
|
|
9125
|
-
},
|
|
9126
|
-
__name: "ContentMenu",
|
|
9127
|
-
props: {
|
|
9128
|
-
menuData: { default: () => [] },
|
|
9129
|
-
isSubMenu: { type: Boolean, default: false },
|
|
9130
|
-
active: {},
|
|
9131
|
-
autoHide: { type: Boolean, default: true }
|
|
9132
|
-
},
|
|
9133
|
-
emits: ["hide", "show", "mouseenter"],
|
|
9134
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
9135
|
-
const props = __props;
|
|
9136
|
-
const emit = __emit;
|
|
9137
|
-
const menu = ref();
|
|
9138
|
-
const buttons = ref();
|
|
9139
|
-
const subMenu = ref();
|
|
9140
|
-
const visible = ref(false);
|
|
9141
|
-
const subMenuData = ref([]);
|
|
9142
|
-
const zIndex = useZIndex();
|
|
9143
|
-
const curZIndex = ref(0);
|
|
9144
|
-
const menuPosition = ref({
|
|
9145
|
-
left: 0,
|
|
9146
|
-
top: 0
|
|
9147
|
-
});
|
|
9148
|
-
const menuStyle = computed(() => ({
|
|
9149
|
-
top: `${menuPosition.value.top}px`,
|
|
9150
|
-
left: `${menuPosition.value.left}px`,
|
|
9151
|
-
zIndex: curZIndex.value
|
|
9152
|
-
}));
|
|
9153
|
-
const contains = (el) => menu.value?.contains(el) || subMenu.value?.contains(el);
|
|
9154
|
-
const hide = () => {
|
|
9155
|
-
if (!visible.value) return;
|
|
9156
|
-
visible.value = false;
|
|
9157
|
-
subMenu.value?.hide();
|
|
9158
|
-
emit("hide");
|
|
9159
|
-
};
|
|
9160
|
-
const clickHandler = () => {
|
|
9161
|
-
if (!props.autoHide) return;
|
|
9162
|
-
hide();
|
|
9163
|
-
};
|
|
9164
|
-
const outsideClickHideHandler = (e) => {
|
|
9165
|
-
if (!props.autoHide) return;
|
|
9166
|
-
const target = e.target;
|
|
9167
|
-
if (!visible.value || !target) {
|
|
9168
|
-
return;
|
|
9169
|
-
}
|
|
9170
|
-
if (contains(target)) {
|
|
9171
|
-
return;
|
|
9172
|
-
}
|
|
9173
|
-
hide();
|
|
9174
|
-
};
|
|
9175
|
-
const setPosition = (e) => {
|
|
9176
|
-
const menuHeight = menu.value?.clientHeight || 0;
|
|
9177
|
-
let top = e.clientY;
|
|
9178
|
-
if (menuHeight + e.clientY > document.body.clientHeight) {
|
|
9179
|
-
top = document.body.clientHeight - menuHeight;
|
|
9180
|
-
}
|
|
9181
|
-
menuPosition.value = {
|
|
9182
|
-
top,
|
|
9183
|
-
left: e.clientX
|
|
9184
|
-
};
|
|
9185
|
-
};
|
|
9186
|
-
const show = (e) => {
|
|
9187
|
-
setTimeout(() => {
|
|
9188
|
-
visible.value = true;
|
|
9189
|
-
nextTick(() => {
|
|
9190
|
-
e && setPosition(e);
|
|
9191
|
-
curZIndex.value = zIndex.nextZIndex();
|
|
9192
|
-
emit("show");
|
|
9193
|
-
});
|
|
9194
|
-
}, 300);
|
|
9195
|
-
};
|
|
9196
|
-
const showSubMenu = (item, index) => {
|
|
9197
|
-
const menuItem = item;
|
|
9198
|
-
if (typeof item !== "object") {
|
|
9199
|
-
return;
|
|
9200
|
-
}
|
|
9201
|
-
subMenuData.value = menuItem.items || [];
|
|
9202
|
-
setTimeout(() => {
|
|
9203
|
-
if (!visible.value) {
|
|
9204
|
-
return;
|
|
9205
|
-
}
|
|
9206
|
-
if (menu.value) {
|
|
9207
|
-
let y = menu.value.offsetTop;
|
|
9208
|
-
if (buttons.value?.[index].$el) {
|
|
9209
|
-
const rect = buttons.value?.[index].$el.getBoundingClientRect();
|
|
9210
|
-
y = rect.top;
|
|
9211
|
-
}
|
|
9212
|
-
subMenu.value?.show({
|
|
9213
|
-
clientX: menu.value.offsetLeft + menu.value.clientWidth,
|
|
9214
|
-
clientY: y
|
|
9215
|
-
});
|
|
9216
|
-
}
|
|
9217
|
-
}, 0);
|
|
9218
|
-
};
|
|
9219
|
-
const mouseenterHandler = () => {
|
|
9220
|
-
emit("mouseenter");
|
|
9221
|
-
};
|
|
9222
|
-
onMounted(() => {
|
|
9223
|
-
if (props.isSubMenu) return;
|
|
9224
|
-
globalThis.addEventListener("mousedown", outsideClickHideHandler, true);
|
|
9225
|
-
});
|
|
9226
|
-
onBeforeUnmount(() => {
|
|
9227
|
-
if (props.isSubMenu) return;
|
|
9228
|
-
globalThis.removeEventListener("mousedown", outsideClickHideHandler, true);
|
|
9229
|
-
});
|
|
9230
|
-
__expose({
|
|
9231
|
-
menu,
|
|
9232
|
-
menuPosition,
|
|
9233
|
-
hide,
|
|
9234
|
-
show,
|
|
9235
|
-
contains,
|
|
9236
|
-
setPosition
|
|
9237
|
-
});
|
|
9238
|
-
return (_ctx, _cache) => {
|
|
9239
|
-
const _component_content_menu = resolveComponent("content-menu", true);
|
|
9240
|
-
return openBlock(), createBlock(Transition, { name: "fade" }, {
|
|
9241
|
-
default: withCtx(() => [
|
|
9242
|
-
withDirectives(createElementVNode("div", {
|
|
9243
|
-
class: "magic-editor-content-menu",
|
|
9244
|
-
ref_key: "menu",
|
|
9245
|
-
ref: menu,
|
|
9246
|
-
style: normalizeStyle(menuStyle.value),
|
|
9247
|
-
onMouseenter: _cache[0] || (_cache[0] = ($event) => mouseenterHandler())
|
|
9248
|
-
}, [
|
|
9249
|
-
renderSlot(_ctx.$slots, "title"),
|
|
9250
|
-
createElementVNode("div", null, [
|
|
9251
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuData, (item, index) => {
|
|
9252
|
-
return openBlock(), createBlock(_sfc_main$y, {
|
|
9253
|
-
"event-type": "mouseup",
|
|
9254
|
-
ref_for: true,
|
|
9255
|
-
ref_key: "buttons",
|
|
9256
|
-
ref: buttons,
|
|
9257
|
-
class: normalizeClass({ active: _ctx.active && item.id === _ctx.active }),
|
|
9258
|
-
data: item,
|
|
9259
|
-
key: index,
|
|
9260
|
-
onMouseup: clickHandler,
|
|
9261
|
-
onMouseenter: ($event) => showSubMenu(item, index)
|
|
9262
|
-
}, null, 8, ["class", "data", "onMouseenter"]);
|
|
9263
|
-
}), 128))
|
|
9264
|
-
]),
|
|
9265
|
-
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
9266
|
-
subMenuData.value.length ? (openBlock(), createBlock(_component_content_menu, {
|
|
9267
|
-
key: 0,
|
|
9268
|
-
class: "sub-menu",
|
|
9269
|
-
ref_key: "subMenu",
|
|
9270
|
-
ref: subMenu,
|
|
9271
|
-
active: _ctx.active,
|
|
9272
|
-
"menu-data": subMenuData.value,
|
|
9273
|
-
"is-sub-menu": true,
|
|
9274
|
-
onHide: hide
|
|
9275
|
-
}, null, 8, ["active", "menu-data"])) : createCommentVNode("", true)
|
|
9276
|
-
]))
|
|
9277
|
-
], 36), [
|
|
9278
|
-
[vShow, visible.value]
|
|
9279
|
-
])
|
|
9280
|
-
]),
|
|
9281
|
-
_: 3
|
|
9282
|
-
});
|
|
9283
|
-
};
|
|
9284
|
-
}
|
|
9285
|
-
});
|
|
9286
|
-
|
|
9287
9654
|
const _hoisted_1$5 = {
|
|
9288
9655
|
width: "1em",
|
|
9289
9656
|
height: "1em",
|
|
@@ -9389,15 +9756,15 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
9389
9756
|
},
|
|
9390
9757
|
__name: "LayerMenu",
|
|
9391
9758
|
props: {
|
|
9392
|
-
layerContentMenu: {
|
|
9393
|
-
customContentMenu: { type: Function
|
|
9759
|
+
layerContentMenu: {},
|
|
9760
|
+
customContentMenu: { type: Function }
|
|
9394
9761
|
},
|
|
9395
9762
|
emits: ["collapse-all"],
|
|
9396
9763
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
9397
9764
|
const props = __props;
|
|
9398
9765
|
const emit = __emit;
|
|
9399
9766
|
const services = inject("services");
|
|
9400
|
-
const menu =
|
|
9767
|
+
const menu = useTemplateRef("menu");
|
|
9401
9768
|
const node = computed(() => services?.editorService.get("node"));
|
|
9402
9769
|
const nodes = computed(() => services?.editorService.get("nodes"));
|
|
9403
9770
|
const componentList = computed(() => services?.componentListService.getList() || []);
|
|
@@ -9479,7 +9846,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
9479
9846
|
show
|
|
9480
9847
|
});
|
|
9481
9848
|
return (_ctx, _cache) => {
|
|
9482
|
-
return openBlock(), createBlock(_sfc_main$
|
|
9849
|
+
return openBlock(), createBlock(_sfc_main$o, {
|
|
9483
9850
|
"menu-data": menuData.value,
|
|
9484
9851
|
ref_key: "menu",
|
|
9485
9852
|
ref: menu,
|
|
@@ -9507,12 +9874,12 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
9507
9874
|
};
|
|
9508
9875
|
return (_ctx, _cache) => {
|
|
9509
9876
|
return _ctx.data.type !== "page" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
9510
|
-
_ctx.data.visible === false ? (openBlock(), createBlock(_sfc_main$
|
|
9877
|
+
_ctx.data.visible === false ? (openBlock(), createBlock(_sfc_main$Z, {
|
|
9511
9878
|
key: 0,
|
|
9512
9879
|
icon: unref(Hide),
|
|
9513
9880
|
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => setNodeVisible(true), ["stop"])),
|
|
9514
9881
|
title: "点击显示"
|
|
9515
|
-
}, null, 8, ["icon"])) : (openBlock(), createBlock(_sfc_main$
|
|
9882
|
+
}, null, 8, ["icon"])) : (openBlock(), createBlock(_sfc_main$Z, {
|
|
9516
9883
|
key: 1,
|
|
9517
9884
|
icon: unref(View),
|
|
9518
9885
|
onClick: _cache[1] || (_cache[1] = withModifiers(($event) => setNodeVisible(false), ["stop"])),
|
|
@@ -9589,7 +9956,7 @@ const useClick = (services, isCtrlKeyDown, nodeStatusMap) => {
|
|
|
9589
9956
|
select(data);
|
|
9590
9957
|
});
|
|
9591
9958
|
};
|
|
9592
|
-
const menu =
|
|
9959
|
+
const menu = useTemplateRef("menu");
|
|
9593
9960
|
return {
|
|
9594
9961
|
menu,
|
|
9595
9962
|
nodeClickHandler,
|
|
@@ -10000,7 +10367,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
10000
10367
|
setup(__props) {
|
|
10001
10368
|
const services = inject("services");
|
|
10002
10369
|
const editorService = services?.editorService;
|
|
10003
|
-
const tree =
|
|
10370
|
+
const tree = useTemplateRef("tree");
|
|
10004
10371
|
const page = computed(() => editorService?.get("page"));
|
|
10005
10372
|
const nodeData = computed(() => !page.value ? [] : [page.value]);
|
|
10006
10373
|
const { nodeStatusMap } = useNodeStatus(services);
|
|
@@ -10036,8 +10403,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
10036
10403
|
return openBlock(), createBlock(unref(TMagicScrollbar), { class: "m-editor-layer-panel" }, {
|
|
10037
10404
|
default: withCtx(() => [
|
|
10038
10405
|
renderSlot(_ctx.$slots, "layer-panel-header"),
|
|
10039
|
-
createVNode(_sfc_main$
|
|
10040
|
-
page.value && unref(nodeStatusMap) ? (openBlock(), createBlock(_sfc_main$
|
|
10406
|
+
createVNode(_sfc_main$n, { onSearch: unref(filterTextChangeHandler) }, null, 8, ["onSearch"]),
|
|
10407
|
+
page.value && unref(nodeStatusMap) ? (openBlock(), createBlock(_sfc_main$l, {
|
|
10041
10408
|
key: 0,
|
|
10042
10409
|
tabindex: "-1",
|
|
10043
10410
|
ref_key: "tree",
|
|
@@ -10159,7 +10526,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
10159
10526
|
return openBlock(), createBlock(unref(TMagicScrollbar), null, {
|
|
10160
10527
|
default: withCtx(() => [
|
|
10161
10528
|
renderSlot(_ctx.$slots, "component-list-panel-header"),
|
|
10162
|
-
createVNode(_sfc_main$
|
|
10529
|
+
createVNode(_sfc_main$n, { onSearch: filterTextChangeHandler }),
|
|
10163
10530
|
renderSlot(_ctx.$slots, "component-list", { componentGroupList: list.value }, () => [
|
|
10164
10531
|
createVNode(unref(TMagicCollapse), {
|
|
10165
10532
|
class: "ui-component-panel",
|
|
@@ -10173,7 +10540,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
10173
10540
|
name: `${index}`
|
|
10174
10541
|
}, {
|
|
10175
10542
|
title: withCtx(() => [
|
|
10176
|
-
createVNode(_sfc_main$
|
|
10543
|
+
createVNode(_sfc_main$Z, { icon: unref(Grid) }, null, 8, ["icon"]),
|
|
10177
10544
|
createTextVNode(toDisplayString(group.title), 1)
|
|
10178
10545
|
]),
|
|
10179
10546
|
default: withCtx(() => [
|
|
@@ -10194,7 +10561,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
10194
10561
|
content: item.desc
|
|
10195
10562
|
}, {
|
|
10196
10563
|
default: withCtx(() => [
|
|
10197
|
-
createVNode(_sfc_main$
|
|
10564
|
+
createVNode(_sfc_main$Z, {
|
|
10198
10565
|
icon: item.icon
|
|
10199
10566
|
}, null, 8, ["icon"])
|
|
10200
10567
|
]),
|
|
@@ -10300,10 +10667,11 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
10300
10667
|
type: "component",
|
|
10301
10668
|
icon: EditPen,
|
|
10302
10669
|
text: "代码编辑",
|
|
10303
|
-
component: _sfc_main$
|
|
10670
|
+
component: _sfc_main$j,
|
|
10304
10671
|
props: {
|
|
10305
10672
|
indent: props.indent,
|
|
10306
|
-
nextLevelIndentIncrement: props.nextLevelIndentIncrement
|
|
10673
|
+
nextLevelIndentIncrement: props.nextLevelIndentIncrement,
|
|
10674
|
+
customContentMenu: props.customContentMenu
|
|
10307
10675
|
},
|
|
10308
10676
|
slots: {}
|
|
10309
10677
|
},
|
|
@@ -10312,10 +10680,11 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
10312
10680
|
type: "component",
|
|
10313
10681
|
icon: Coin,
|
|
10314
10682
|
text: "数据源",
|
|
10315
|
-
component: _sfc_main$
|
|
10683
|
+
component: _sfc_main$g,
|
|
10316
10684
|
props: {
|
|
10317
10685
|
indent: props.indent,
|
|
10318
|
-
nextLevelIndentIncrement: props.nextLevelIndentIncrement
|
|
10686
|
+
nextLevelIndentIncrement: props.nextLevelIndentIncrement,
|
|
10687
|
+
customContentMenu: props.customContentMenu
|
|
10319
10688
|
},
|
|
10320
10689
|
slots: {}
|
|
10321
10690
|
}
|
|
@@ -10383,7 +10752,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
10383
10752
|
(...args) => unref(dragstartHandler) && unref(dragstartHandler)(...args)),
|
|
10384
10753
|
onDragend: ($event) => unref(dragendHandler)(config.$key, $event)
|
|
10385
10754
|
}, [
|
|
10386
|
-
config.icon ? (openBlock(), createBlock(_sfc_main$
|
|
10755
|
+
config.icon ? (openBlock(), createBlock(_sfc_main$Z, {
|
|
10387
10756
|
key: 0,
|
|
10388
10757
|
icon: config.icon
|
|
10389
10758
|
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
@@ -10529,7 +10898,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
10529
10898
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
10530
10899
|
(openBlock(true), createElementBlock(Fragment, null, renderList(sideBarItems.value, (config, index) => {
|
|
10531
10900
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
10532
|
-
unref(floatBoxStates)[config.$key]?.status ? (openBlock(), createBlock(_sfc_main$
|
|
10901
|
+
unref(floatBoxStates)[config.$key]?.status ? (openBlock(), createBlock(_sfc_main$R, {
|
|
10533
10902
|
key: config.$key ?? index,
|
|
10534
10903
|
visible: unref(floatBoxStates)[config.$key].status,
|
|
10535
10904
|
"onUpdate:visible": ($event) => unref(floatBoxStates)[config.$key].status = $event,
|
|
@@ -10575,8 +10944,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
10575
10944
|
setup(__props, { emit: __emit }) {
|
|
10576
10945
|
const props = __props;
|
|
10577
10946
|
const emit = __emit;
|
|
10578
|
-
const bar =
|
|
10579
|
-
const thumb =
|
|
10947
|
+
const bar = useTemplateRef("bar");
|
|
10948
|
+
const thumb = useTemplateRef("thumb");
|
|
10580
10949
|
const thumbSize = computed(() => props.size * (props.size / props.scrollSize));
|
|
10581
10950
|
const thumbPos = computed(() => props.pos / props.scrollSize * props.size);
|
|
10582
10951
|
const thumbStyle = computed(() => ({
|
|
@@ -10664,8 +11033,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
10664
11033
|
},
|
|
10665
11034
|
setup(__props, { expose: __expose }) {
|
|
10666
11035
|
const props = __props;
|
|
10667
|
-
const container =
|
|
10668
|
-
const el =
|
|
11036
|
+
const container = useTemplateRef("container");
|
|
11037
|
+
const el = useTemplateRef("el");
|
|
10669
11038
|
const style = computed(
|
|
10670
11039
|
() => `
|
|
10671
11040
|
width: ${isNumber(`${props.width}`) ? `${props.width}px` : props.width};
|
|
@@ -10759,8 +11128,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
10759
11128
|
const editorService = services?.editorService;
|
|
10760
11129
|
const visible = ref(false);
|
|
10761
11130
|
const buttonVisible = ref(false);
|
|
10762
|
-
const button =
|
|
10763
|
-
const box =
|
|
11131
|
+
const button = useTemplateRef("button");
|
|
11132
|
+
const box = useTemplateRef("box");
|
|
10764
11133
|
const stage = computed(() => editorService?.get("stage"));
|
|
10765
11134
|
const page = computed(() => editorService?.get("page"));
|
|
10766
11135
|
const nodes = computed(() => editorService?.get("nodes") || []);
|
|
@@ -10832,7 +11201,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
10832
11201
|
]),
|
|
10833
11202
|
_: 1
|
|
10834
11203
|
})) : createCommentVNode("", true),
|
|
10835
|
-
page.value && unref(nodeStatusMap) && buttonVisible.value ? (openBlock(), createBlock(_sfc_main$
|
|
11204
|
+
page.value && unref(nodeStatusMap) && buttonVisible.value ? (openBlock(), createBlock(_sfc_main$R, {
|
|
10836
11205
|
key: 1,
|
|
10837
11206
|
ref_key: "box",
|
|
10838
11207
|
ref: box,
|
|
@@ -10842,7 +11211,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
10842
11211
|
position: menuPosition.value
|
|
10843
11212
|
}, {
|
|
10844
11213
|
body: withCtx(() => [
|
|
10845
|
-
createVNode(_sfc_main$
|
|
11214
|
+
createVNode(_sfc_main$l, {
|
|
10846
11215
|
class: "m-editor-node-list-menu magic-editor-layer-tree",
|
|
10847
11216
|
data: nodeData.value,
|
|
10848
11217
|
"node-status-map": unref(nodeStatusMap),
|
|
@@ -10861,7 +11230,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
10861
11230
|
setup(__props) {
|
|
10862
11231
|
const services = inject("services");
|
|
10863
11232
|
const stageOptions = inject("stageOptions");
|
|
10864
|
-
const stageOverlay =
|
|
11233
|
+
const stageOverlay = useTemplateRef("stageOverlay");
|
|
10865
11234
|
const stageOverlayVisible = computed(() => services?.stageOverlayService.get("stageOverlayVisible"));
|
|
10866
11235
|
const wrapWidth = computed(() => services?.stageOverlayService.get("wrapWidth") || 0);
|
|
10867
11236
|
const wrapHeight = computed(() => services?.stageOverlayService.get("wrapHeight") || 0);
|
|
@@ -10975,14 +11344,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
10975
11344
|
__name: "ViewerMenu",
|
|
10976
11345
|
props: {
|
|
10977
11346
|
isMultiSelect: { type: Boolean, default: false },
|
|
10978
|
-
stageContentMenu: {
|
|
10979
|
-
customContentMenu: {
|
|
11347
|
+
stageContentMenu: {},
|
|
11348
|
+
customContentMenu: {}
|
|
10980
11349
|
},
|
|
10981
11350
|
setup(__props, { expose: __expose }) {
|
|
10982
11351
|
const props = __props;
|
|
10983
11352
|
const services = inject("services");
|
|
10984
11353
|
const editorService = services?.editorService;
|
|
10985
|
-
const menu =
|
|
11354
|
+
const menu = useTemplateRef("menu");
|
|
10986
11355
|
const canCenter = ref(false);
|
|
10987
11356
|
const node = computed(() => editorService?.get("node"));
|
|
10988
11357
|
const nodes = computed(() => editorService?.get("nodes"));
|
|
@@ -11087,7 +11456,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
11087
11456
|
};
|
|
11088
11457
|
__expose({ show });
|
|
11089
11458
|
return (_ctx, _cache) => {
|
|
11090
|
-
return openBlock(), createBlock(_sfc_main$
|
|
11459
|
+
return openBlock(), createBlock(_sfc_main$o, {
|
|
11091
11460
|
"menu-data": menuData.value,
|
|
11092
11461
|
ref_key: "menu",
|
|
11093
11462
|
ref: menu
|
|
@@ -11113,9 +11482,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11113
11482
|
let runtime = null;
|
|
11114
11483
|
const services = inject("services");
|
|
11115
11484
|
const stageLoading = computed(() => services?.editorService.get("stageLoading") || false);
|
|
11116
|
-
const stageWrap =
|
|
11117
|
-
const stageContainer =
|
|
11118
|
-
const menu =
|
|
11485
|
+
const stageWrap = useTemplateRef("stageWrap");
|
|
11486
|
+
const stageContainer = useTemplateRef("stageContainer");
|
|
11487
|
+
const menu = useTemplateRef("menu");
|
|
11119
11488
|
const nodes = computed(() => services?.editorService.get("nodes") || []);
|
|
11120
11489
|
const isMultiSelect = computed(() => nodes.value.length > 1);
|
|
11121
11490
|
const stageRect = computed(() => services?.uiService.get("stageRect"));
|
|
@@ -11273,7 +11642,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11273
11642
|
width: 60,
|
|
11274
11643
|
height: 50
|
|
11275
11644
|
},
|
|
11276
|
-
onClick: _cache[0] || (_cache[0] = ($event) => stageWrap
|
|
11645
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(stageWrap)?.container?.focus())
|
|
11277
11646
|
}, {
|
|
11278
11647
|
content: withCtx(() => [
|
|
11279
11648
|
!_ctx.disabledStageOverlay ? (openBlock(), createBlock(_sfc_main$6, { key: 0 })) : createCommentVNode("", true),
|
|
@@ -12346,7 +12715,8 @@ const defaultEditorProps = {
|
|
|
12346
12715
|
datasourceConfigs: () => ({}),
|
|
12347
12716
|
canSelect: (el) => Boolean(getIdFromEl()(el)),
|
|
12348
12717
|
isContainer: (el) => el.classList.contains("magic-ui-container"),
|
|
12349
|
-
codeOptions: () => ({})
|
|
12718
|
+
codeOptions: () => ({}),
|
|
12719
|
+
customContentMenu: (menus) => menus
|
|
12350
12720
|
};
|
|
12351
12721
|
|
|
12352
12722
|
const initServiceState = (props, {
|
|
@@ -12851,9 +13221,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12851
13221
|
provide("codeOptions", props.codeOptions);
|
|
12852
13222
|
provide("stageOptions", stageOptions);
|
|
12853
13223
|
provide("eventBus", new EventEmitter());
|
|
13224
|
+
const propsPanelMountedHandler = (e) => {
|
|
13225
|
+
emit("props-panel-mounted", e);
|
|
13226
|
+
};
|
|
13227
|
+
const propsPanelSubmitErrorHandler = (e) => {
|
|
13228
|
+
emit("props-submit-error", e);
|
|
13229
|
+
};
|
|
13230
|
+
const propsPanelFormErrorHandler = (e) => {
|
|
13231
|
+
emit("props-form-error", e);
|
|
13232
|
+
};
|
|
12854
13233
|
__expose(services);
|
|
12855
13234
|
return (_ctx, _cache) => {
|
|
12856
|
-
return openBlock(), createBlock(_sfc_main$
|
|
13235
|
+
return openBlock(), createBlock(_sfc_main$s, {
|
|
12857
13236
|
"disabled-page-fragment": _ctx.disabledPageFragment,
|
|
12858
13237
|
"page-bar-sort-options": _ctx.pageBarSortOptions,
|
|
12859
13238
|
"page-filter-function": _ctx.pageFilterFunction
|
|
@@ -12863,7 +13242,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12863
13242
|
]),
|
|
12864
13243
|
nav: withCtx(() => [
|
|
12865
13244
|
renderSlot(_ctx.$slots, "nav", { editorService: unref(editorService) }, () => [
|
|
12866
|
-
createVNode(_sfc_main$
|
|
13245
|
+
createVNode(_sfc_main$r, { data: _ctx.menu }, null, 8, ["data"])
|
|
12867
13246
|
])
|
|
12868
13247
|
]),
|
|
12869
13248
|
"content-before": withCtx(() => [
|
|
@@ -12946,9 +13325,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12946
13325
|
createVNode(_sfc_main$p, {
|
|
12947
13326
|
"extend-state": _ctx.extendFormState,
|
|
12948
13327
|
"disabled-show-src": _ctx.disabledShowSrc,
|
|
12949
|
-
onMounted:
|
|
12950
|
-
onFormError:
|
|
12951
|
-
onSubmitError:
|
|
13328
|
+
onMounted: propsPanelMountedHandler,
|
|
13329
|
+
onFormError: propsPanelFormErrorHandler,
|
|
13330
|
+
onSubmitError: propsPanelSubmitErrorHandler
|
|
12952
13331
|
}, {
|
|
12953
13332
|
"props-panel-header": withCtx(() => [
|
|
12954
13333
|
renderSlot(_ctx.$slots, "props-panel-header")
|
|
@@ -13000,25 +13379,25 @@ const index = {
|
|
|
13000
13379
|
app.config.globalProperties.$TMAGIC_EDITOR = option;
|
|
13001
13380
|
setEditorConfig(option);
|
|
13002
13381
|
app.component(`${_sfc_main.name || "MEditor"}`, _sfc_main);
|
|
13003
|
-
app.component("magic-code-editor", _sfc_main$
|
|
13004
|
-
app.component("m-fields-ui-select", _sfc_main$
|
|
13005
|
-
app.component("m-fields-code-link", _sfc_main$
|
|
13006
|
-
app.component("m-fields-vs-code", _sfc_main$
|
|
13007
|
-
app.component("m-fields-code-select", _sfc_main$
|
|
13008
|
-
app.component("m-fields-code-select-col", _sfc_main$
|
|
13009
|
-
app.component("m-fields-event-select", _sfc_main$
|
|
13010
|
-
app.component("m-fields-data-source-fields", _sfc_main$
|
|
13011
|
-
app.component("m-fields-data-source-mocks", _sfc_main$
|
|
13012
|
-
app.component("m-fields-key-value", _sfc_main$
|
|
13013
|
-
app.component("m-fields-data-source-input", _sfc_main$
|
|
13014
|
-
app.component("m-fields-data-source-select", _sfc_main$
|
|
13015
|
-
app.component("m-fields-data-source-methods", _sfc_main$
|
|
13016
|
-
app.component("m-fields-data-source-method-select", _sfc_main$
|
|
13017
|
-
app.component("m-fields-data-source-field-select", _sfc_main$
|
|
13018
|
-
app.component("m-fields-page-fragment-select", _sfc_main$
|
|
13019
|
-
app.component("m-fields-display-conds", _sfc_main$
|
|
13020
|
-
app.component("m-fields-cond-op-select", _sfc_main$
|
|
13382
|
+
app.component("magic-code-editor", _sfc_main$Y);
|
|
13383
|
+
app.component("m-fields-ui-select", _sfc_main$C);
|
|
13384
|
+
app.component("m-fields-code-link", _sfc_main$W);
|
|
13385
|
+
app.component("m-fields-vs-code", _sfc_main$X);
|
|
13386
|
+
app.component("m-fields-code-select", _sfc_main$V);
|
|
13387
|
+
app.component("m-fields-code-select-col", _sfc_main$T);
|
|
13388
|
+
app.component("m-fields-event-select", _sfc_main$G);
|
|
13389
|
+
app.component("m-fields-data-source-fields", _sfc_main$Q);
|
|
13390
|
+
app.component("m-fields-data-source-mocks", _sfc_main$J);
|
|
13391
|
+
app.component("m-fields-key-value", _sfc_main$E);
|
|
13392
|
+
app.component("m-fields-data-source-input", _sfc_main$N);
|
|
13393
|
+
app.component("m-fields-data-source-select", _sfc_main$I);
|
|
13394
|
+
app.component("m-fields-data-source-methods", _sfc_main$L);
|
|
13395
|
+
app.component("m-fields-data-source-method-select", _sfc_main$K);
|
|
13396
|
+
app.component("m-fields-data-source-field-select", _sfc_main$O);
|
|
13397
|
+
app.component("m-fields-page-fragment-select", _sfc_main$D);
|
|
13398
|
+
app.component("m-fields-display-conds", _sfc_main$H);
|
|
13399
|
+
app.component("m-fields-cond-op-select", _sfc_main$S);
|
|
13021
13400
|
}
|
|
13022
13401
|
};
|
|
13023
13402
|
|
|
13024
|
-
export { CODE_DRAFT_STORAGE_KEY, COPY_CODE_STORAGE_KEY, COPY_DS_STORAGE_KEY, COPY_STORAGE_KEY, _sfc_main$
|
|
13403
|
+
export { CODE_DRAFT_STORAGE_KEY, COPY_CODE_STORAGE_KEY, COPY_DS_STORAGE_KEY, COPY_STORAGE_KEY, _sfc_main$M as CodeBlockEditor, _sfc_main$k as CodeBlockList, _sfc_main$j as CodeBlockListPanel, CodeDeleteErrorType, _sfc_main$V as CodeSelect, _sfc_main$T as CodeSelectCol, ColumnLayout, _sfc_main$b as ComponentListPanel, _sfc_main$S as CondOpSelect, _sfc_main$o as ContentMenu, _sfc_main$i as DataSourceConfigPanel, _sfc_main$O as DataSourceFieldSelect, _sfc_main$Q as DataSourceFields, _sfc_main$N as DataSourceInput, _sfc_main$K as DataSourceMethodSelect, _sfc_main$L as DataSourceMethods, _sfc_main$J as DataSourceMocks, _sfc_main$I as DataSourceSelect, _sfc_main$H as DisplayConds, DragType, _sfc_main$G as EventSelect, Fixed2Other, _sfc_main$R as FloatingBox, H_GUIDE_LINE_STORAGE_KEY, _sfc_main$Z as Icon, IdleTask, KeyBindingCommand, _sfc_main$E as KeyValue, Keys, LayerOffset, _sfc_main$c as LayerPanel, Layout, _sfc_main$A as LayoutContainer, _sfc_main$D as PageFragmentSelect, _sfc_main$q as PropsFormPanel, _sfc_main$p as PropsPanel, _sfc_main$B as Resizer, ScrollViewer, SideItemKey, _sfc_main$A as SplitView, _sfc_main$Y as TMagicCodeEditor, _sfc_main as TMagicEditor, _sfc_main$z as ToolButton, _sfc_main$l as Tree, _sfc_main$m as TreeNode, UI_SELECT_MODE_EVENT_NAME, UndoRedo, V_GUIDE_LINE_STORAGE_KEY, advancedTabConfig, arrayOptions, beforePaste, change2Fixed, codeBlockService, dataSourceService, debug, index as default, depService, displayTabConfig, editorService, eqOptions, error, eventTabConfig, eventsService, fillConfig$1 as fillConfig, fixNodeLeft, fixNodePosition, generatePageName, generatePageNameByApp, getAddParent, getCascaderOptionsFromFields, getDefaultConfig, getDisplayField, getEditorConfig, getFormConfig, getFormValue, getGuideLineFromCache, getInitPositionStyle, getNodeIndex, getPageFragmentList, getPageList, getPageNameList, getPositionInContainer, getRelativeStyle, historyService, info, isIncludeDataSource, log, moveItemsInContainer, numberOptions, propsService, removeDataSourceFieldPrefix, serializeConfig, setChildrenLayout, setEditorConfig, setLayout, stageOverlayService, storageService, styleTabConfig, uiService, updateStatus, useCodeBlockEdit, useEditorContentHeight, useFilter, useFloatBox, useGetSo, useNextFloatBoxPosition, useNodeStatus$1 as useNodeStatus, useStage, useWindowRect, warn };
|