@tmagic/editor 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{style.css → tmagic-editor.css} +153 -6
- package/dist/tmagic-editor.js +906 -527
- package/dist/tmagic-editor.umd.cjs +931 -551
- 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/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
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
|
|
24
24
|
const monaco__namespace = /*#__PURE__*/_interopNamespaceDefault(monaco);
|
|
25
25
|
|
|
26
|
-
const _hoisted_1$
|
|
27
|
-
const _sfc_main$
|
|
26
|
+
const _hoisted_1$y = ["src"];
|
|
27
|
+
const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
|
|
28
28
|
...{
|
|
29
29
|
name: "MEditorIcon"
|
|
30
30
|
},
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
class: "magic-editor-icon"
|
|
49
49
|
}, {
|
|
50
50
|
default: vue.withCtx(() => [
|
|
51
|
-
vue.createElementVNode("img", { src: _ctx.icon }, null, 8, _hoisted_1$
|
|
51
|
+
vue.createElementVNode("img", { src: _ctx.icon }, null, 8, _hoisted_1$y)
|
|
52
52
|
]),
|
|
53
53
|
_: 1
|
|
54
54
|
})) : typeof _ctx.icon === "string" ? (vue.openBlock(), vue.createElementBlock("i", {
|
|
@@ -76,10 +76,10 @@
|
|
|
76
76
|
emmetMonacoEs.emmetHTML(monaco__namespace);
|
|
77
77
|
emmetMonacoEs.emmetCSS(monaco__namespace, ["css", "scss"]);
|
|
78
78
|
|
|
79
|
-
const _hoisted_1$
|
|
79
|
+
const _hoisted_1$x = {
|
|
80
80
|
class: /* @__PURE__ */ vue.normalizeClass(`magic-code-editor`)
|
|
81
81
|
};
|
|
82
|
-
const _sfc_main$
|
|
82
|
+
const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
|
|
83
83
|
...{
|
|
84
84
|
name: "MEditorCodeEditor"
|
|
85
85
|
},
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
let vsDiffEditor = null;
|
|
133
133
|
const values = vue.ref("");
|
|
134
134
|
const loading = vue.ref(false);
|
|
135
|
-
const codeEditor = vue.
|
|
135
|
+
const codeEditor = vue.useTemplateRef("codeEditor");
|
|
136
136
|
const resizeObserver = new globalThis.ResizeObserver(
|
|
137
137
|
lodashEs.throttle(() => {
|
|
138
138
|
vsEditor?.layout();
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
}
|
|
237
237
|
});
|
|
238
238
|
return (_ctx, _cache) => {
|
|
239
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
239
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$x, [
|
|
240
240
|
(vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
241
241
|
to: "body",
|
|
242
242
|
disabled: !fullScreen.value
|
|
@@ -252,7 +252,7 @@
|
|
|
252
252
|
onClick: fullScreenHandler
|
|
253
253
|
}, {
|
|
254
254
|
default: vue.withCtx(() => [
|
|
255
|
-
vue.createVNode(_sfc_main$
|
|
255
|
+
vue.createVNode(_sfc_main$Z, { icon: vue.unref(iconsVue.FullScreen) }, null, 8, ["icon"])
|
|
256
256
|
]),
|
|
257
257
|
_: 1
|
|
258
258
|
}),
|
|
@@ -268,7 +268,7 @@
|
|
|
268
268
|
}
|
|
269
269
|
});
|
|
270
270
|
|
|
271
|
-
const _sfc_main$
|
|
271
|
+
const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
|
|
272
272
|
...{
|
|
273
273
|
name: "MFieldsVsCode"
|
|
274
274
|
},
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
emit("change", v);
|
|
292
292
|
};
|
|
293
293
|
return (_ctx, _cache) => {
|
|
294
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
294
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$Y, {
|
|
295
295
|
height: _ctx.config.height,
|
|
296
296
|
"init-values": _ctx.model[_ctx.name],
|
|
297
297
|
language: _ctx.config.language,
|
|
@@ -306,7 +306,7 @@
|
|
|
306
306
|
}
|
|
307
307
|
});
|
|
308
308
|
|
|
309
|
-
const _sfc_main$
|
|
309
|
+
const _sfc_main$W = /* @__PURE__ */ vue.defineComponent({
|
|
310
310
|
...{
|
|
311
311
|
name: "MFieldsCodeLink"
|
|
312
312
|
},
|
|
@@ -385,7 +385,7 @@
|
|
|
385
385
|
}
|
|
386
386
|
});
|
|
387
387
|
|
|
388
|
-
const _sfc_main$
|
|
388
|
+
const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
|
|
389
389
|
...{
|
|
390
390
|
name: "MFieldsCodeSelect"
|
|
391
391
|
},
|
|
@@ -524,6 +524,7 @@
|
|
|
524
524
|
];
|
|
525
525
|
const styleTabConfig = {
|
|
526
526
|
title: "样式",
|
|
527
|
+
display: ({ services }) => !(services.uiService.get("showStylePanel") ?? true),
|
|
527
528
|
items: [
|
|
528
529
|
{
|
|
529
530
|
name: "style",
|
|
@@ -536,6 +537,7 @@
|
|
|
536
537
|
type: "data-source-field-select",
|
|
537
538
|
name: "position",
|
|
538
539
|
text: "固定定位",
|
|
540
|
+
labelPosition: "left",
|
|
539
541
|
checkStrictly: false,
|
|
540
542
|
dataSourceFieldType: ["string"],
|
|
541
543
|
fieldConfig: {
|
|
@@ -593,6 +595,27 @@
|
|
|
593
595
|
type: "fieldset",
|
|
594
596
|
legend: "盒子",
|
|
595
597
|
items: [
|
|
598
|
+
{
|
|
599
|
+
type: "data-source-field-select",
|
|
600
|
+
name: "display",
|
|
601
|
+
text: "display",
|
|
602
|
+
checkStrictly: false,
|
|
603
|
+
dataSourceFieldType: ["string"],
|
|
604
|
+
fieldConfig: {
|
|
605
|
+
type: "select",
|
|
606
|
+
clearable: true,
|
|
607
|
+
allowCreate: true,
|
|
608
|
+
options: [
|
|
609
|
+
{ text: "block", value: "block" },
|
|
610
|
+
{ text: "flex", value: "flex" },
|
|
611
|
+
{ text: "none", value: "none" },
|
|
612
|
+
{ text: "inline-block", value: "inline-block" },
|
|
613
|
+
{ text: "grid", value: "grid" },
|
|
614
|
+
{ text: "inline", value: "inline" },
|
|
615
|
+
{ text: "initial", value: "initial" }
|
|
616
|
+
]
|
|
617
|
+
}
|
|
618
|
+
},
|
|
596
619
|
{
|
|
597
620
|
type: "data-source-field-select",
|
|
598
621
|
name: "width",
|
|
@@ -621,13 +644,16 @@
|
|
|
621
644
|
dataSourceFieldType: ["string"],
|
|
622
645
|
fieldConfig: {
|
|
623
646
|
type: "select",
|
|
647
|
+
clearable: true,
|
|
648
|
+
allowCreate: true,
|
|
624
649
|
options: [
|
|
625
650
|
{ text: "visible", value: "visible" },
|
|
626
651
|
{ text: "hidden", value: "hidden" },
|
|
627
652
|
{ text: "clip", value: "clip" },
|
|
628
653
|
{ text: "scroll", value: "scroll" },
|
|
629
654
|
{ text: "auto", value: "auto" },
|
|
630
|
-
{ text: "overlay", value: "overlay" }
|
|
655
|
+
{ text: "overlay", value: "overlay" },
|
|
656
|
+
{ text: "initial", value: "initial" }
|
|
631
657
|
]
|
|
632
658
|
}
|
|
633
659
|
}
|
|
@@ -694,7 +720,7 @@
|
|
|
694
720
|
checkStrictly: false,
|
|
695
721
|
dataSourceFieldType: ["string"],
|
|
696
722
|
fieldConfig: {
|
|
697
|
-
type: "
|
|
723
|
+
type: "img-upload"
|
|
698
724
|
}
|
|
699
725
|
},
|
|
700
726
|
{
|
|
@@ -823,11 +849,13 @@
|
|
|
823
849
|
{
|
|
824
850
|
name: "created",
|
|
825
851
|
text: "created",
|
|
852
|
+
labelPosition: "top",
|
|
826
853
|
type: "code-select"
|
|
827
854
|
},
|
|
828
855
|
{
|
|
829
856
|
name: "mounted",
|
|
830
857
|
text: "mounted",
|
|
858
|
+
labelPosition: "top",
|
|
831
859
|
type: "code-select"
|
|
832
860
|
}
|
|
833
861
|
]
|
|
@@ -861,8 +889,21 @@
|
|
|
861
889
|
// 组件id,必须要有
|
|
862
890
|
{
|
|
863
891
|
name: "id",
|
|
864
|
-
|
|
865
|
-
|
|
892
|
+
text: "ID",
|
|
893
|
+
type: "text",
|
|
894
|
+
disabled: true,
|
|
895
|
+
append: {
|
|
896
|
+
type: "button",
|
|
897
|
+
text: "复制",
|
|
898
|
+
handler: async (vm, { model }) => {
|
|
899
|
+
try {
|
|
900
|
+
await navigator.clipboard.writeText(`${model.id}`);
|
|
901
|
+
designPlugin.tMagicMessage.success("已复制");
|
|
902
|
+
} catch (err) {
|
|
903
|
+
designPlugin.tMagicMessage.error("复制失败");
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
}
|
|
866
907
|
},
|
|
867
908
|
{
|
|
868
909
|
name: "name",
|
|
@@ -1753,7 +1794,8 @@
|
|
|
1753
1794
|
case "number" /* NUMBER */:
|
|
1754
1795
|
return Number(item);
|
|
1755
1796
|
case "boolean" /* BOOLEAN */:
|
|
1756
|
-
|
|
1797
|
+
if (item === "true") return true;
|
|
1798
|
+
if (item === "false") return false;
|
|
1757
1799
|
default:
|
|
1758
1800
|
return item;
|
|
1759
1801
|
}
|
|
@@ -3226,7 +3268,7 @@
|
|
|
3226
3268
|
});
|
|
3227
3269
|
};
|
|
3228
3270
|
|
|
3229
|
-
const _sfc_main$
|
|
3271
|
+
const _sfc_main$U = /* @__PURE__ */ vue.defineComponent({
|
|
3230
3272
|
...{
|
|
3231
3273
|
name: "MEditorCodeParams"
|
|
3232
3274
|
},
|
|
@@ -3242,7 +3284,7 @@
|
|
|
3242
3284
|
setup(__props, { emit: __emit }) {
|
|
3243
3285
|
const props = __props;
|
|
3244
3286
|
const emit = __emit;
|
|
3245
|
-
const form = vue.
|
|
3287
|
+
const form = vue.useTemplateRef("form");
|
|
3246
3288
|
const getFormConfig = (items = []) => [
|
|
3247
3289
|
{
|
|
3248
3290
|
type: "fieldset",
|
|
@@ -3286,9 +3328,9 @@
|
|
|
3286
3328
|
}
|
|
3287
3329
|
});
|
|
3288
3330
|
|
|
3289
|
-
const _hoisted_1$
|
|
3290
|
-
const _hoisted_2$
|
|
3291
|
-
const _sfc_main$
|
|
3331
|
+
const _hoisted_1$w = { class: "m-fields-code-select-col" };
|
|
3332
|
+
const _hoisted_2$i = { class: "code-select-container" };
|
|
3333
|
+
const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
|
|
3292
3334
|
...{
|
|
3293
3335
|
name: "MFieldsCodeSelectCol"
|
|
3294
3336
|
},
|
|
@@ -3384,8 +3426,8 @@
|
|
|
3384
3426
|
eventBus?.emit("edit-code", id);
|
|
3385
3427
|
};
|
|
3386
3428
|
return (_ctx, _cache) => {
|
|
3387
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
3388
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3429
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$w, [
|
|
3430
|
+
vue.createElementVNode("div", _hoisted_2$i, [
|
|
3389
3431
|
vue.createVNode(vue.unref(formPlugin.MContainer), {
|
|
3390
3432
|
class: "select",
|
|
3391
3433
|
config: selectConfig,
|
|
@@ -3400,14 +3442,14 @@
|
|
|
3400
3442
|
onClick: _cache[0] || (_cache[0] = ($event) => editCode(_ctx.model[_ctx.name]))
|
|
3401
3443
|
}, {
|
|
3402
3444
|
default: vue.withCtx(() => [
|
|
3403
|
-
vue.createVNode(_sfc_main$
|
|
3445
|
+
vue.createVNode(_sfc_main$Z, {
|
|
3404
3446
|
icon: !notEditable.value ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View)
|
|
3405
3447
|
}, null, 8, ["icon"])
|
|
3406
3448
|
]),
|
|
3407
3449
|
_: 1
|
|
3408
3450
|
}, 8, ["size"])) : vue.createCommentVNode("", true)
|
|
3409
3451
|
]),
|
|
3410
|
-
paramsConfig.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3452
|
+
paramsConfig.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$U, {
|
|
3411
3453
|
name: "params",
|
|
3412
3454
|
key: _ctx.model[_ctx.name],
|
|
3413
3455
|
model: _ctx.model,
|
|
@@ -3420,7 +3462,7 @@
|
|
|
3420
3462
|
}
|
|
3421
3463
|
});
|
|
3422
3464
|
|
|
3423
|
-
const _sfc_main$
|
|
3465
|
+
const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
|
|
3424
3466
|
...{
|
|
3425
3467
|
name: "MFieldsCondOpSelect"
|
|
3426
3468
|
},
|
|
@@ -3506,7 +3548,7 @@
|
|
|
3506
3548
|
}
|
|
3507
3549
|
});
|
|
3508
3550
|
|
|
3509
|
-
const _sfc_main$
|
|
3551
|
+
const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
|
|
3510
3552
|
__name: "FloatingBox",
|
|
3511
3553
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
3512
3554
|
position: { default: () => ({ left: 0, top: 0 }) },
|
|
@@ -3526,8 +3568,8 @@
|
|
|
3526
3568
|
const height = vue.useModel(__props, "height");
|
|
3527
3569
|
const visible = vue.useModel(__props, "visible");
|
|
3528
3570
|
const props = __props;
|
|
3529
|
-
const target = vue.
|
|
3530
|
-
const titleEl = vue.
|
|
3571
|
+
const target = vue.useTemplateRef("target");
|
|
3572
|
+
const titleEl = vue.useTemplateRef("titleEl");
|
|
3531
3573
|
const zIndex = designPlugin.useZIndex();
|
|
3532
3574
|
const curZIndex = vue.ref(0);
|
|
3533
3575
|
const titleHeight = vue.ref(0);
|
|
@@ -3661,7 +3703,7 @@
|
|
|
3661
3703
|
onClick: closeHandler
|
|
3662
3704
|
}, {
|
|
3663
3705
|
default: vue.withCtx(() => [
|
|
3664
|
-
vue.createVNode(_sfc_main$
|
|
3706
|
+
vue.createVNode(_sfc_main$Z, { icon: vue.unref(iconsVue.Close) }, null, 8, ["icon"])
|
|
3665
3707
|
]),
|
|
3666
3708
|
_: 1
|
|
3667
3709
|
})
|
|
@@ -3682,7 +3724,7 @@
|
|
|
3682
3724
|
const useCodeBlockEdit = (codeBlockService) => {
|
|
3683
3725
|
const codeConfig = vue.ref();
|
|
3684
3726
|
const codeId = vue.ref();
|
|
3685
|
-
const codeBlockEditor = vue.
|
|
3727
|
+
const codeBlockEditor = vue.useTemplateRef("codeBlockEditor");
|
|
3686
3728
|
const createCodeBlock = async () => {
|
|
3687
3729
|
if (!codeBlockService) {
|
|
3688
3730
|
designPlugin.tMagicMessage.error("新增代码块失败");
|
|
@@ -3739,6 +3781,7 @@
|
|
|
3739
3781
|
const state = vue.reactive({
|
|
3740
3782
|
uiSelectMode: false,
|
|
3741
3783
|
showSrc: false,
|
|
3784
|
+
showStylePanel: true,
|
|
3742
3785
|
zoom: 1,
|
|
3743
3786
|
stageContainerRect: {
|
|
3744
3787
|
width: 0,
|
|
@@ -4101,7 +4144,7 @@
|
|
|
4101
4144
|
|
|
4102
4145
|
const useGetSo = (target, emit) => {
|
|
4103
4146
|
let getso;
|
|
4104
|
-
const
|
|
4147
|
+
const isDragging = vue.ref(false);
|
|
4105
4148
|
vue.onMounted(() => {
|
|
4106
4149
|
if (!target.value) return;
|
|
4107
4150
|
getso = new Gesto(target.value, {
|
|
@@ -4111,17 +4154,17 @@
|
|
|
4111
4154
|
if (!target.value) return;
|
|
4112
4155
|
emit("change", e);
|
|
4113
4156
|
}).on("dragStart", () => {
|
|
4114
|
-
|
|
4157
|
+
isDragging.value = true;
|
|
4115
4158
|
}).on("dragEnd", () => {
|
|
4116
|
-
|
|
4159
|
+
isDragging.value = false;
|
|
4117
4160
|
});
|
|
4118
4161
|
});
|
|
4119
4162
|
vue.onBeforeUnmount(() => {
|
|
4120
4163
|
getso?.unset();
|
|
4121
|
-
|
|
4164
|
+
isDragging.value = false;
|
|
4122
4165
|
});
|
|
4123
4166
|
return {
|
|
4124
|
-
|
|
4167
|
+
isDragging
|
|
4125
4168
|
};
|
|
4126
4169
|
};
|
|
4127
4170
|
|
|
@@ -4183,9 +4226,9 @@
|
|
|
4183
4226
|
};
|
|
4184
4227
|
};
|
|
4185
4228
|
|
|
4186
|
-
const _hoisted_1$
|
|
4187
|
-
const _hoisted_2$
|
|
4188
|
-
const _sfc_main$
|
|
4229
|
+
const _hoisted_1$v = { class: "m-editor-data-source-fields" };
|
|
4230
|
+
const _hoisted_2$h = { class: "m-editor-data-source-fields-footer" };
|
|
4231
|
+
const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
|
|
4189
4232
|
...{
|
|
4190
4233
|
name: "MFieldsDataSourceFields"
|
|
4191
4234
|
},
|
|
@@ -4449,12 +4492,12 @@
|
|
|
4449
4492
|
const parentFloating = vue.inject("parentFloating", vue.ref(null));
|
|
4450
4493
|
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
|
|
4451
4494
|
return (_ctx, _cache) => {
|
|
4452
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
4495
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$v, [
|
|
4453
4496
|
vue.createVNode(vue.unref(tablePlugin.MagicTable), {
|
|
4454
4497
|
data: _ctx.model[_ctx.name],
|
|
4455
4498
|
columns: fieldColumns
|
|
4456
4499
|
}, null, 8, ["data"]),
|
|
4457
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
4500
|
+
vue.createElementVNode("div", _hoisted_2$h, [
|
|
4458
4501
|
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
4459
4502
|
size: "small",
|
|
4460
4503
|
disabled: _ctx.disabled,
|
|
@@ -4479,7 +4522,7 @@
|
|
|
4479
4522
|
_: 1
|
|
4480
4523
|
}, 8, ["disabled"])
|
|
4481
4524
|
]),
|
|
4482
|
-
vue.createVNode(_sfc_main$
|
|
4525
|
+
vue.createVNode(_sfc_main$R, {
|
|
4483
4526
|
visible: addDialogVisible.value,
|
|
4484
4527
|
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => addDialogVisible.value = $event),
|
|
4485
4528
|
width: width.value,
|
|
@@ -4502,7 +4545,7 @@
|
|
|
4502
4545
|
]),
|
|
4503
4546
|
_: 1
|
|
4504
4547
|
}, 8, ["visible", "width", "height", "title", "position"]),
|
|
4505
|
-
vue.createVNode(_sfc_main$
|
|
4548
|
+
vue.createVNode(_sfc_main$R, {
|
|
4506
4549
|
visible: addFromJsonDialogVisible.value,
|
|
4507
4550
|
"onUpdate:visible": _cache[5] || (_cache[5] = ($event) => addFromJsonDialogVisible.value = $event),
|
|
4508
4551
|
width: width.value,
|
|
@@ -4527,8 +4570,8 @@
|
|
|
4527
4570
|
}
|
|
4528
4571
|
});
|
|
4529
4572
|
|
|
4530
|
-
const _hoisted_1$
|
|
4531
|
-
const _sfc_main$
|
|
4573
|
+
const _hoisted_1$u = { class: "m-editor-data-source-field-select" };
|
|
4574
|
+
const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
|
|
4532
4575
|
__name: "FieldSelect",
|
|
4533
4576
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
4534
4577
|
value: {},
|
|
@@ -4609,7 +4652,7 @@
|
|
|
4609
4652
|
eventBus?.emit("edit-data-source", removeDataSourceFieldPrefix(id));
|
|
4610
4653
|
};
|
|
4611
4654
|
return (_ctx, _cache) => {
|
|
4612
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
4655
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$u, [
|
|
4613
4656
|
_ctx.checkStrictly ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
4614
4657
|
vue.createVNode(vue.unref(designPlugin.TMagicSelect), {
|
|
4615
4658
|
"model-value": selectDataSourceId.value,
|
|
@@ -4677,7 +4720,7 @@
|
|
|
4677
4720
|
onClick: _cache[0] || (_cache[0] = ($event) => editHandler(selectDataSourceId.value))
|
|
4678
4721
|
}, {
|
|
4679
4722
|
default: vue.withCtx(() => [
|
|
4680
|
-
vue.createVNode(_sfc_main$
|
|
4723
|
+
vue.createVNode(_sfc_main$Z, {
|
|
4681
4724
|
icon: !notEditable.value ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View)
|
|
4682
4725
|
}, null, 8, ["icon"])
|
|
4683
4726
|
]),
|
|
@@ -4691,8 +4734,8 @@
|
|
|
4691
4734
|
}
|
|
4692
4735
|
});
|
|
4693
4736
|
|
|
4694
|
-
const _hoisted_1$
|
|
4695
|
-
const _sfc_main$
|
|
4737
|
+
const _hoisted_1$t = { class: "m-fields-data-source-field-select" };
|
|
4738
|
+
const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
|
|
4696
4739
|
...{
|
|
4697
4740
|
name: "MFieldsDataSourceFieldSelect"
|
|
4698
4741
|
},
|
|
@@ -4793,8 +4836,8 @@
|
|
|
4793
4836
|
}
|
|
4794
4837
|
};
|
|
4795
4838
|
return (_ctx, _cache) => {
|
|
4796
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
4797
|
-
showDataSourceFieldSelect.value || !_ctx.config.fieldConfig ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
4839
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$t, [
|
|
4840
|
+
showDataSourceFieldSelect.value || !_ctx.config.fieldConfig ? (vue.openBlock(), vue.createBlock(_sfc_main$P, {
|
|
4798
4841
|
key: 0,
|
|
4799
4842
|
"model-value": _ctx.model[_ctx.name],
|
|
4800
4843
|
disabled: _ctx.disabled,
|
|
@@ -4829,7 +4872,7 @@
|
|
|
4829
4872
|
onClick: _cache[0] || (_cache[0] = ($event) => showDataSourceFieldSelect.value = !showDataSourceFieldSelect.value)
|
|
4830
4873
|
}, {
|
|
4831
4874
|
default: vue.withCtx(() => [
|
|
4832
|
-
vue.createVNode(_sfc_main$
|
|
4875
|
+
vue.createVNode(_sfc_main$Z, { icon: vue.unref(iconsVue.Coin) }, null, 8, ["icon"])
|
|
4833
4876
|
]),
|
|
4834
4877
|
_: 1
|
|
4835
4878
|
}, 8, ["type", "size"])
|
|
@@ -4841,10 +4884,10 @@
|
|
|
4841
4884
|
}
|
|
4842
4885
|
});
|
|
4843
4886
|
|
|
4844
|
-
const _hoisted_1$
|
|
4845
|
-
const _hoisted_2$
|
|
4887
|
+
const _hoisted_1$s = { style: { "display": "flex", "flex-direction": "column", "line-height": "1.2em" } };
|
|
4888
|
+
const _hoisted_2$g = { style: { "font-size": "10px", "color": "rgba(0, 0, 0, 0.6)" } };
|
|
4846
4889
|
const _hoisted_3$4 = { class: "el-input__inner t-input__inner" };
|
|
4847
|
-
const _sfc_main$
|
|
4890
|
+
const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
|
|
4848
4891
|
...{
|
|
4849
4892
|
name: "MFieldsDataSourceInput"
|
|
4850
4893
|
},
|
|
@@ -4865,7 +4908,7 @@
|
|
|
4865
4908
|
const props = __props;
|
|
4866
4909
|
const emit = __emit;
|
|
4867
4910
|
const { dataSourceService } = vue.inject("services") || {};
|
|
4868
|
-
const autocomplete = vue.
|
|
4911
|
+
const autocomplete = vue.useTemplateRef("autocomplete");
|
|
4869
4912
|
const isFocused = vue.ref(false);
|
|
4870
4913
|
const state = vue.ref("");
|
|
4871
4914
|
const displayState = vue.ref([]);
|
|
@@ -5044,12 +5087,12 @@
|
|
|
5044
5087
|
}
|
|
5045
5088
|
), {
|
|
5046
5089
|
suffix: vue.withCtx(() => [
|
|
5047
|
-
vue.createVNode(_sfc_main$
|
|
5090
|
+
vue.createVNode(_sfc_main$Z, { icon: vue.unref(iconsVue.Coin) }, null, 8, ["icon"])
|
|
5048
5091
|
]),
|
|
5049
5092
|
default: vue.withCtx(({ item }) => [
|
|
5050
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
5093
|
+
vue.createElementVNode("div", _hoisted_1$s, [
|
|
5051
5094
|
vue.createElementVNode("div", null, vue.toDisplayString(item.text), 1),
|
|
5052
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
5095
|
+
vue.createElementVNode("span", _hoisted_2$g, vue.toDisplayString(item.value), 1)
|
|
5053
5096
|
])
|
|
5054
5097
|
]),
|
|
5055
5098
|
_: 1
|
|
@@ -5079,7 +5122,7 @@
|
|
|
5079
5122
|
}, 1032, ["size"])) : vue.createCommentVNode("", true)
|
|
5080
5123
|
], 64);
|
|
5081
5124
|
}), 256)),
|
|
5082
|
-
vue.createVNode(_sfc_main$
|
|
5125
|
+
vue.createVNode(_sfc_main$Z, {
|
|
5083
5126
|
class: "tmagic-data-source-input-icon",
|
|
5084
5127
|
icon: vue.unref(iconsVue.Coin)
|
|
5085
5128
|
}, null, 8, ["icon"])
|
|
@@ -5090,11 +5133,11 @@
|
|
|
5090
5133
|
}
|
|
5091
5134
|
});
|
|
5092
5135
|
|
|
5093
|
-
const _hoisted_1$
|
|
5094
|
-
const _hoisted_2$
|
|
5136
|
+
const _hoisted_1$r = { style: { "display": "flex", "margin-bottom": "10px" } };
|
|
5137
|
+
const _hoisted_2$f = { style: { "flex": "1" } };
|
|
5095
5138
|
const _hoisted_3$3 = { style: { "flex": "1" } };
|
|
5096
5139
|
const _hoisted_4$3 = { class: "dialog-footer" };
|
|
5097
|
-
const _sfc_main$
|
|
5140
|
+
const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
5098
5141
|
...{
|
|
5099
5142
|
name: "MEditorCodeBlockEditor"
|
|
5100
5143
|
},
|
|
@@ -5120,7 +5163,7 @@
|
|
|
5120
5163
|
const { height: codeBlockEditorHeight } = useEditorContentHeight();
|
|
5121
5164
|
const difVisible = vue.ref(false);
|
|
5122
5165
|
const { rect: windowRect } = useWindowRect();
|
|
5123
|
-
const magicVsEditor = vue.
|
|
5166
|
+
const magicVsEditor = vue.useTemplateRef("magicVsEditor");
|
|
5124
5167
|
const diffChange = () => {
|
|
5125
5168
|
if (!magicVsEditor.value || !formBox.value?.form) {
|
|
5126
5169
|
return;
|
|
@@ -5229,7 +5272,7 @@
|
|
|
5229
5272
|
const errorHandler = (error) => {
|
|
5230
5273
|
designPlugin.tMagicMessage.error(error.message);
|
|
5231
5274
|
};
|
|
5232
|
-
const formBox = vue.
|
|
5275
|
+
const formBox = vue.useTemplateRef("formBox");
|
|
5233
5276
|
const changedValue = vue.ref();
|
|
5234
5277
|
const changeHandler = (values) => {
|
|
5235
5278
|
changedValue.value = values;
|
|
@@ -5267,7 +5310,7 @@
|
|
|
5267
5310
|
});
|
|
5268
5311
|
return (_ctx, _cache) => {
|
|
5269
5312
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
5270
|
-
vue.createVNode(_sfc_main$
|
|
5313
|
+
vue.createVNode(_sfc_main$R, {
|
|
5271
5314
|
visible: boxVisible.value,
|
|
5272
5315
|
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => boxVisible.value = $event),
|
|
5273
5316
|
width: width.value,
|
|
@@ -5344,8 +5387,8 @@
|
|
|
5344
5387
|
])
|
|
5345
5388
|
]),
|
|
5346
5389
|
default: vue.withCtx(() => [
|
|
5347
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
5348
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5390
|
+
vue.createElementVNode("div", _hoisted_1$r, [
|
|
5391
|
+
vue.createElementVNode("div", _hoisted_2$f, [
|
|
5349
5392
|
vue.createVNode(vue.unref(designPlugin.TMagicTag), {
|
|
5350
5393
|
size: "small",
|
|
5351
5394
|
type: "info"
|
|
@@ -5368,14 +5411,14 @@
|
|
|
5368
5411
|
})
|
|
5369
5412
|
])
|
|
5370
5413
|
]),
|
|
5371
|
-
difVisible.value ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5414
|
+
difVisible.value ? (vue.openBlock(), vue.createBlock(_sfc_main$Y, {
|
|
5372
5415
|
key: 0,
|
|
5373
5416
|
ref_key: "magicVsEditor",
|
|
5374
5417
|
ref: magicVsEditor,
|
|
5375
5418
|
type: "diff",
|
|
5376
5419
|
language: "json",
|
|
5377
5420
|
initValues: _ctx.content.content,
|
|
5378
|
-
modifiedValues: formBox
|
|
5421
|
+
modifiedValues: vue.unref(formBox)?.form?.values.content,
|
|
5379
5422
|
style: vue.normalizeStyle(`height: ${vue.unref(windowRect).height - 150}px`)
|
|
5380
5423
|
}, null, 8, ["initValues", "modifiedValues", "style"])) : vue.createCommentVNode("", true)
|
|
5381
5424
|
]),
|
|
@@ -5387,9 +5430,9 @@
|
|
|
5387
5430
|
}
|
|
5388
5431
|
});
|
|
5389
5432
|
|
|
5390
|
-
const _hoisted_1$
|
|
5391
|
-
const _hoisted_2$
|
|
5392
|
-
const _sfc_main$
|
|
5433
|
+
const _hoisted_1$q = { class: "m-editor-data-source-methods" };
|
|
5434
|
+
const _hoisted_2$e = { class: "m-editor-data-source-methods-footer" };
|
|
5435
|
+
const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
|
|
5393
5436
|
...{
|
|
5394
5437
|
name: "MFieldsDataSourceMethods"
|
|
5395
5438
|
},
|
|
@@ -5410,7 +5453,7 @@
|
|
|
5410
5453
|
const props = __props;
|
|
5411
5454
|
const emit = __emit;
|
|
5412
5455
|
const codeConfig = vue.ref();
|
|
5413
|
-
const codeBlockEditor = vue.
|
|
5456
|
+
const codeBlockEditor = vue.useTemplateRef("codeBlockEditor");
|
|
5414
5457
|
let editIndex = -1;
|
|
5415
5458
|
const methodColumns = [
|
|
5416
5459
|
{
|
|
@@ -5510,12 +5553,12 @@
|
|
|
5510
5553
|
codeBlockEditor.value?.hide();
|
|
5511
5554
|
};
|
|
5512
5555
|
return (_ctx, _cache) => {
|
|
5513
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
5556
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$q, [
|
|
5514
5557
|
vue.createVNode(vue.unref(tablePlugin.MagicTable), {
|
|
5515
5558
|
data: _ctx.model[_ctx.name],
|
|
5516
5559
|
columns: methodColumns
|
|
5517
5560
|
}, null, 8, ["data"]),
|
|
5518
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5561
|
+
vue.createElementVNode("div", _hoisted_2$e, [
|
|
5519
5562
|
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
5520
5563
|
size: "small",
|
|
5521
5564
|
type: "primary",
|
|
@@ -5529,7 +5572,7 @@
|
|
|
5529
5572
|
_: 1
|
|
5530
5573
|
}, 8, ["disabled"])
|
|
5531
5574
|
]),
|
|
5532
|
-
codeConfig.value ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5575
|
+
codeConfig.value ? (vue.openBlock(), vue.createBlock(_sfc_main$M, {
|
|
5533
5576
|
key: 0,
|
|
5534
5577
|
ref_key: "codeBlockEditor",
|
|
5535
5578
|
ref: codeBlockEditor,
|
|
@@ -5544,9 +5587,9 @@
|
|
|
5544
5587
|
}
|
|
5545
5588
|
});
|
|
5546
5589
|
|
|
5547
|
-
const _hoisted_1$
|
|
5548
|
-
const _hoisted_2$
|
|
5549
|
-
const _sfc_main$
|
|
5590
|
+
const _hoisted_1$p = { class: "m-fields-data-source-method-select" };
|
|
5591
|
+
const _hoisted_2$d = { class: "data-source-method-select-container" };
|
|
5592
|
+
const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
|
|
5550
5593
|
...{
|
|
5551
5594
|
name: "MFieldsDataSourceMethodSelect"
|
|
5552
5595
|
},
|
|
@@ -5632,8 +5675,8 @@
|
|
|
5632
5675
|
eventBus?.emit("edit-data-source", id);
|
|
5633
5676
|
};
|
|
5634
5677
|
return (_ctx, _cache) => {
|
|
5635
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
5636
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5678
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$p, [
|
|
5679
|
+
vue.createElementVNode("div", _hoisted_2$d, [
|
|
5637
5680
|
vue.createVNode(vue.unref(formPlugin.MContainer), {
|
|
5638
5681
|
class: "select",
|
|
5639
5682
|
config: cascaderConfig.value,
|
|
@@ -5652,7 +5695,7 @@
|
|
|
5652
5695
|
onClick: editCodeHandler
|
|
5653
5696
|
}, {
|
|
5654
5697
|
default: vue.withCtx(() => [
|
|
5655
|
-
vue.createVNode(_sfc_main$
|
|
5698
|
+
vue.createVNode(_sfc_main$Z, {
|
|
5656
5699
|
icon: !notEditable.value ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View)
|
|
5657
5700
|
}, null, 8, ["icon"])
|
|
5658
5701
|
]),
|
|
@@ -5662,7 +5705,7 @@
|
|
|
5662
5705
|
_: 1
|
|
5663
5706
|
}, 8, ["content"])) : vue.createCommentVNode("", true)
|
|
5664
5707
|
]),
|
|
5665
|
-
paramsConfig.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5708
|
+
paramsConfig.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$U, {
|
|
5666
5709
|
key: 0,
|
|
5667
5710
|
name: "params",
|
|
5668
5711
|
model: _ctx.model,
|
|
@@ -5676,9 +5719,9 @@
|
|
|
5676
5719
|
}
|
|
5677
5720
|
});
|
|
5678
5721
|
|
|
5679
|
-
const _hoisted_1$
|
|
5680
|
-
const _hoisted_2$
|
|
5681
|
-
const _sfc_main$
|
|
5722
|
+
const _hoisted_1$o = { class: "m-editor-data-source-fields" };
|
|
5723
|
+
const _hoisted_2$c = { class: "m-editor-data-source-fields-footer" };
|
|
5724
|
+
const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
|
|
5682
5725
|
...{
|
|
5683
5726
|
name: "MFieldsDataSourceMocks"
|
|
5684
5727
|
},
|
|
@@ -5767,7 +5810,7 @@
|
|
|
5767
5810
|
const columns = [
|
|
5768
5811
|
{
|
|
5769
5812
|
type: "expand",
|
|
5770
|
-
component: _sfc_main$
|
|
5813
|
+
component: _sfc_main$Y,
|
|
5771
5814
|
props: (row) => ({
|
|
5772
5815
|
initValues: row.data,
|
|
5773
5816
|
language: "json",
|
|
@@ -5882,12 +5925,12 @@
|
|
|
5882
5925
|
const parentFloating = vue.inject("parentFloating", vue.ref(null));
|
|
5883
5926
|
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
|
|
5884
5927
|
return (_ctx, _cache) => {
|
|
5885
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
5928
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$o, [
|
|
5886
5929
|
vue.createVNode(vue.unref(tablePlugin.MagicTable), {
|
|
5887
5930
|
data: _ctx.model[_ctx.name],
|
|
5888
5931
|
columns
|
|
5889
5932
|
}, null, 8, ["data"]),
|
|
5890
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5933
|
+
vue.createElementVNode("div", _hoisted_2$c, [
|
|
5891
5934
|
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
5892
5935
|
size: "small",
|
|
5893
5936
|
type: "primary",
|
|
@@ -5901,7 +5944,7 @@
|
|
|
5901
5944
|
_: 1
|
|
5902
5945
|
}, 8, ["disabled"])
|
|
5903
5946
|
]),
|
|
5904
|
-
vue.createVNode(_sfc_main$
|
|
5947
|
+
vue.createVNode(_sfc_main$R, {
|
|
5905
5948
|
visible: addDialogVisible.value,
|
|
5906
5949
|
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => addDialogVisible.value = $event),
|
|
5907
5950
|
width: width.value,
|
|
@@ -5913,7 +5956,6 @@
|
|
|
5913
5956
|
}, {
|
|
5914
5957
|
body: vue.withCtx(() => [
|
|
5915
5958
|
vue.createVNode(vue.unref(formPlugin.MFormBox), {
|
|
5916
|
-
ref: "addDialog",
|
|
5917
5959
|
"label-width": "120px",
|
|
5918
5960
|
config: formConfig,
|
|
5919
5961
|
values: formValues.value,
|
|
@@ -5929,8 +5971,8 @@
|
|
|
5929
5971
|
}
|
|
5930
5972
|
});
|
|
5931
5973
|
|
|
5932
|
-
const _hoisted_1$
|
|
5933
|
-
const _sfc_main$
|
|
5974
|
+
const _hoisted_1$n = { class: "m-fields-data-source-select" };
|
|
5975
|
+
const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
|
|
5934
5976
|
...{
|
|
5935
5977
|
name: "MFieldsDataSourceSelect"
|
|
5936
5978
|
},
|
|
@@ -5987,7 +6029,7 @@
|
|
|
5987
6029
|
eventBus?.emit("edit-data-source", id);
|
|
5988
6030
|
};
|
|
5989
6031
|
return (_ctx, _cache) => {
|
|
5990
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
6032
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$n, [
|
|
5991
6033
|
vue.createVNode(vue.unref(formPlugin.MSelect), {
|
|
5992
6034
|
model: _ctx.model,
|
|
5993
6035
|
name: _ctx.name,
|
|
@@ -6009,7 +6051,7 @@
|
|
|
6009
6051
|
onClick: editHandler
|
|
6010
6052
|
}, {
|
|
6011
6053
|
default: vue.withCtx(() => [
|
|
6012
|
-
vue.createVNode(_sfc_main$
|
|
6054
|
+
vue.createVNode(_sfc_main$Z, {
|
|
6013
6055
|
icon: !notEditable.value ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View)
|
|
6014
6056
|
}, null, 8, ["icon"])
|
|
6015
6057
|
]),
|
|
@@ -6023,7 +6065,7 @@
|
|
|
6023
6065
|
}
|
|
6024
6066
|
});
|
|
6025
6067
|
|
|
6026
|
-
const _sfc_main$
|
|
6068
|
+
const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
|
|
6027
6069
|
...{
|
|
6028
6070
|
name: "m-fields-display-conds"
|
|
6029
6071
|
},
|
|
@@ -6154,12 +6196,12 @@
|
|
|
6154
6196
|
}
|
|
6155
6197
|
});
|
|
6156
6198
|
|
|
6157
|
-
const _hoisted_1$
|
|
6158
|
-
const _hoisted_2$
|
|
6199
|
+
const _hoisted_1$m = { class: "m-fields-event-select" };
|
|
6200
|
+
const _hoisted_2$b = {
|
|
6159
6201
|
key: 1,
|
|
6160
6202
|
class: "fullWidth"
|
|
6161
6203
|
};
|
|
6162
|
-
const _sfc_main$
|
|
6204
|
+
const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
|
|
6163
6205
|
...{
|
|
6164
6206
|
name: "MFieldsEventSelect"
|
|
6165
6207
|
},
|
|
@@ -6435,17 +6477,16 @@
|
|
|
6435
6477
|
const onChangeHandler = (v, eventData) => emit("change", props.model[props.name], eventData);
|
|
6436
6478
|
return (_ctx, _cache) => {
|
|
6437
6479
|
const _component_m_form_table = vue.resolveComponent("m-form-table");
|
|
6438
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
6480
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$m, [
|
|
6439
6481
|
isOldVersion.value ? (vue.openBlock(), vue.createBlock(_component_m_form_table, {
|
|
6440
6482
|
key: 0,
|
|
6441
|
-
ref: "eventForm",
|
|
6442
6483
|
name: "events",
|
|
6443
6484
|
size: _ctx.size,
|
|
6444
6485
|
disabled: _ctx.disabled,
|
|
6445
6486
|
model: _ctx.model,
|
|
6446
6487
|
config: tableConfig.value,
|
|
6447
6488
|
onChange: onChangeHandler
|
|
6448
|
-
}, null, 8, ["size", "disabled", "model", "config"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
6489
|
+
}, null, 8, ["size", "disabled", "model", "config"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$b, [
|
|
6449
6490
|
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
6450
6491
|
class: "create-button",
|
|
6451
6492
|
type: "primary",
|
|
@@ -6497,29 +6538,29 @@
|
|
|
6497
6538
|
}
|
|
6498
6539
|
});
|
|
6499
6540
|
|
|
6500
|
-
const _hoisted_1$
|
|
6541
|
+
const _hoisted_1$l = {
|
|
6501
6542
|
viewBox: "0 0 32 32",
|
|
6502
6543
|
version: "1.1",
|
|
6503
6544
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6504
6545
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
6505
6546
|
};
|
|
6506
|
-
const _sfc_main$
|
|
6547
|
+
const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
6507
6548
|
...{
|
|
6508
6549
|
name: "MEditorCodeIcon"
|
|
6509
6550
|
},
|
|
6510
6551
|
__name: "CodeIcon",
|
|
6511
6552
|
setup(__props) {
|
|
6512
6553
|
return (_ctx, _cache) => {
|
|
6513
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
6554
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$l, _cache[0] || (_cache[0] = [
|
|
6514
6555
|
vue.createStaticVNode('<defs><rect id="path-1" x="0" y="0" width="32" height="32"></rect></defs><g id="组件规范" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="03图标" transform="translate(-561.000000, -2356.000000)"><g id="icon/line/Universal/code" transform="translate(561.000000, 2356.000000)"><g id="路径"><mask id="mask-2" fill="white"><use xlink:href="#path-1"></use></mask><use id="蒙版" fill="#D8D8D8" opacity="0" xlink:href="#path-1"></use><path d="M21.9284587,7.9482233 L29.8079004,15.827665 C29.9055315,15.9252961 29.9055315,16.0835874 29.8079004,16.1812184 L21.9284587,24.0606602 C21.8308276,24.1582912 21.6725364,24.1582912 21.5749053,24.0606602 L20.3374684,22.8232233 C20.2419143,22.7276698 20.2398813,22.5740096 20.331369,22.4759832 L20.3374687,22.4696702 L26.8027181,16.0044417 L20.3374687,9.53921328 C20.2398372,9.44158265 20.2398369,9.2832914 20.3374679,9.18566017 L21.5749053,7.9482233 C21.6725364,7.85059223 21.8308276,7.85059223 21.9284587,7.9482233 Z M10.3999684,7.9482233 L11.6374053,9.18566017 C11.7329594,9.28121371 11.7349925,9.43487387 11.6435048,9.53290029 L11.637405,9.53921328 L5.17215562,16.0044417 L11.637405,22.4696702 C11.7329593,22.5652236 11.7349926,22.7188837 11.643505,22.8169103 L11.6374053,22.8232233 L10.3999684,24.0606602 C10.3023374,24.1582912 10.1440461,24.1582912 10.046415,24.0606602 L2.1669733,16.1812184 C2.06934223,16.0835874 2.06934223,15.9252961 2.1669733,15.827665 L10.046415,7.9482233 C10.1440461,7.85059223 10.3023374,7.85059223 10.3999684,7.9482233 Z M17.2612532,9.29310422 L18.9262468,9.83189578 C19.0576112,9.87440526 19.1296423,10.0153579 19.0871328,10.1467222 L15.0848232,22.514807 C15.0423138,22.6461714 14.9013612,22.7182025 14.7699968,22.675693 L13.1050032,22.1369014 C12.9736388,22.0943919 12.9016077,21.9534393 12.9441172,21.822075 L16.9464268,9.45399022 C16.9889362,9.32262585 17.1298888,9.25059474 17.2612532,9.29310422 Z" id="形状" fill="#1D1F24" mask="url(#mask-2)"></path></g></g><g id="icon切图" transform="translate(226.000000, 1782.000000)"></g></g></g>', 2)
|
|
6515
6556
|
]));
|
|
6516
6557
|
};
|
|
6517
6558
|
}
|
|
6518
6559
|
});
|
|
6519
6560
|
|
|
6520
|
-
const _hoisted_1$
|
|
6521
|
-
const _hoisted_2$
|
|
6522
|
-
const _sfc_main$
|
|
6561
|
+
const _hoisted_1$k = { class: "m-fields-key-value" };
|
|
6562
|
+
const _hoisted_2$a = { key: 0 };
|
|
6563
|
+
const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
6523
6564
|
...{
|
|
6524
6565
|
name: "MFieldsKeyValue"
|
|
6525
6566
|
},
|
|
@@ -6581,8 +6622,8 @@
|
|
|
6581
6622
|
emit("change", v);
|
|
6582
6623
|
};
|
|
6583
6624
|
return (_ctx, _cache) => {
|
|
6584
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
6585
|
-
!showCode.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
6625
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$k, [
|
|
6626
|
+
!showCode.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$a, [
|
|
6586
6627
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(records.value, (item, index) => {
|
|
6587
6628
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
6588
6629
|
class: "m-fields-key-value-item",
|
|
@@ -6596,7 +6637,7 @@
|
|
|
6596
6637
|
size: _ctx.size,
|
|
6597
6638
|
onChange: keyChangeHandler
|
|
6598
6639
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "size"]),
|
|
6599
|
-
_cache[1] || (_cache[1] = vue.createElementVNode("span", { class: "m-
|
|
6640
|
+
_cache[1] || (_cache[1] = vue.createElementVNode("span", { class: "m-fields-key-value-delimiter" }, ":", -1)),
|
|
6600
6641
|
vue.createVNode(vue.unref(designPlugin.TMagicInput), {
|
|
6601
6642
|
placeholder: "value",
|
|
6602
6643
|
modelValue: records.value[index][1],
|
|
@@ -6606,7 +6647,7 @@
|
|
|
6606
6647
|
onChange: valueChangeHandler
|
|
6607
6648
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "size"]),
|
|
6608
6649
|
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
6609
|
-
class: "m-
|
|
6650
|
+
class: "m-fields-key-value-delete",
|
|
6610
6651
|
type: "danger",
|
|
6611
6652
|
size: _ctx.size,
|
|
6612
6653
|
disabled: _ctx.disabled,
|
|
@@ -6631,7 +6672,7 @@
|
|
|
6631
6672
|
_: 1
|
|
6632
6673
|
}, 8, ["size", "disabled", "icon"])
|
|
6633
6674
|
])) : vue.createCommentVNode("", true),
|
|
6634
|
-
_ctx.config.advanced && showCode.value ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
6675
|
+
_ctx.config.advanced && showCode.value ? (vue.openBlock(), vue.createBlock(_sfc_main$Y, {
|
|
6635
6676
|
key: 1,
|
|
6636
6677
|
height: "200px",
|
|
6637
6678
|
"init-values": _ctx.model[_ctx.name],
|
|
@@ -6647,7 +6688,7 @@
|
|
|
6647
6688
|
size: "default",
|
|
6648
6689
|
disabled: _ctx.disabled,
|
|
6649
6690
|
link: "",
|
|
6650
|
-
icon: _sfc_main$
|
|
6691
|
+
icon: _sfc_main$F,
|
|
6651
6692
|
onClick: _cache[0] || (_cache[0] = ($event) => showCode.value = !showCode.value)
|
|
6652
6693
|
}, null, 8, ["disabled"])) : vue.createCommentVNode("", true)
|
|
6653
6694
|
]);
|
|
@@ -6655,9 +6696,9 @@
|
|
|
6655
6696
|
}
|
|
6656
6697
|
});
|
|
6657
6698
|
|
|
6658
|
-
const _hoisted_1$
|
|
6659
|
-
const _hoisted_2$
|
|
6660
|
-
const _sfc_main$
|
|
6699
|
+
const _hoisted_1$j = { class: "m-fields-page-fragment-select" };
|
|
6700
|
+
const _hoisted_2$9 = { class: "page-fragment-select-container" };
|
|
6701
|
+
const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
6661
6702
|
...{
|
|
6662
6703
|
name: "MFieldsPageFragmentSelect"
|
|
6663
6704
|
},
|
|
@@ -6703,8 +6744,8 @@
|
|
|
6703
6744
|
};
|
|
6704
6745
|
return (_ctx, _cache) => {
|
|
6705
6746
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
6706
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
6707
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
6747
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$j, [
|
|
6748
|
+
vue.createElementVNode("div", _hoisted_2$9, [
|
|
6708
6749
|
vue.createVNode(_component_m_form_container, {
|
|
6709
6750
|
class: "select",
|
|
6710
6751
|
config: selectConfig,
|
|
@@ -6712,7 +6753,7 @@
|
|
|
6712
6753
|
size: _ctx.size,
|
|
6713
6754
|
onChange: changeHandler
|
|
6714
6755
|
}, null, 8, ["model", "size"]),
|
|
6715
|
-
_ctx.model[_ctx.name] ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
6756
|
+
_ctx.model[_ctx.name] ? (vue.openBlock(), vue.createBlock(_sfc_main$Z, {
|
|
6716
6757
|
key: 0,
|
|
6717
6758
|
class: "icon",
|
|
6718
6759
|
icon: vue.unref(iconsVue.Edit),
|
|
@@ -6724,12 +6765,12 @@
|
|
|
6724
6765
|
}
|
|
6725
6766
|
});
|
|
6726
6767
|
|
|
6727
|
-
const _hoisted_1$
|
|
6768
|
+
const _hoisted_1$i = {
|
|
6728
6769
|
key: 1,
|
|
6729
6770
|
class: "m-fields-ui-select",
|
|
6730
6771
|
style: { "display": "flex" }
|
|
6731
6772
|
};
|
|
6732
|
-
const _sfc_main$
|
|
6773
|
+
const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
6733
6774
|
...{
|
|
6734
6775
|
name: "MFieldsUISelect"
|
|
6735
6776
|
},
|
|
@@ -6827,7 +6868,7 @@
|
|
|
6827
6868
|
])),
|
|
6828
6869
|
_: 1
|
|
6829
6870
|
}, 8, ["icon", "disabled", "size"])
|
|
6830
|
-
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
6871
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$i, [
|
|
6831
6872
|
val.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
6832
6873
|
vue.createVNode(vue.unref(designPlugin.TMagicTooltip), {
|
|
6833
6874
|
content: "清除",
|
|
@@ -6894,7 +6935,7 @@
|
|
|
6894
6935
|
}
|
|
6895
6936
|
});
|
|
6896
6937
|
|
|
6897
|
-
const _sfc_main$
|
|
6938
|
+
const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
|
|
6898
6939
|
...{
|
|
6899
6940
|
name: "MEditorResizer"
|
|
6900
6941
|
},
|
|
@@ -6902,13 +6943,13 @@
|
|
|
6902
6943
|
emits: ["change"],
|
|
6903
6944
|
setup(__props, { emit: __emit }) {
|
|
6904
6945
|
const emit = __emit;
|
|
6905
|
-
const target = vue.
|
|
6906
|
-
const {
|
|
6946
|
+
const target = vue.useTemplateRef("target");
|
|
6947
|
+
const { isDragging } = useGetSo(target, emit);
|
|
6907
6948
|
return (_ctx, _cache) => {
|
|
6908
6949
|
return vue.openBlock(), vue.createElementBlock("span", {
|
|
6909
6950
|
ref_key: "target",
|
|
6910
6951
|
ref: target,
|
|
6911
|
-
class: vue.normalizeClass(["m-editor-resizer", { "m-editor-resizer-
|
|
6952
|
+
class: vue.normalizeClass(["m-editor-resizer", { "m-editor-resizer-dragging": vue.unref(isDragging) }])
|
|
6912
6953
|
}, [
|
|
6913
6954
|
vue.renderSlot(_ctx.$slots, "default")
|
|
6914
6955
|
], 2);
|
|
@@ -6916,7 +6957,7 @@
|
|
|
6916
6957
|
}
|
|
6917
6958
|
});
|
|
6918
6959
|
|
|
6919
|
-
const _sfc_main$
|
|
6960
|
+
const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
|
|
6920
6961
|
...{
|
|
6921
6962
|
name: "MEditorSplitView"
|
|
6922
6963
|
},
|
|
@@ -6936,7 +6977,7 @@
|
|
|
6936
6977
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
6937
6978
|
const emit = __emit;
|
|
6938
6979
|
const props = __props;
|
|
6939
|
-
const el = vue.
|
|
6980
|
+
const el = vue.useTemplateRef("el");
|
|
6940
6981
|
const hasLeft = vue.computed(() => typeof props.left !== "undefined");
|
|
6941
6982
|
const hasRight = vue.computed(() => typeof props.right !== "undefined");
|
|
6942
6983
|
const center = vue.ref(0);
|
|
@@ -7054,7 +7095,7 @@
|
|
|
7054
7095
|
}, [
|
|
7055
7096
|
vue.renderSlot(_ctx.$slots, "left")
|
|
7056
7097
|
], 6),
|
|
7057
|
-
vue.createVNode(_sfc_main$
|
|
7098
|
+
vue.createVNode(_sfc_main$B, { onChange: changeLeft })
|
|
7058
7099
|
], 64)) : vue.createCommentVNode("", true),
|
|
7059
7100
|
vue.createElementVNode("div", {
|
|
7060
7101
|
class: vue.normalizeClass(["m-editor-layout-center", _ctx.centerClass]),
|
|
@@ -7063,7 +7104,7 @@
|
|
|
7063
7104
|
vue.renderSlot(_ctx.$slots, "center")
|
|
7064
7105
|
], 6),
|
|
7065
7106
|
hasRight.value && _ctx.$slots.right ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
7066
|
-
vue.createVNode(_sfc_main$
|
|
7107
|
+
vue.createVNode(_sfc_main$B, { onChange: changeRight }),
|
|
7067
7108
|
vue.createElementVNode("div", {
|
|
7068
7109
|
class: vue.normalizeClass(["m-editor-layout-right", _ctx.rightClass]),
|
|
7069
7110
|
style: vue.normalizeStyle(`width: ${_ctx.right}px`)
|
|
@@ -7076,12 +7117,12 @@
|
|
|
7076
7117
|
}
|
|
7077
7118
|
});
|
|
7078
7119
|
|
|
7079
|
-
const _hoisted_1$
|
|
7120
|
+
const _hoisted_1$h = {
|
|
7080
7121
|
key: 1,
|
|
7081
7122
|
class: "menu-item-text"
|
|
7082
7123
|
};
|
|
7083
|
-
const _hoisted_2$
|
|
7084
|
-
const _sfc_main$
|
|
7124
|
+
const _hoisted_2$8 = { class: "el-dropdown-link menubar-menu-button" };
|
|
7125
|
+
const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
|
|
7085
7126
|
...{
|
|
7086
7127
|
name: "MEditorToolButton"
|
|
7087
7128
|
},
|
|
@@ -7137,7 +7178,7 @@
|
|
|
7137
7178
|
};
|
|
7138
7179
|
const mouseupHandler = (item, event) => {
|
|
7139
7180
|
if (props.eventType !== "mouseup") return;
|
|
7140
|
-
if (item.type === "button") {
|
|
7181
|
+
if (item.type === "button" && event.button === 0) {
|
|
7141
7182
|
buttonHandler(item, event);
|
|
7142
7183
|
}
|
|
7143
7184
|
};
|
|
@@ -7152,7 +7193,7 @@
|
|
|
7152
7193
|
_ctx.data.type === "divider" ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicDivider), {
|
|
7153
7194
|
key: 0,
|
|
7154
7195
|
direction: _ctx.data.direction || "vertical"
|
|
7155
|
-
}, null, 8, ["direction"])) : _ctx.data.type === "text" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
7196
|
+
}, null, 8, ["direction"])) : _ctx.data.type === "text" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$h, vue.toDisplayString(_ctx.data.text), 1)) : _ctx.data.type === "button" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
7156
7197
|
_ctx.data.tooltip ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicTooltip), {
|
|
7157
7198
|
key: 0,
|
|
7158
7199
|
effect: "dark",
|
|
@@ -7166,7 +7207,7 @@
|
|
|
7166
7207
|
disabled: disabled.value
|
|
7167
7208
|
}, {
|
|
7168
7209
|
default: vue.withCtx(() => [
|
|
7169
|
-
_ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7210
|
+
_ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$Z, {
|
|
7170
7211
|
key: 0,
|
|
7171
7212
|
icon: _ctx.data.icon
|
|
7172
7213
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
@@ -7184,7 +7225,7 @@
|
|
|
7184
7225
|
title: _ctx.data.text
|
|
7185
7226
|
}, {
|
|
7186
7227
|
default: vue.withCtx(() => [
|
|
7187
|
-
_ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7228
|
+
_ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$Z, {
|
|
7188
7229
|
key: 0,
|
|
7189
7230
|
icon: _ctx.data.icon
|
|
7190
7231
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
@@ -7217,7 +7258,7 @@
|
|
|
7217
7258
|
})) : vue.createCommentVNode("", true)
|
|
7218
7259
|
]),
|
|
7219
7260
|
default: vue.withCtx(() => [
|
|
7220
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
7261
|
+
vue.createElementVNode("span", _hoisted_2$8, [
|
|
7221
7262
|
vue.createTextVNode(vue.toDisplayString(_ctx.data.text), 1),
|
|
7222
7263
|
vue.createVNode(vue.unref(designPlugin.TMagicIcon), { class: "el-icon--right" }, {
|
|
7223
7264
|
default: vue.withCtx(() => [
|
|
@@ -7234,16 +7275,16 @@
|
|
|
7234
7275
|
}
|
|
7235
7276
|
});
|
|
7236
7277
|
|
|
7237
|
-
const _hoisted_1$
|
|
7278
|
+
const _hoisted_1$g = {
|
|
7238
7279
|
key: 0,
|
|
7239
7280
|
id: "m-editor-page-bar-add-icon",
|
|
7240
7281
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon"
|
|
7241
7282
|
};
|
|
7242
|
-
const _hoisted_2$
|
|
7283
|
+
const _hoisted_2$7 = {
|
|
7243
7284
|
key: 1,
|
|
7244
7285
|
style: { "width": "21px" }
|
|
7245
7286
|
};
|
|
7246
|
-
const _sfc_main$
|
|
7287
|
+
const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
7247
7288
|
...{
|
|
7248
7289
|
name: "MEditorPageBarAddButton"
|
|
7249
7290
|
},
|
|
@@ -7265,13 +7306,13 @@
|
|
|
7265
7306
|
editorService.add(pageConfig);
|
|
7266
7307
|
};
|
|
7267
7308
|
return (_ctx, _cache) => {
|
|
7268
|
-
return showAddPageButton.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
7309
|
+
return showAddPageButton.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [
|
|
7269
7310
|
vue.createVNode(vue.unref(designPlugin.TMagicPopover), { "popper-class": "data-source-list-panel-add-menu" }, {
|
|
7270
7311
|
reference: vue.withCtx(() => [
|
|
7271
|
-
vue.createVNode(_sfc_main$
|
|
7312
|
+
vue.createVNode(_sfc_main$Z, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
|
|
7272
7313
|
]),
|
|
7273
7314
|
default: vue.withCtx(() => [
|
|
7274
|
-
vue.createVNode(_sfc_main$
|
|
7315
|
+
vue.createVNode(_sfc_main$z, {
|
|
7275
7316
|
data: {
|
|
7276
7317
|
type: "button",
|
|
7277
7318
|
text: "页面",
|
|
@@ -7280,7 +7321,7 @@
|
|
|
7280
7321
|
}
|
|
7281
7322
|
}
|
|
7282
7323
|
}, null, 8, ["data"]),
|
|
7283
|
-
vue.createVNode(_sfc_main$
|
|
7324
|
+
vue.createVNode(_sfc_main$z, {
|
|
7284
7325
|
data: {
|
|
7285
7326
|
type: "button",
|
|
7286
7327
|
text: "页面片",
|
|
@@ -7292,12 +7333,12 @@
|
|
|
7292
7333
|
]),
|
|
7293
7334
|
_: 1
|
|
7294
7335
|
})
|
|
7295
|
-
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
7336
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$7));
|
|
7296
7337
|
};
|
|
7297
7338
|
}
|
|
7298
7339
|
});
|
|
7299
7340
|
|
|
7300
|
-
const _sfc_main$
|
|
7341
|
+
const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
|
|
7301
7342
|
...{
|
|
7302
7343
|
name: "MEditorPageBarScrollContainer"
|
|
7303
7344
|
},
|
|
@@ -7311,7 +7352,7 @@
|
|
|
7311
7352
|
const services = vue.inject("services");
|
|
7312
7353
|
const editorService = services?.editorService;
|
|
7313
7354
|
const uiService = services?.uiService;
|
|
7314
|
-
const itemsContainer = vue.
|
|
7355
|
+
const itemsContainer = vue.useTemplateRef("itemsContainer");
|
|
7315
7356
|
const canScroll = vue.ref(false);
|
|
7316
7357
|
const showAddPageButton = vue.computed(() => uiService?.get("showAddPageButton"));
|
|
7317
7358
|
const showPageListButton = vue.computed(() => uiService?.get("showPageListButton"));
|
|
@@ -7327,7 +7368,7 @@
|
|
|
7327
7368
|
const resizeObserver = new ResizeObserver(() => {
|
|
7328
7369
|
setCanScroll();
|
|
7329
7370
|
});
|
|
7330
|
-
const pageBar = vue.
|
|
7371
|
+
const pageBar = vue.useTemplateRef("pageBar");
|
|
7331
7372
|
vue.onMounted(() => {
|
|
7332
7373
|
pageBar.value && resizeObserver.observe(pageBar.value);
|
|
7333
7374
|
});
|
|
@@ -7436,26 +7477,26 @@
|
|
|
7436
7477
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon m-editor-page-bar-item-left-icon",
|
|
7437
7478
|
onClick: _cache[0] || (_cache[0] = ($event) => scroll("left"))
|
|
7438
7479
|
}, [
|
|
7439
|
-
vue.createVNode(_sfc_main$
|
|
7480
|
+
vue.createVNode(_sfc_main$Z, { icon: vue.unref(iconsVue.ArrowLeftBold) }, null, 8, ["icon"])
|
|
7440
7481
|
])) : vue.createCommentVNode("", true),
|
|
7441
7482
|
canScroll.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
7442
7483
|
key: 2,
|
|
7443
7484
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon m-editor-page-bar-item-right-icon",
|
|
7444
7485
|
onClick: _cache[1] || (_cache[1] = ($event) => scroll("right"))
|
|
7445
7486
|
}, [
|
|
7446
|
-
vue.createVNode(_sfc_main$
|
|
7487
|
+
vue.createVNode(_sfc_main$Z, { icon: vue.unref(iconsVue.ArrowRightBold) }, null, 8, ["icon"])
|
|
7447
7488
|
])) : vue.createCommentVNode("", true)
|
|
7448
7489
|
], 512);
|
|
7449
7490
|
};
|
|
7450
7491
|
}
|
|
7451
7492
|
});
|
|
7452
7493
|
|
|
7453
|
-
const _hoisted_1$
|
|
7494
|
+
const _hoisted_1$f = {
|
|
7454
7495
|
key: 0,
|
|
7455
7496
|
id: "m-editor-page-bar-list-icon",
|
|
7456
7497
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon"
|
|
7457
7498
|
};
|
|
7458
|
-
const _sfc_main$
|
|
7499
|
+
const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
|
|
7459
7500
|
...{
|
|
7460
7501
|
name: "MEditorPageList"
|
|
7461
7502
|
},
|
|
@@ -7473,7 +7514,7 @@
|
|
|
7473
7514
|
await editorService?.select(id);
|
|
7474
7515
|
};
|
|
7475
7516
|
return (_ctx, _cache) => {
|
|
7476
|
-
return showPageListButton.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
7517
|
+
return showPageListButton.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [
|
|
7477
7518
|
vue.createVNode(vue.unref(designPlugin.TMagicPopover), {
|
|
7478
7519
|
"popper-class": "page-bar-popover",
|
|
7479
7520
|
placement: "top",
|
|
@@ -7493,7 +7534,7 @@
|
|
|
7493
7534
|
vue.createElementVNode("div", null, [
|
|
7494
7535
|
vue.renderSlot(_ctx.$slots, "page-list-popover", { list: _ctx.list }, () => [
|
|
7495
7536
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.list, (item, index) => {
|
|
7496
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7537
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$z, {
|
|
7497
7538
|
data: {
|
|
7498
7539
|
type: "button",
|
|
7499
7540
|
text: item.devconfig?.tabName || item.name || item.id,
|
|
@@ -7513,8 +7554,8 @@
|
|
|
7513
7554
|
}
|
|
7514
7555
|
});
|
|
7515
7556
|
|
|
7516
|
-
const _hoisted_1$
|
|
7517
|
-
const _sfc_main$
|
|
7557
|
+
const _hoisted_1$e = { class: "m-editor-page-bar-item m-editor-page-bar-item-icon m-editor-page-bar-search" };
|
|
7558
|
+
const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
7518
7559
|
__name: "Search",
|
|
7519
7560
|
props: {
|
|
7520
7561
|
"query": {},
|
|
@@ -7552,8 +7593,8 @@
|
|
|
7552
7593
|
emit("search", values);
|
|
7553
7594
|
};
|
|
7554
7595
|
return (_ctx, _cache) => {
|
|
7555
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
7556
|
-
vue.createVNode(_sfc_main$
|
|
7596
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [
|
|
7597
|
+
vue.createVNode(_sfc_main$Z, {
|
|
7557
7598
|
icon: vue.unref(iconsVue.Search),
|
|
7558
7599
|
onClick: _cache[0] || (_cache[0] = ($event) => visible.value = !visible.value),
|
|
7559
7600
|
class: vue.normalizeClass({ "icon-active": visible.value })
|
|
@@ -7577,11 +7618,11 @@
|
|
|
7577
7618
|
}
|
|
7578
7619
|
});
|
|
7579
7620
|
|
|
7580
|
-
const _hoisted_1$
|
|
7581
|
-
const _hoisted_2$
|
|
7621
|
+
const _hoisted_1$d = { class: "m-editor-page-bar-tabs" };
|
|
7622
|
+
const _hoisted_2$6 = ["data-page-id", "onClick"];
|
|
7582
7623
|
const _hoisted_3$2 = { class: "m-editor-page-bar-title" };
|
|
7583
7624
|
const _hoisted_4$2 = ["title"];
|
|
7584
|
-
const _sfc_main$
|
|
7625
|
+
const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
7585
7626
|
...{
|
|
7586
7627
|
name: "MEditorPageBar"
|
|
7587
7628
|
},
|
|
@@ -7629,8 +7670,8 @@
|
|
|
7629
7670
|
const remove = (node) => {
|
|
7630
7671
|
editorService?.remove(node);
|
|
7631
7672
|
};
|
|
7632
|
-
const pageBarScrollContainer = vue.
|
|
7633
|
-
const pageBarItems = vue.
|
|
7673
|
+
const pageBarScrollContainer = vue.useTemplateRef("pageBarScrollContainer");
|
|
7674
|
+
const pageBarItems = vue.useTemplateRef("pageBarItems");
|
|
7634
7675
|
vue.watch(page, (page2) => {
|
|
7635
7676
|
if (!page2 || !pageBarScrollContainer.value?.itemsContainerWidth || !pageBarItems.value || pageBarItems.value.length < 2) {
|
|
7636
7677
|
return;
|
|
@@ -7657,8 +7698,8 @@
|
|
|
7657
7698
|
}
|
|
7658
7699
|
});
|
|
7659
7700
|
return (_ctx, _cache) => {
|
|
7660
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
7661
|
-
vue.createVNode(_sfc_main$
|
|
7701
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [
|
|
7702
|
+
vue.createVNode(_sfc_main$x, {
|
|
7662
7703
|
ref_key: "pageBarScrollContainer",
|
|
7663
7704
|
ref: pageBarScrollContainer,
|
|
7664
7705
|
"page-bar-sort-options": _ctx.pageBarSortOptions,
|
|
@@ -7666,13 +7707,13 @@
|
|
|
7666
7707
|
}, {
|
|
7667
7708
|
prepend: vue.withCtx(() => [
|
|
7668
7709
|
vue.renderSlot(_ctx.$slots, "page-bar-add-button", {}, () => [
|
|
7669
|
-
vue.createVNode(_sfc_main$
|
|
7710
|
+
vue.createVNode(_sfc_main$y)
|
|
7670
7711
|
]),
|
|
7671
|
-
vue.createVNode(_sfc_main$
|
|
7712
|
+
vue.createVNode(_sfc_main$v, {
|
|
7672
7713
|
query: query.value,
|
|
7673
7714
|
"onUpdate:query": _cache[0] || (_cache[0] = ($event) => query.value = $event)
|
|
7674
7715
|
}, null, 8, ["query"]),
|
|
7675
|
-
vue.createVNode(_sfc_main$
|
|
7716
|
+
vue.createVNode(_sfc_main$w, { list: list.value }, {
|
|
7676
7717
|
"page-list-popover": vue.withCtx(({ list: list2 }) => [
|
|
7677
7718
|
vue.renderSlot(_ctx.$slots, "page-list-popover", { list: list2 })
|
|
7678
7719
|
]),
|
|
@@ -7715,7 +7756,7 @@
|
|
|
7715
7756
|
default: vue.withCtx(() => [
|
|
7716
7757
|
vue.createElementVNode("div", null, [
|
|
7717
7758
|
vue.renderSlot(_ctx.$slots, "page-bar-popover", { page: item }, () => [
|
|
7718
|
-
vue.createVNode(_sfc_main$
|
|
7759
|
+
vue.createVNode(_sfc_main$z, {
|
|
7719
7760
|
data: {
|
|
7720
7761
|
type: "button",
|
|
7721
7762
|
text: "复制",
|
|
@@ -7723,7 +7764,7 @@
|
|
|
7723
7764
|
handler: () => copy(item)
|
|
7724
7765
|
}
|
|
7725
7766
|
}, null, 8, ["data"]),
|
|
7726
|
-
vue.createVNode(_sfc_main$
|
|
7767
|
+
vue.createVNode(_sfc_main$z, {
|
|
7727
7768
|
data: {
|
|
7728
7769
|
type: "button",
|
|
7729
7770
|
text: "删除",
|
|
@@ -7736,7 +7777,7 @@
|
|
|
7736
7777
|
]),
|
|
7737
7778
|
_: 2
|
|
7738
7779
|
}, 1024)
|
|
7739
|
-
], 10, _hoisted_2$
|
|
7780
|
+
], 10, _hoisted_2$6);
|
|
7740
7781
|
}), 128))
|
|
7741
7782
|
]),
|
|
7742
7783
|
_: 3
|
|
@@ -7746,9 +7787,9 @@
|
|
|
7746
7787
|
}
|
|
7747
7788
|
});
|
|
7748
7789
|
|
|
7749
|
-
const _hoisted_1$
|
|
7750
|
-
const _hoisted_2$
|
|
7751
|
-
const _sfc_main$
|
|
7790
|
+
const _hoisted_1$c = { class: "m-editor-empty-panel" };
|
|
7791
|
+
const _hoisted_2$5 = { class: "m-editor-empty-content" };
|
|
7792
|
+
const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
7752
7793
|
...{
|
|
7753
7794
|
name: "MEditorAddPageBox"
|
|
7754
7795
|
},
|
|
@@ -7770,14 +7811,14 @@
|
|
|
7770
7811
|
});
|
|
7771
7812
|
};
|
|
7772
7813
|
return (_ctx, _cache) => {
|
|
7773
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
7774
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
7814
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [
|
|
7815
|
+
vue.createElementVNode("div", _hoisted_2$5, [
|
|
7775
7816
|
vue.createElementVNode("div", {
|
|
7776
7817
|
class: "m-editor-empty-button",
|
|
7777
7818
|
onClick: _cache[0] || (_cache[0] = ($event) => clickHandler(vue.unref(core.NodeType).PAGE))
|
|
7778
7819
|
}, [
|
|
7779
7820
|
vue.createElementVNode("div", null, [
|
|
7780
|
-
vue.createVNode(_sfc_main$
|
|
7821
|
+
vue.createVNode(_sfc_main$Z, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
|
|
7781
7822
|
]),
|
|
7782
7823
|
_cache[2] || (_cache[2] = vue.createElementVNode("p", null, "新增页面", -1))
|
|
7783
7824
|
]),
|
|
@@ -7787,7 +7828,7 @@
|
|
|
7787
7828
|
onClick: _cache[1] || (_cache[1] = ($event) => clickHandler(vue.unref(core.NodeType).PAGE_FRAGMENT))
|
|
7788
7829
|
}, [
|
|
7789
7830
|
vue.createElementVNode("div", null, [
|
|
7790
|
-
vue.createVNode(_sfc_main$
|
|
7831
|
+
vue.createVNode(_sfc_main$Z, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
|
|
7791
7832
|
]),
|
|
7792
7833
|
_cache[3] || (_cache[3] = vue.createElementVNode("p", null, "新增页面片", -1))
|
|
7793
7834
|
])) : vue.createCommentVNode("", true)
|
|
@@ -7801,7 +7842,7 @@
|
|
|
7801
7842
|
const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
|
|
7802
7843
|
const LEFT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorLeftColumnWidthData";
|
|
7803
7844
|
const RIGHT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorRightColumnWidthData";
|
|
7804
|
-
const _sfc_main$
|
|
7845
|
+
const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
7805
7846
|
...{
|
|
7806
7847
|
name: "MEditorFramework"
|
|
7807
7848
|
},
|
|
@@ -7814,8 +7855,8 @@
|
|
|
7814
7855
|
setup(__props) {
|
|
7815
7856
|
const codeOptions = vue.inject("codeOptions", {});
|
|
7816
7857
|
const { editorService, uiService } = vue.inject("services") || {};
|
|
7817
|
-
const content = vue.
|
|
7818
|
-
const splitView = vue.
|
|
7858
|
+
const content = vue.useTemplateRef("content");
|
|
7859
|
+
const splitView = vue.useTemplateRef("splitView");
|
|
7819
7860
|
const root = vue.computed(() => editorService?.get("root"));
|
|
7820
7861
|
const page = vue.computed(() => editorService?.get("page"));
|
|
7821
7862
|
const pageLength = vue.computed(() => editorService?.get("pageLength") || 0);
|
|
@@ -7879,13 +7920,13 @@
|
|
|
7879
7920
|
vue.renderSlot(_ctx.$slots, "nav"),
|
|
7880
7921
|
vue.renderSlot(_ctx.$slots, "content-before"),
|
|
7881
7922
|
showSrc.value ? vue.renderSlot(_ctx.$slots, "src-code", { key: 0 }, () => [
|
|
7882
|
-
vue.createVNode(_sfc_main$
|
|
7923
|
+
vue.createVNode(_sfc_main$Y, {
|
|
7883
7924
|
class: "m-editor-content",
|
|
7884
7925
|
"init-values": root.value,
|
|
7885
7926
|
options: vue.unref(codeOptions),
|
|
7886
7927
|
onSave: saveCode
|
|
7887
7928
|
}, null, 8, ["init-values", "options"])
|
|
7888
|
-
]) : (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7929
|
+
]) : (vue.openBlock(), vue.createBlock(_sfc_main$A, {
|
|
7889
7930
|
key: 1,
|
|
7890
7931
|
ref_key: "splitView",
|
|
7891
7932
|
ref: splitView,
|
|
@@ -7898,7 +7939,7 @@
|
|
|
7898
7939
|
right: columnWidth.value.right,
|
|
7899
7940
|
"onUpdate:right": _cache[1] || (_cache[1] = ($event) => columnWidth.value.right = $event),
|
|
7900
7941
|
"min-left": 65,
|
|
7901
|
-
"min-right":
|
|
7942
|
+
"min-right": 420,
|
|
7902
7943
|
"min-center": 100,
|
|
7903
7944
|
width: frameworkRect.value?.width || 0,
|
|
7904
7945
|
onChange: columnWidthChange
|
|
@@ -7908,10 +7949,10 @@
|
|
|
7908
7949
|
]),
|
|
7909
7950
|
center: vue.withCtx(() => [
|
|
7910
7951
|
page.value ? vue.renderSlot(_ctx.$slots, "workspace", { key: 0 }) : vue.renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
|
|
7911
|
-
vue.createVNode(_sfc_main$
|
|
7952
|
+
vue.createVNode(_sfc_main$t, { "disabled-page-fragment": _ctx.disabledPageFragment }, null, 8, ["disabled-page-fragment"])
|
|
7912
7953
|
]),
|
|
7913
7954
|
vue.renderSlot(_ctx.$slots, "page-bar", {}, () => [
|
|
7914
|
-
vue.createVNode(_sfc_main$
|
|
7955
|
+
vue.createVNode(_sfc_main$u, {
|
|
7915
7956
|
"disabled-page-fragment": _ctx.disabledPageFragment,
|
|
7916
7957
|
"page-bar-sort-options": _ctx.pageBarSortOptions,
|
|
7917
7958
|
"filter-function": _ctx.pageFilterFunction
|
|
@@ -7937,12 +7978,7 @@
|
|
|
7937
7978
|
page.value ? {
|
|
7938
7979
|
name: "right",
|
|
7939
7980
|
fn: vue.withCtx(() => [
|
|
7940
|
-
vue.
|
|
7941
|
-
default: vue.withCtx(() => [
|
|
7942
|
-
vue.renderSlot(_ctx.$slots, "props-panel")
|
|
7943
|
-
]),
|
|
7944
|
-
_: 3
|
|
7945
|
-
})
|
|
7981
|
+
vue.renderSlot(_ctx.$slots, "props-panel")
|
|
7946
7982
|
]),
|
|
7947
7983
|
key: "0"
|
|
7948
7984
|
} : void 0
|
|
@@ -7954,7 +7990,7 @@
|
|
|
7954
7990
|
}
|
|
7955
7991
|
});
|
|
7956
7992
|
|
|
7957
|
-
const _sfc_main$
|
|
7993
|
+
const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
7958
7994
|
...{
|
|
7959
7995
|
name: "MEditorNavMenu"
|
|
7960
7996
|
},
|
|
@@ -8115,7 +8151,7 @@
|
|
|
8115
8151
|
});
|
|
8116
8152
|
}
|
|
8117
8153
|
});
|
|
8118
|
-
const navMenu = vue.
|
|
8154
|
+
const navMenu = vue.useTemplateRef("navMenu");
|
|
8119
8155
|
vue.onMounted(() => {
|
|
8120
8156
|
navMenu.value && resizeObserver.observe(navMenu.value);
|
|
8121
8157
|
});
|
|
@@ -8136,7 +8172,7 @@
|
|
|
8136
8172
|
style: vue.normalizeStyle(`width: ${columnWidth.value?.[key]}px`)
|
|
8137
8173
|
}, [
|
|
8138
8174
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(buttons.value[key], (item, index) => {
|
|
8139
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
8175
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$z, {
|
|
8140
8176
|
data: item,
|
|
8141
8177
|
key: index
|
|
8142
8178
|
}, null, 8, ["data"]);
|
|
@@ -8148,7 +8184,132 @@
|
|
|
8148
8184
|
}
|
|
8149
8185
|
});
|
|
8150
8186
|
|
|
8187
|
+
const _hoisted_1$b = { class: "m-editor-props-form-panel" };
|
|
8188
|
+
const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
8189
|
+
...{
|
|
8190
|
+
name: "MEditorFormPanel"
|
|
8191
|
+
},
|
|
8192
|
+
__name: "FormPanel",
|
|
8193
|
+
props: {
|
|
8194
|
+
config: {},
|
|
8195
|
+
values: {},
|
|
8196
|
+
disabledShowSrc: { type: Boolean },
|
|
8197
|
+
labelWidth: {},
|
|
8198
|
+
codeValueKey: {},
|
|
8199
|
+
labelPosition: {},
|
|
8200
|
+
extendState: { type: Function }
|
|
8201
|
+
},
|
|
8202
|
+
emits: ["submit", "submit-error", "form-error", "mounted"],
|
|
8203
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
8204
|
+
const props = __props;
|
|
8205
|
+
const emit = __emit;
|
|
8206
|
+
const services = vue.inject("services");
|
|
8207
|
+
const codeOptions = vue.inject("codeOptions", {});
|
|
8208
|
+
const showSrc = vue.ref(false);
|
|
8209
|
+
const propsPanelSize = vue.computed(() => services?.uiService.get("propsPanelSize") || "small");
|
|
8210
|
+
const { height: editorContentHeight } = useEditorContentHeight();
|
|
8211
|
+
const stage = vue.computed(() => services?.editorService.get("stage"));
|
|
8212
|
+
const configForm = vue.useTemplateRef("configForm");
|
|
8213
|
+
vue.watchEffect(() => {
|
|
8214
|
+
if (configForm.value) {
|
|
8215
|
+
configForm.value.formState.stage = stage.value;
|
|
8216
|
+
configForm.value.formState.services = services;
|
|
8217
|
+
}
|
|
8218
|
+
});
|
|
8219
|
+
const internalInstance = vue.getCurrentInstance();
|
|
8220
|
+
vue.onMounted(() => {
|
|
8221
|
+
emit("mounted", internalInstance);
|
|
8222
|
+
});
|
|
8223
|
+
const submit = async (v, eventData) => {
|
|
8224
|
+
try {
|
|
8225
|
+
const values = await configForm.value?.submitForm();
|
|
8226
|
+
emit("submit", values, eventData);
|
|
8227
|
+
} catch (e) {
|
|
8228
|
+
emit("submit-error", e);
|
|
8229
|
+
}
|
|
8230
|
+
};
|
|
8231
|
+
const errorHandler = (e) => {
|
|
8232
|
+
emit("form-error", e);
|
|
8233
|
+
};
|
|
8234
|
+
const saveCode = (values) => {
|
|
8235
|
+
emit("submit", props.codeValueKey ? { [props.codeValueKey]: values } : values);
|
|
8236
|
+
};
|
|
8237
|
+
__expose({ configForm, submit });
|
|
8238
|
+
return (_ctx, _cache) => {
|
|
8239
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [
|
|
8240
|
+
vue.renderSlot(_ctx.$slots, "props-form-panel-header"),
|
|
8241
|
+
vue.createVNode(vue.unref(designPlugin.TMagicScrollbar), null, {
|
|
8242
|
+
default: vue.withCtx(() => [
|
|
8243
|
+
vue.createVNode(vue.unref(formPlugin.MForm), {
|
|
8244
|
+
ref_key: "configForm",
|
|
8245
|
+
ref: configForm,
|
|
8246
|
+
class: vue.normalizeClass(propsPanelSize.value),
|
|
8247
|
+
"popper-class": `m-editor-props-panel-popper ${propsPanelSize.value}`,
|
|
8248
|
+
"label-width": _ctx.labelWidth,
|
|
8249
|
+
"label-position": _ctx.labelPosition,
|
|
8250
|
+
size: propsPanelSize.value,
|
|
8251
|
+
"init-values": _ctx.values,
|
|
8252
|
+
config: _ctx.config,
|
|
8253
|
+
"extend-state": _ctx.extendState,
|
|
8254
|
+
onChange: submit,
|
|
8255
|
+
onError: errorHandler
|
|
8256
|
+
}, null, 8, ["class", "popper-class", "label-width", "label-position", "size", "init-values", "config", "extend-state"])
|
|
8257
|
+
]),
|
|
8258
|
+
_: 1
|
|
8259
|
+
}),
|
|
8260
|
+
!_ctx.disabledShowSrc ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicButton), {
|
|
8261
|
+
key: 0,
|
|
8262
|
+
class: "m-editor-props-panel-src-icon",
|
|
8263
|
+
circle: "",
|
|
8264
|
+
title: "源码",
|
|
8265
|
+
type: showSrc.value ? "primary" : "",
|
|
8266
|
+
onClick: _cache[0] || (_cache[0] = ($event) => showSrc.value = !showSrc.value)
|
|
8267
|
+
}, {
|
|
8268
|
+
default: vue.withCtx(() => [
|
|
8269
|
+
vue.createVNode(_sfc_main$Z, { icon: vue.unref(iconsVue.Document) }, null, 8, ["icon"])
|
|
8270
|
+
]),
|
|
8271
|
+
_: 1
|
|
8272
|
+
}, 8, ["type"])) : vue.createCommentVNode("", true),
|
|
8273
|
+
showSrc.value ? (vue.openBlock(), vue.createBlock(_sfc_main$Y, {
|
|
8274
|
+
key: 1,
|
|
8275
|
+
class: "m-editor-props-panel-src-code",
|
|
8276
|
+
height: `${vue.unref(editorContentHeight)}px`,
|
|
8277
|
+
"init-values": _ctx.codeValueKey ? _ctx.values[_ctx.codeValueKey] : _ctx.values,
|
|
8278
|
+
options: vue.unref(codeOptions),
|
|
8279
|
+
parse: true,
|
|
8280
|
+
onSave: saveCode
|
|
8281
|
+
}, null, 8, ["height", "init-values", "options"])) : vue.createCommentVNode("", true)
|
|
8282
|
+
]);
|
|
8283
|
+
};
|
|
8284
|
+
}
|
|
8285
|
+
});
|
|
8286
|
+
|
|
8287
|
+
const useStylePanel = (services) => {
|
|
8288
|
+
const showStylePanelStorageKey = "props-panel-show-style-panel";
|
|
8289
|
+
const showStylePanelStorageValue = services?.storageService.getItem(showStylePanelStorageKey, {
|
|
8290
|
+
protocol: Protocol.BOOLEAN
|
|
8291
|
+
});
|
|
8292
|
+
if (typeof showStylePanelStorageValue === "boolean") {
|
|
8293
|
+
services?.uiService.set("showStylePanel", showStylePanelStorageValue);
|
|
8294
|
+
}
|
|
8295
|
+
const showStylePanel = vue.computed(() => services?.uiService.get("showStylePanel") ?? true);
|
|
8296
|
+
const showStylePanelHandler = () => {
|
|
8297
|
+
services?.uiService.set("showStylePanel", true);
|
|
8298
|
+
services?.storageService.setItem(showStylePanelStorageKey, true, { protocol: Protocol.BOOLEAN });
|
|
8299
|
+
};
|
|
8300
|
+
const closeStylePanelHandler = () => {
|
|
8301
|
+
services?.uiService.set("showStylePanel", false);
|
|
8302
|
+
services?.storageService.setItem(showStylePanelStorageKey, false, { protocol: Protocol.BOOLEAN });
|
|
8303
|
+
};
|
|
8304
|
+
return {
|
|
8305
|
+
showStylePanel,
|
|
8306
|
+
showStylePanelHandler,
|
|
8307
|
+
closeStylePanelHandler
|
|
8308
|
+
};
|
|
8309
|
+
};
|
|
8310
|
+
|
|
8151
8311
|
const _hoisted_1$a = { class: "m-editor-props-panel" };
|
|
8312
|
+
const _hoisted_2$4 = { class: "m-editor-props-style-panel-title" };
|
|
8152
8313
|
const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
8153
8314
|
...{
|
|
8154
8315
|
name: "MEditorPropsPanel"
|
|
@@ -8158,21 +8319,20 @@
|
|
|
8158
8319
|
disabledShowSrc: { type: Boolean },
|
|
8159
8320
|
extendState: { type: Function }
|
|
8160
8321
|
},
|
|
8161
|
-
emits: ["
|
|
8322
|
+
emits: ["submit-error", "form-error", "mounted"],
|
|
8162
8323
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
8163
|
-
const codeOptions = vue.inject("codeOptions", {});
|
|
8164
8324
|
const emit = __emit;
|
|
8165
|
-
const
|
|
8166
|
-
const internalInstance = vue.getCurrentInstance();
|
|
8325
|
+
const services = vue.inject("services");
|
|
8167
8326
|
const values = vue.ref({});
|
|
8168
|
-
const configForm = vue.ref();
|
|
8169
8327
|
const curFormConfig = vue.ref([]);
|
|
8170
|
-
const services = vue.inject("services");
|
|
8171
8328
|
const node = vue.computed(() => services?.editorService.get("node"));
|
|
8172
8329
|
const nodes = vue.computed(() => services?.editorService.get("nodes") || []);
|
|
8173
|
-
const
|
|
8174
|
-
|
|
8175
|
-
|
|
8330
|
+
const styleFormConfig = [
|
|
8331
|
+
{
|
|
8332
|
+
tabPosition: "right",
|
|
8333
|
+
items: styleTabConfig.items
|
|
8334
|
+
}
|
|
8335
|
+
];
|
|
8176
8336
|
const init = async () => {
|
|
8177
8337
|
if (!node.value) {
|
|
8178
8338
|
curFormConfig.value = [];
|
|
@@ -8184,21 +8344,15 @@
|
|
|
8184
8344
|
};
|
|
8185
8345
|
vue.watchEffect(init);
|
|
8186
8346
|
services?.propsService.on("props-configs-change", init);
|
|
8187
|
-
vue.onMounted(() => {
|
|
8188
|
-
emit("mounted", internalInstance);
|
|
8189
|
-
});
|
|
8190
8347
|
vue.onBeforeUnmount(() => {
|
|
8191
8348
|
services?.propsService.off("props-configs-change", init);
|
|
8192
8349
|
});
|
|
8193
|
-
vue.watchEffect(() => {
|
|
8194
|
-
if (configForm.value && stage.value) {
|
|
8195
|
-
configForm.value.formState.stage = stage.value;
|
|
8196
|
-
}
|
|
8197
|
-
});
|
|
8198
8350
|
const submit = async (v, eventData) => {
|
|
8199
8351
|
try {
|
|
8200
|
-
|
|
8201
|
-
|
|
8352
|
+
if (!v.id) {
|
|
8353
|
+
v.id = values.value.id;
|
|
8354
|
+
}
|
|
8355
|
+
services?.editorService.update(v, { changeRecords: eventData?.changeRecords });
|
|
8202
8356
|
} catch (e) {
|
|
8203
8357
|
emit("submit-error", e);
|
|
8204
8358
|
}
|
|
@@ -8206,48 +8360,76 @@
|
|
|
8206
8360
|
const errorHandler = (e) => {
|
|
8207
8361
|
emit("form-error", e);
|
|
8208
8362
|
};
|
|
8209
|
-
const
|
|
8210
|
-
|
|
8363
|
+
const mountedHandler = (e) => {
|
|
8364
|
+
emit("mounted", e);
|
|
8211
8365
|
};
|
|
8212
|
-
|
|
8366
|
+
const { showStylePanel, showStylePanelHandler, closeStylePanelHandler } = useStylePanel(services);
|
|
8367
|
+
const propertyFormPanelRef = vue.useTemplateRef("propertyFormPanel");
|
|
8368
|
+
__expose({
|
|
8369
|
+
getFormState() {
|
|
8370
|
+
return propertyFormPanelRef.value?.configForm?.formState;
|
|
8371
|
+
},
|
|
8372
|
+
submit
|
|
8373
|
+
});
|
|
8213
8374
|
return (_ctx, _cache) => {
|
|
8214
8375
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
|
|
8215
8376
|
vue.renderSlot(_ctx.$slots, "props-panel-header"),
|
|
8216
|
-
vue.createVNode(
|
|
8217
|
-
|
|
8218
|
-
|
|
8219
|
-
class: vue.normalizeClass(propsPanelSize.value),
|
|
8220
|
-
"popper-class": `m-editor-props-panel-popper ${propsPanelSize.value}`,
|
|
8221
|
-
size: propsPanelSize.value,
|
|
8222
|
-
"init-values": values.value,
|
|
8377
|
+
vue.createVNode(_sfc_main$q, {
|
|
8378
|
+
ref: "propertyFormPanel",
|
|
8379
|
+
class: vue.normalizeClass(["m-editor-props-property-panel", { "show-style-panel": vue.unref(showStylePanel) }]),
|
|
8223
8380
|
config: curFormConfig.value,
|
|
8224
|
-
|
|
8225
|
-
|
|
8226
|
-
|
|
8227
|
-
|
|
8228
|
-
|
|
8381
|
+
values: values.value,
|
|
8382
|
+
disabledShowSrc: _ctx.disabledShowSrc,
|
|
8383
|
+
extendState: _ctx.extendState,
|
|
8384
|
+
onSubmit: submit,
|
|
8385
|
+
onSubmitError: errorHandler,
|
|
8386
|
+
onFormError: errorHandler,
|
|
8387
|
+
onMounted: mountedHandler
|
|
8388
|
+
}, null, 8, ["class", "config", "values", "disabledShowSrc", "extendState"]),
|
|
8389
|
+
vue.unref(showStylePanel) ? (vue.openBlock(), vue.createBlock(_sfc_main$q, {
|
|
8229
8390
|
key: 0,
|
|
8230
|
-
class: "m-editor-props-panel
|
|
8391
|
+
class: "m-editor-props-style-panel",
|
|
8392
|
+
"label-position": "top",
|
|
8393
|
+
"code-value-key": "style",
|
|
8394
|
+
config: styleFormConfig,
|
|
8395
|
+
values: values.value,
|
|
8396
|
+
disabledShowSrc: _ctx.disabledShowSrc,
|
|
8397
|
+
extendState: _ctx.extendState,
|
|
8398
|
+
onSubmit: submit,
|
|
8399
|
+
onSubmitError: errorHandler,
|
|
8400
|
+
onFormError: errorHandler
|
|
8401
|
+
}, {
|
|
8402
|
+
"props-form-panel-header": vue.withCtx(() => [
|
|
8403
|
+
vue.createElementVNode("div", _hoisted_2$4, [
|
|
8404
|
+
_cache[0] || (_cache[0] = vue.createElementVNode("span", null, "样式", -1)),
|
|
8405
|
+
vue.createElementVNode("div", null, [
|
|
8406
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
8407
|
+
link: "",
|
|
8408
|
+
size: "small",
|
|
8409
|
+
onClick: vue.unref(closeStylePanelHandler)
|
|
8410
|
+
}, {
|
|
8411
|
+
default: vue.withCtx(() => [
|
|
8412
|
+
vue.createVNode(_sfc_main$Z, { icon: vue.unref(iconsVue.Close) }, null, 8, ["icon"])
|
|
8413
|
+
]),
|
|
8414
|
+
_: 1
|
|
8415
|
+
}, 8, ["onClick"])
|
|
8416
|
+
])
|
|
8417
|
+
])
|
|
8418
|
+
]),
|
|
8419
|
+
_: 1
|
|
8420
|
+
}, 8, ["values", "disabledShowSrc", "extendState"])) : vue.createCommentVNode("", true),
|
|
8421
|
+
!vue.unref(showStylePanel) ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicButton), {
|
|
8422
|
+
key: 1,
|
|
8423
|
+
class: "m-editor-props-panel-style-icon",
|
|
8231
8424
|
circle: "",
|
|
8232
|
-
|
|
8233
|
-
|
|
8234
|
-
type: showSrc.value ? "primary" : "",
|
|
8235
|
-
onClick: _cache[0] || (_cache[0] = ($event) => showSrc.value = !showSrc.value)
|
|
8425
|
+
type: vue.unref(showStylePanel) ? "primary" : "",
|
|
8426
|
+
onClick: vue.unref(showStylePanelHandler)
|
|
8236
8427
|
}, {
|
|
8237
8428
|
default: vue.withCtx(() => [
|
|
8238
|
-
vue.createVNode(_sfc_main$
|
|
8429
|
+
vue.createVNode(_sfc_main$Z, { icon: vue.unref(iconsVue.Sugar) }, null, 8, ["icon"])
|
|
8239
8430
|
]),
|
|
8240
8431
|
_: 1
|
|
8241
|
-
}, 8, ["type"])) : vue.createCommentVNode("", true)
|
|
8242
|
-
showSrc.value ? (vue.openBlock(), vue.createBlock(_sfc_main$X, {
|
|
8243
|
-
key: 1,
|
|
8244
|
-
class: "m-editor-props-panel-src-code",
|
|
8245
|
-
height: `${vue.unref(editorContentHeight)}px`,
|
|
8246
|
-
"init-values": values.value,
|
|
8247
|
-
options: vue.unref(codeOptions),
|
|
8248
|
-
parse: true,
|
|
8249
|
-
onSave: saveCode
|
|
8250
|
-
}, null, 8, ["height", "init-values", "options"])) : vue.createCommentVNode("", true)
|
|
8432
|
+
}, 8, ["type", "onClick"])) : vue.createCommentVNode("", true)
|
|
8251
8433
|
], 512)), [
|
|
8252
8434
|
[vue.vShow, nodes.value.length === 1]
|
|
8253
8435
|
]);
|
|
@@ -8257,12 +8439,179 @@
|
|
|
8257
8439
|
|
|
8258
8440
|
const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
8259
8441
|
...{
|
|
8260
|
-
name: "
|
|
8442
|
+
name: "MEditorContentMenu"
|
|
8261
8443
|
},
|
|
8262
|
-
__name: "
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
|
|
8444
|
+
__name: "ContentMenu",
|
|
8445
|
+
props: {
|
|
8446
|
+
menuData: { default: () => [] },
|
|
8447
|
+
isSubMenu: { type: Boolean, default: false },
|
|
8448
|
+
active: {},
|
|
8449
|
+
autoHide: { type: Boolean, default: true }
|
|
8450
|
+
},
|
|
8451
|
+
emits: ["hide", "show", "mouseenter"],
|
|
8452
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
8453
|
+
const props = __props;
|
|
8454
|
+
const emit = __emit;
|
|
8455
|
+
const menu = vue.useTemplateRef("menu");
|
|
8456
|
+
const buttons = vue.useTemplateRef("buttons");
|
|
8457
|
+
const subMenu = vue.useTemplateRef("subMenu");
|
|
8458
|
+
const visible = vue.ref(false);
|
|
8459
|
+
const subMenuData = vue.ref([]);
|
|
8460
|
+
const zIndex = designPlugin.useZIndex();
|
|
8461
|
+
const curZIndex = vue.ref(0);
|
|
8462
|
+
const menuPosition = vue.ref({
|
|
8463
|
+
left: 0,
|
|
8464
|
+
top: 0
|
|
8465
|
+
});
|
|
8466
|
+
const menuStyle = vue.computed(() => ({
|
|
8467
|
+
top: `${menuPosition.value.top + 2}px`,
|
|
8468
|
+
left: `${menuPosition.value.left + 2}px`,
|
|
8469
|
+
zIndex: curZIndex.value
|
|
8470
|
+
}));
|
|
8471
|
+
const contains = (el) => menu.value?.contains(el) || subMenu.value?.contains(el);
|
|
8472
|
+
const hide = () => {
|
|
8473
|
+
if (!visible.value) return;
|
|
8474
|
+
visible.value = false;
|
|
8475
|
+
subMenu.value?.hide();
|
|
8476
|
+
emit("hide");
|
|
8477
|
+
};
|
|
8478
|
+
const clickHandler = (event) => {
|
|
8479
|
+
if (!props.autoHide) return;
|
|
8480
|
+
if (event.button === 0) {
|
|
8481
|
+
hide();
|
|
8482
|
+
}
|
|
8483
|
+
};
|
|
8484
|
+
const outsideClickHideHandler = (e) => {
|
|
8485
|
+
if (!props.autoHide) return;
|
|
8486
|
+
const target = e.target;
|
|
8487
|
+
if (!visible.value || !target) {
|
|
8488
|
+
return;
|
|
8489
|
+
}
|
|
8490
|
+
if (contains(target)) {
|
|
8491
|
+
return;
|
|
8492
|
+
}
|
|
8493
|
+
hide();
|
|
8494
|
+
};
|
|
8495
|
+
const setPosition = (e) => {
|
|
8496
|
+
const menuHeight = menu.value?.clientHeight || 0;
|
|
8497
|
+
let top = e.clientY;
|
|
8498
|
+
if (menuHeight + e.clientY > document.body.clientHeight) {
|
|
8499
|
+
top = document.body.clientHeight - menuHeight;
|
|
8500
|
+
}
|
|
8501
|
+
menuPosition.value = {
|
|
8502
|
+
top,
|
|
8503
|
+
left: e.clientX
|
|
8504
|
+
};
|
|
8505
|
+
};
|
|
8506
|
+
const show = (e) => {
|
|
8507
|
+
visible.value = true;
|
|
8508
|
+
vue.nextTick(() => {
|
|
8509
|
+
e && setPosition(e);
|
|
8510
|
+
curZIndex.value = zIndex.nextZIndex();
|
|
8511
|
+
emit("show");
|
|
8512
|
+
});
|
|
8513
|
+
};
|
|
8514
|
+
const showSubMenu = (item, index) => {
|
|
8515
|
+
const menuItem = item;
|
|
8516
|
+
if (typeof item !== "object") {
|
|
8517
|
+
return;
|
|
8518
|
+
}
|
|
8519
|
+
subMenuData.value = menuItem.items || [];
|
|
8520
|
+
setTimeout(() => {
|
|
8521
|
+
if (!visible.value) {
|
|
8522
|
+
return;
|
|
8523
|
+
}
|
|
8524
|
+
if (menu.value) {
|
|
8525
|
+
let y = menu.value.offsetTop;
|
|
8526
|
+
if (buttons.value?.[index].$el) {
|
|
8527
|
+
const rect = buttons.value?.[index].$el.getBoundingClientRect();
|
|
8528
|
+
y = rect.top;
|
|
8529
|
+
}
|
|
8530
|
+
subMenu.value?.show({
|
|
8531
|
+
clientX: menu.value.offsetLeft + menu.value.clientWidth - 2,
|
|
8532
|
+
clientY: y
|
|
8533
|
+
});
|
|
8534
|
+
}
|
|
8535
|
+
}, 0);
|
|
8536
|
+
};
|
|
8537
|
+
const mouseenterHandler = () => {
|
|
8538
|
+
emit("mouseenter");
|
|
8539
|
+
};
|
|
8540
|
+
vue.onMounted(() => {
|
|
8541
|
+
if (props.isSubMenu) return;
|
|
8542
|
+
globalThis.addEventListener("mousedown", outsideClickHideHandler, true);
|
|
8543
|
+
});
|
|
8544
|
+
vue.onBeforeUnmount(() => {
|
|
8545
|
+
if (props.isSubMenu) return;
|
|
8546
|
+
globalThis.removeEventListener("mousedown", outsideClickHideHandler, true);
|
|
8547
|
+
});
|
|
8548
|
+
__expose({
|
|
8549
|
+
menu,
|
|
8550
|
+
menuPosition,
|
|
8551
|
+
hide,
|
|
8552
|
+
show,
|
|
8553
|
+
contains,
|
|
8554
|
+
setPosition
|
|
8555
|
+
});
|
|
8556
|
+
return (_ctx, _cache) => {
|
|
8557
|
+
const _component_content_menu = vue.resolveComponent("content-menu", true);
|
|
8558
|
+
return vue.openBlock(), vue.createBlock(vue.Transition, { name: "fade" }, {
|
|
8559
|
+
default: vue.withCtx(() => [
|
|
8560
|
+
vue.withDirectives(vue.createElementVNode("div", {
|
|
8561
|
+
class: "magic-editor-content-menu",
|
|
8562
|
+
ref_key: "menu",
|
|
8563
|
+
ref: menu,
|
|
8564
|
+
style: vue.normalizeStyle(menuStyle.value),
|
|
8565
|
+
onMouseenter: _cache[0] || (_cache[0] = ($event) => mouseenterHandler()),
|
|
8566
|
+
onContextmenu: _cache[1] || (_cache[1] = vue.withModifiers(() => {
|
|
8567
|
+
}, ["prevent"]))
|
|
8568
|
+
}, [
|
|
8569
|
+
vue.renderSlot(_ctx.$slots, "title"),
|
|
8570
|
+
vue.createElementVNode("div", null, [
|
|
8571
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menuData, (item, index) => {
|
|
8572
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$z, {
|
|
8573
|
+
"event-type": "mouseup",
|
|
8574
|
+
ref_for: true,
|
|
8575
|
+
ref_key: "buttons",
|
|
8576
|
+
ref: buttons,
|
|
8577
|
+
class: vue.normalizeClass({ active: _ctx.active && item.id === _ctx.active }),
|
|
8578
|
+
data: item,
|
|
8579
|
+
key: index,
|
|
8580
|
+
onMouseup: clickHandler,
|
|
8581
|
+
onMouseenter: ($event) => showSubMenu(item, index)
|
|
8582
|
+
}, null, 8, ["class", "data", "onMouseenter"]);
|
|
8583
|
+
}), 128))
|
|
8584
|
+
]),
|
|
8585
|
+
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
8586
|
+
subMenuData.value.length ? (vue.openBlock(), vue.createBlock(_component_content_menu, {
|
|
8587
|
+
key: 0,
|
|
8588
|
+
class: "sub-menu",
|
|
8589
|
+
ref_key: "subMenu",
|
|
8590
|
+
ref: subMenu,
|
|
8591
|
+
active: _ctx.active,
|
|
8592
|
+
"menu-data": subMenuData.value,
|
|
8593
|
+
"is-sub-menu": true,
|
|
8594
|
+
onHide: hide
|
|
8595
|
+
}, null, 8, ["active", "menu-data"])) : vue.createCommentVNode("", true)
|
|
8596
|
+
]))
|
|
8597
|
+
], 36), [
|
|
8598
|
+
[vue.vShow, visible.value]
|
|
8599
|
+
])
|
|
8600
|
+
]),
|
|
8601
|
+
_: 3
|
|
8602
|
+
});
|
|
8603
|
+
};
|
|
8604
|
+
}
|
|
8605
|
+
});
|
|
8606
|
+
|
|
8607
|
+
const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
8608
|
+
...{
|
|
8609
|
+
name: "MEditorSearchInput"
|
|
8610
|
+
},
|
|
8611
|
+
__name: "SearchInput",
|
|
8612
|
+
emits: ["search"],
|
|
8613
|
+
setup(__props, { emit: __emit }) {
|
|
8614
|
+
const emit = __emit;
|
|
8266
8615
|
const filterText = vue.ref("");
|
|
8267
8616
|
let timer = null;
|
|
8268
8617
|
const filterTextChangeHandler = () => {
|
|
@@ -8303,7 +8652,7 @@
|
|
|
8303
8652
|
key: 0,
|
|
8304
8653
|
class: "m-editor-tree-node-children"
|
|
8305
8654
|
};
|
|
8306
|
-
const _sfc_main$
|
|
8655
|
+
const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
8307
8656
|
...{
|
|
8308
8657
|
name: "MEditorTreeNode"
|
|
8309
8658
|
},
|
|
@@ -8377,7 +8726,7 @@
|
|
|
8377
8726
|
onContextmenu: nodeContentmenuHandler,
|
|
8378
8727
|
onMouseenter: mouseenterHandler
|
|
8379
8728
|
}, [
|
|
8380
|
-
vue.createVNode(_sfc_main$
|
|
8729
|
+
vue.createVNode(_sfc_main$Z, {
|
|
8381
8730
|
class: "expand-icon",
|
|
8382
8731
|
style: vue.normalizeStyle(hasChildren.value ? "" : "color: transparent; cursor: default"),
|
|
8383
8732
|
icon: expanded.value ? vue.unref(iconsVue.ArrowDown) : vue.unref(iconsVue.ArrowRight),
|
|
@@ -8433,7 +8782,7 @@
|
|
|
8433
8782
|
key: 1,
|
|
8434
8783
|
class: "m-editor-tree-empty"
|
|
8435
8784
|
};
|
|
8436
|
-
const _sfc_main$
|
|
8785
|
+
const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
8437
8786
|
...{
|
|
8438
8787
|
name: "MEditorTree"
|
|
8439
8788
|
},
|
|
@@ -8458,7 +8807,7 @@
|
|
|
8458
8807
|
onDragover: handleDragOver
|
|
8459
8808
|
}, [
|
|
8460
8809
|
_ctx.data?.length ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(_ctx.data, (item) => {
|
|
8461
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
8810
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$m, {
|
|
8462
8811
|
key: item.id,
|
|
8463
8812
|
data: item,
|
|
8464
8813
|
indent: _ctx.indent,
|
|
@@ -8484,7 +8833,7 @@
|
|
|
8484
8833
|
}
|
|
8485
8834
|
});
|
|
8486
8835
|
|
|
8487
|
-
const _sfc_main$
|
|
8836
|
+
const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
8488
8837
|
...{
|
|
8489
8838
|
name: "MEditorCodeBlockList"
|
|
8490
8839
|
},
|
|
@@ -8494,7 +8843,7 @@
|
|
|
8494
8843
|
nextLevelIndentIncrement: {},
|
|
8495
8844
|
customError: { type: Function }
|
|
8496
8845
|
},
|
|
8497
|
-
emits: ["edit", "remove"],
|
|
8846
|
+
emits: ["edit", "remove", "node-contextmenu"],
|
|
8498
8847
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
8499
8848
|
const props = __props;
|
|
8500
8849
|
const emit = __emit;
|
|
@@ -8575,20 +8924,29 @@
|
|
|
8575
8924
|
if (typeof props.customError === "function") {
|
|
8576
8925
|
props.customError(id, existBinds ? CodeDeleteErrorType.BIND : CodeDeleteErrorType.UNDELETEABLE);
|
|
8577
8926
|
} else {
|
|
8578
|
-
|
|
8927
|
+
if (existBinds) {
|
|
8928
|
+
designPlugin.tMagicMessage.error("代码块存在绑定关系,不可删除");
|
|
8929
|
+
} else {
|
|
8930
|
+
designPlugin.tMagicMessage.error("代码块不可删除");
|
|
8931
|
+
}
|
|
8579
8932
|
}
|
|
8580
8933
|
}
|
|
8581
8934
|
};
|
|
8935
|
+
const nodeContentMenuHandler = (event, data) => {
|
|
8936
|
+
emit("node-contextmenu", event, data);
|
|
8937
|
+
};
|
|
8582
8938
|
__expose({
|
|
8583
|
-
filter: filterTextChangeHandler
|
|
8939
|
+
filter: filterTextChangeHandler,
|
|
8940
|
+
deleteCode
|
|
8584
8941
|
});
|
|
8585
8942
|
return (_ctx, _cache) => {
|
|
8586
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
8943
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$l, {
|
|
8587
8944
|
data: codeList.value,
|
|
8588
8945
|
"node-status-map": vue.unref(nodeStatusMap),
|
|
8589
8946
|
indent: _ctx.indent,
|
|
8590
8947
|
"next-level-indent-increment": _ctx.nextLevelIndentIncrement,
|
|
8591
|
-
onNodeClick: clickHandler
|
|
8948
|
+
onNodeClick: clickHandler,
|
|
8949
|
+
onNodeContextmenu: nodeContentMenuHandler
|
|
8592
8950
|
}, {
|
|
8593
8951
|
"tree-node-label": vue.withCtx(({ data }) => [
|
|
8594
8952
|
vue.createElementVNode("div", {
|
|
@@ -8618,7 +8976,7 @@
|
|
|
8618
8976
|
placement: "bottom"
|
|
8619
8977
|
}, {
|
|
8620
8978
|
default: vue.withCtx(() => [
|
|
8621
|
-
vue.createVNode(_sfc_main$
|
|
8979
|
+
vue.createVNode(_sfc_main$Z, {
|
|
8622
8980
|
icon: editable.value ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
|
|
8623
8981
|
class: "edit-icon",
|
|
8624
8982
|
onClick: vue.withModifiers(($event) => editCode(`${data.key}`), ["stop"])
|
|
@@ -8633,7 +8991,7 @@
|
|
|
8633
8991
|
placement: "bottom"
|
|
8634
8992
|
}, {
|
|
8635
8993
|
default: vue.withCtx(() => [
|
|
8636
|
-
vue.createVNode(_sfc_main$
|
|
8994
|
+
vue.createVNode(_sfc_main$Z, {
|
|
8637
8995
|
icon: vue.unref(iconsVue.Close),
|
|
8638
8996
|
class: "edit-icon",
|
|
8639
8997
|
onClick: vue.withModifiers(($event) => deleteCode(`${data.key}`), ["stop"])
|
|
@@ -8652,8 +9010,74 @@
|
|
|
8652
9010
|
}
|
|
8653
9011
|
});
|
|
8654
9012
|
|
|
9013
|
+
const useContentMenu$1 = (deleteCode) => {
|
|
9014
|
+
const eventBus = vue.inject("eventBus");
|
|
9015
|
+
const menuRef = vue.useTemplateRef("menu");
|
|
9016
|
+
let selectId = "";
|
|
9017
|
+
const menuData = [
|
|
9018
|
+
{
|
|
9019
|
+
type: "button",
|
|
9020
|
+
text: "编辑",
|
|
9021
|
+
icon: iconsVue.Edit,
|
|
9022
|
+
display: (services) => services?.codeBlockService?.getEditStatus() ?? true,
|
|
9023
|
+
handler: () => {
|
|
9024
|
+
if (!selectId) {
|
|
9025
|
+
return;
|
|
9026
|
+
}
|
|
9027
|
+
eventBus?.emit("edit-code", selectId);
|
|
9028
|
+
}
|
|
9029
|
+
},
|
|
9030
|
+
{
|
|
9031
|
+
type: "button",
|
|
9032
|
+
text: "复制并粘贴至当前",
|
|
9033
|
+
icon: vue.markRaw(iconsVue.CopyDocument),
|
|
9034
|
+
handler: async ({ codeBlockService }) => {
|
|
9035
|
+
if (!selectId) {
|
|
9036
|
+
return;
|
|
9037
|
+
}
|
|
9038
|
+
const codeBlock = codeBlockService.getCodeContentById(selectId);
|
|
9039
|
+
if (!codeBlock) {
|
|
9040
|
+
return;
|
|
9041
|
+
}
|
|
9042
|
+
const newCodeId = await codeBlockService.getUniqueId();
|
|
9043
|
+
codeBlockService.setCodeDslById(newCodeId, lodashEs.cloneDeep(codeBlock));
|
|
9044
|
+
}
|
|
9045
|
+
},
|
|
9046
|
+
{
|
|
9047
|
+
type: "button",
|
|
9048
|
+
text: "删除",
|
|
9049
|
+
icon: iconsVue.Delete,
|
|
9050
|
+
handler: () => {
|
|
9051
|
+
if (!selectId) {
|
|
9052
|
+
return;
|
|
9053
|
+
}
|
|
9054
|
+
deleteCode(selectId);
|
|
9055
|
+
}
|
|
9056
|
+
}
|
|
9057
|
+
];
|
|
9058
|
+
const nodeContentMenuHandler = (event, data) => {
|
|
9059
|
+
event.preventDefault();
|
|
9060
|
+
if (data.type === "code") {
|
|
9061
|
+
menuRef.value?.show(event);
|
|
9062
|
+
if (data.id) {
|
|
9063
|
+
selectId = `${data.id}`;
|
|
9064
|
+
} else {
|
|
9065
|
+
selectId = "";
|
|
9066
|
+
}
|
|
9067
|
+
}
|
|
9068
|
+
};
|
|
9069
|
+
const contentMenuHideHandler = () => {
|
|
9070
|
+
selectId = "";
|
|
9071
|
+
};
|
|
9072
|
+
return {
|
|
9073
|
+
menuData,
|
|
9074
|
+
nodeContentMenuHandler,
|
|
9075
|
+
contentMenuHideHandler
|
|
9076
|
+
};
|
|
9077
|
+
};
|
|
9078
|
+
|
|
8655
9079
|
const _hoisted_1$7 = { class: "search-wrapper" };
|
|
8656
|
-
const _sfc_main$
|
|
9080
|
+
const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
8657
9081
|
...{
|
|
8658
9082
|
name: "MEditorCodeBlockListPanel"
|
|
8659
9083
|
},
|
|
@@ -8661,27 +9085,37 @@
|
|
|
8661
9085
|
props: {
|
|
8662
9086
|
indent: {},
|
|
8663
9087
|
nextLevelIndentIncrement: {},
|
|
8664
|
-
customError: { type: Function }
|
|
9088
|
+
customError: { type: Function },
|
|
9089
|
+
customContentMenu: { type: Function }
|
|
8665
9090
|
},
|
|
8666
9091
|
setup(__props) {
|
|
9092
|
+
const props = __props;
|
|
8667
9093
|
const eventBus = vue.inject("eventBus");
|
|
8668
9094
|
const { codeBlockService } = vue.inject("services") || {};
|
|
8669
9095
|
const editable = vue.computed(() => codeBlockService?.getEditStatus());
|
|
8670
9096
|
const { codeBlockEditor, codeConfig, editCode, deleteCode, createCodeBlock, submitCodeBlockHandler } = useCodeBlockEdit(codeBlockService);
|
|
8671
|
-
const codeBlockList = vue.
|
|
9097
|
+
const codeBlockList = vue.useTemplateRef("codeBlockList");
|
|
8672
9098
|
const filterTextChangeHandler = (val) => {
|
|
8673
9099
|
codeBlockList.value?.filter(val);
|
|
8674
9100
|
};
|
|
8675
9101
|
eventBus?.on("edit-code", (id) => {
|
|
8676
9102
|
editCode(id);
|
|
8677
9103
|
});
|
|
9104
|
+
const {
|
|
9105
|
+
nodeContentMenuHandler,
|
|
9106
|
+
menuData: contentMenuData,
|
|
9107
|
+
contentMenuHideHandler
|
|
9108
|
+
} = useContentMenu$1((id) => {
|
|
9109
|
+
codeBlockList.value?.deleteCode(id);
|
|
9110
|
+
});
|
|
9111
|
+
const menuData = vue.computed(() => props.customContentMenu(contentMenuData, "code-block"));
|
|
8678
9112
|
return (_ctx, _cache) => {
|
|
8679
9113
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
8680
9114
|
vue.createVNode(vue.unref(designPlugin.TMagicScrollbar), { class: "m-editor-code-block-list m-editor-layer-panel" }, {
|
|
8681
9115
|
default: vue.withCtx(() => [
|
|
8682
9116
|
vue.renderSlot(_ctx.$slots, "code-block-panel-header", {}, () => [
|
|
8683
9117
|
vue.createElementVNode("div", _hoisted_1$7, [
|
|
8684
|
-
vue.createVNode(_sfc_main$
|
|
9118
|
+
vue.createVNode(_sfc_main$n, { onSearch: filterTextChangeHandler }),
|
|
8685
9119
|
editable.value ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicButton), {
|
|
8686
9120
|
key: 0,
|
|
8687
9121
|
class: "create-code-button",
|
|
@@ -8697,14 +9131,15 @@
|
|
|
8697
9131
|
vue.renderSlot(_ctx.$slots, "code-block-panel-search")
|
|
8698
9132
|
])
|
|
8699
9133
|
]),
|
|
8700
|
-
vue.createVNode(_sfc_main$
|
|
9134
|
+
vue.createVNode(_sfc_main$k, {
|
|
8701
9135
|
ref_key: "codeBlockList",
|
|
8702
9136
|
ref: codeBlockList,
|
|
8703
9137
|
"custom-error": _ctx.customError,
|
|
8704
9138
|
indent: _ctx.indent,
|
|
8705
9139
|
"next-level-indent-increment": _ctx.nextLevelIndentIncrement,
|
|
8706
9140
|
onEdit: vue.unref(editCode),
|
|
8707
|
-
onRemove: vue.unref(deleteCode)
|
|
9141
|
+
onRemove: vue.unref(deleteCode),
|
|
9142
|
+
onNodeContextmenu: vue.unref(nodeContentMenuHandler)
|
|
8708
9143
|
}, {
|
|
8709
9144
|
"code-block-panel-tool": vue.withCtx(({ id, data }) => [
|
|
8710
9145
|
vue.renderSlot(_ctx.$slots, "code-block-panel-tool", {
|
|
@@ -8713,18 +9148,27 @@
|
|
|
8713
9148
|
})
|
|
8714
9149
|
]),
|
|
8715
9150
|
_: 3
|
|
8716
|
-
}, 8, ["custom-error", "indent", "next-level-indent-increment", "onEdit", "onRemove"])
|
|
9151
|
+
}, 8, ["custom-error", "indent", "next-level-indent-increment", "onEdit", "onRemove", "onNodeContextmenu"])
|
|
8717
9152
|
]),
|
|
8718
9153
|
_: 3
|
|
8719
9154
|
}),
|
|
8720
|
-
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
9155
|
+
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$M, {
|
|
8721
9156
|
key: 0,
|
|
8722
9157
|
ref_key: "codeBlockEditor",
|
|
8723
9158
|
ref: codeBlockEditor,
|
|
8724
9159
|
disabled: !editable.value,
|
|
8725
9160
|
content: vue.unref(codeConfig),
|
|
8726
9161
|
onSubmit: vue.unref(submitCodeBlockHandler)
|
|
8727
|
-
}, null, 8, ["disabled", "content", "onSubmit"])) : vue.createCommentVNode("", true)
|
|
9162
|
+
}, null, 8, ["disabled", "content", "onSubmit"])) : vue.createCommentVNode("", true),
|
|
9163
|
+
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
9164
|
+
menuData.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$o, {
|
|
9165
|
+
key: 0,
|
|
9166
|
+
"menu-data": menuData.value,
|
|
9167
|
+
ref: "menu",
|
|
9168
|
+
style: { "overflow": "initial" },
|
|
9169
|
+
onHide: vue.unref(contentMenuHideHandler)
|
|
9170
|
+
}, null, 8, ["menu-data", "onHide"])) : vue.createCommentVNode("", true)
|
|
9171
|
+
]))
|
|
8728
9172
|
], 64);
|
|
8729
9173
|
};
|
|
8730
9174
|
}
|
|
@@ -8761,7 +9205,7 @@
|
|
|
8761
9205
|
};
|
|
8762
9206
|
};
|
|
8763
9207
|
|
|
8764
|
-
const _sfc_main$
|
|
9208
|
+
const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
8765
9209
|
...{
|
|
8766
9210
|
name: "MEditorDataSourceConfigPanel"
|
|
8767
9211
|
},
|
|
@@ -8808,7 +9252,7 @@
|
|
|
8808
9252
|
}
|
|
8809
9253
|
});
|
|
8810
9254
|
return (_ctx, _cache) => {
|
|
8811
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
9255
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$R, {
|
|
8812
9256
|
visible: boxVisible.value,
|
|
8813
9257
|
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => boxVisible.value = $event),
|
|
8814
9258
|
width: width.value,
|
|
@@ -8836,7 +9280,7 @@
|
|
|
8836
9280
|
}
|
|
8837
9281
|
});
|
|
8838
9282
|
|
|
8839
|
-
const _sfc_main$
|
|
9283
|
+
const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
8840
9284
|
...{
|
|
8841
9285
|
name: "MEditorDataSourceList"
|
|
8842
9286
|
},
|
|
@@ -8845,7 +9289,7 @@
|
|
|
8845
9289
|
indent: {},
|
|
8846
9290
|
nextLevelIndentIncrement: {}
|
|
8847
9291
|
},
|
|
8848
|
-
emits: ["edit", "remove"],
|
|
9292
|
+
emits: ["edit", "remove", "node-contextmenu"],
|
|
8849
9293
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
8850
9294
|
const emit = __emit;
|
|
8851
9295
|
const { depService, editorService, dataSourceService } = vue.inject("services") || {};
|
|
@@ -8917,11 +9361,6 @@
|
|
|
8917
9361
|
emit("edit", id);
|
|
8918
9362
|
};
|
|
8919
9363
|
const removeHandler = async (id) => {
|
|
8920
|
-
await designPlugin.tMagicMessageBox.confirm("确定删除?", "提示", {
|
|
8921
|
-
confirmButtonText: "确定",
|
|
8922
|
-
cancelButtonText: "取消",
|
|
8923
|
-
type: "warning"
|
|
8924
|
-
});
|
|
8925
9364
|
emit("remove", id);
|
|
8926
9365
|
};
|
|
8927
9366
|
const selectComp = (compId) => {
|
|
@@ -8934,16 +9373,20 @@
|
|
|
8934
9373
|
selectComp(data.key);
|
|
8935
9374
|
}
|
|
8936
9375
|
};
|
|
9376
|
+
const nodeContentMenuHandler = (event, data) => {
|
|
9377
|
+
emit("node-contextmenu", event, data);
|
|
9378
|
+
};
|
|
8937
9379
|
__expose({
|
|
8938
9380
|
filter: filterTextChangeHandler
|
|
8939
9381
|
});
|
|
8940
9382
|
return (_ctx, _cache) => {
|
|
8941
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
9383
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$l, {
|
|
8942
9384
|
data: list.value,
|
|
8943
9385
|
"node-status-map": vue.unref(nodeStatusMap),
|
|
8944
9386
|
indent: _ctx.indent,
|
|
8945
9387
|
"next-level-indent-increment": _ctx.nextLevelIndentIncrement,
|
|
8946
|
-
onNodeClick: clickHandler
|
|
9388
|
+
onNodeClick: clickHandler,
|
|
9389
|
+
onNodeContextmenu: nodeContentMenuHandler
|
|
8947
9390
|
}, {
|
|
8948
9391
|
"tree-node-label": vue.withCtx(({ data }) => [
|
|
8949
9392
|
vue.createElementVNode("div", {
|
|
@@ -8973,7 +9416,7 @@
|
|
|
8973
9416
|
placement: "bottom"
|
|
8974
9417
|
}, {
|
|
8975
9418
|
default: vue.withCtx(() => [
|
|
8976
|
-
vue.createVNode(_sfc_main$
|
|
9419
|
+
vue.createVNode(_sfc_main$Z, {
|
|
8977
9420
|
icon: editable.value ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
|
|
8978
9421
|
class: "edit-icon",
|
|
8979
9422
|
onClick: vue.withModifiers(($event) => editHandler(`${data.key}`), ["stop"])
|
|
@@ -8988,7 +9431,7 @@
|
|
|
8988
9431
|
placement: "bottom"
|
|
8989
9432
|
}, {
|
|
8990
9433
|
default: vue.withCtx(() => [
|
|
8991
|
-
vue.createVNode(_sfc_main$
|
|
9434
|
+
vue.createVNode(_sfc_main$Z, {
|
|
8992
9435
|
icon: vue.unref(iconsVue.Close),
|
|
8993
9436
|
class: "edit-icon",
|
|
8994
9437
|
onClick: vue.withModifiers(($event) => removeHandler(`${data.key}`), ["stop"])
|
|
@@ -9004,17 +9447,84 @@
|
|
|
9004
9447
|
}
|
|
9005
9448
|
});
|
|
9006
9449
|
|
|
9450
|
+
const useContentMenu = () => {
|
|
9451
|
+
const eventBus = vue.inject("eventBus");
|
|
9452
|
+
const menuRef = vue.useTemplateRef("menu");
|
|
9453
|
+
let selectId = "";
|
|
9454
|
+
const menuData = [
|
|
9455
|
+
{
|
|
9456
|
+
type: "button",
|
|
9457
|
+
text: "编辑",
|
|
9458
|
+
icon: iconsVue.Edit,
|
|
9459
|
+
display: (services) => services?.dataSourceService?.get("editable") ?? true,
|
|
9460
|
+
handler: () => {
|
|
9461
|
+
if (!selectId) {
|
|
9462
|
+
return;
|
|
9463
|
+
}
|
|
9464
|
+
eventBus?.emit("edit-data-source", selectId);
|
|
9465
|
+
}
|
|
9466
|
+
},
|
|
9467
|
+
{
|
|
9468
|
+
type: "button",
|
|
9469
|
+
text: "复制并粘贴至当前",
|
|
9470
|
+
icon: vue.markRaw(iconsVue.CopyDocument),
|
|
9471
|
+
handler: ({ dataSourceService }) => {
|
|
9472
|
+
if (!selectId) {
|
|
9473
|
+
return;
|
|
9474
|
+
}
|
|
9475
|
+
const ds = dataSourceService.getDataSourceById(selectId);
|
|
9476
|
+
if (!ds) {
|
|
9477
|
+
return;
|
|
9478
|
+
}
|
|
9479
|
+
dataSourceService.add(lodashEs.cloneDeep(ds));
|
|
9480
|
+
}
|
|
9481
|
+
},
|
|
9482
|
+
{
|
|
9483
|
+
type: "button",
|
|
9484
|
+
text: "删除",
|
|
9485
|
+
icon: iconsVue.Delete,
|
|
9486
|
+
handler: () => {
|
|
9487
|
+
if (!selectId) {
|
|
9488
|
+
return;
|
|
9489
|
+
}
|
|
9490
|
+
eventBus?.emit("remove-data-source", selectId);
|
|
9491
|
+
}
|
|
9492
|
+
}
|
|
9493
|
+
];
|
|
9494
|
+
const nodeContentMenuHandler = (event, data) => {
|
|
9495
|
+
event.preventDefault();
|
|
9496
|
+
if (data.type === "ds") {
|
|
9497
|
+
menuRef.value?.show(event);
|
|
9498
|
+
if (data.id) {
|
|
9499
|
+
selectId = `${data.id}`;
|
|
9500
|
+
} else {
|
|
9501
|
+
selectId = "";
|
|
9502
|
+
}
|
|
9503
|
+
}
|
|
9504
|
+
};
|
|
9505
|
+
const contentMenuHideHandler = () => {
|
|
9506
|
+
selectId = "";
|
|
9507
|
+
};
|
|
9508
|
+
return {
|
|
9509
|
+
menuData,
|
|
9510
|
+
nodeContentMenuHandler,
|
|
9511
|
+
contentMenuHideHandler
|
|
9512
|
+
};
|
|
9513
|
+
};
|
|
9514
|
+
|
|
9007
9515
|
const _hoisted_1$6 = { class: "search-wrapper" };
|
|
9008
|
-
const _sfc_main$
|
|
9516
|
+
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
9009
9517
|
...{
|
|
9010
9518
|
name: "MEditorDataSourceListPanel"
|
|
9011
9519
|
},
|
|
9012
9520
|
__name: "DataSourceListPanel",
|
|
9013
9521
|
props: {
|
|
9014
9522
|
indent: {},
|
|
9015
|
-
nextLevelIndentIncrement: {}
|
|
9523
|
+
nextLevelIndentIncrement: {},
|
|
9524
|
+
customContentMenu: { type: Function }
|
|
9016
9525
|
},
|
|
9017
9526
|
setup(__props) {
|
|
9527
|
+
const props = __props;
|
|
9018
9528
|
const eventBus = vue.inject("eventBus");
|
|
9019
9529
|
const { dataSourceService } = vue.inject("services") || {};
|
|
9020
9530
|
const { editDialog, dataSourceValues, dialogTitle, editable, editHandler, submitDataSourceHandler } = useDataSourceEdit(dataSourceService);
|
|
@@ -9039,7 +9549,12 @@
|
|
|
9039
9549
|
dialogTitle.value = `新增${datasourceType?.text || ""}`;
|
|
9040
9550
|
editDialog.value.show();
|
|
9041
9551
|
};
|
|
9042
|
-
const removeHandler = (id) => {
|
|
9552
|
+
const removeHandler = async (id) => {
|
|
9553
|
+
await designPlugin.tMagicMessageBox.confirm("确定删除?", "提示", {
|
|
9554
|
+
confirmButtonText: "确定",
|
|
9555
|
+
cancelButtonText: "取消",
|
|
9556
|
+
type: "warning"
|
|
9557
|
+
});
|
|
9043
9558
|
dataSourceService?.remove(id);
|
|
9044
9559
|
};
|
|
9045
9560
|
const dataSourceList = vue.ref();
|
|
@@ -9049,12 +9564,19 @@
|
|
|
9049
9564
|
eventBus?.on("edit-data-source", (id) => {
|
|
9050
9565
|
editHandler(id);
|
|
9051
9566
|
});
|
|
9567
|
+
eventBus?.on("remove-data-source", (id) => {
|
|
9568
|
+
removeHandler(id);
|
|
9569
|
+
});
|
|
9570
|
+
const { nodeContentMenuHandler, menuData: contentMenuData, contentMenuHideHandler } = useContentMenu();
|
|
9571
|
+
const menuData = vue.computed(
|
|
9572
|
+
() => props.customContentMenu(contentMenuData, "data-source")
|
|
9573
|
+
);
|
|
9052
9574
|
return (_ctx, _cache) => {
|
|
9053
9575
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
9054
9576
|
vue.createVNode(vue.unref(designPlugin.TMagicScrollbar), { class: "data-source-list-panel m-editor-layer-panel" }, {
|
|
9055
9577
|
default: vue.withCtx(() => [
|
|
9056
9578
|
vue.createElementVNode("div", _hoisted_1$6, [
|
|
9057
|
-
vue.createVNode(_sfc_main$
|
|
9579
|
+
vue.createVNode(_sfc_main$n, { onSearch: filterTextChangeHandler }),
|
|
9058
9580
|
vue.unref(editable) ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicPopover), {
|
|
9059
9581
|
key: 0,
|
|
9060
9582
|
placement: "right",
|
|
@@ -9075,7 +9597,7 @@
|
|
|
9075
9597
|
]),
|
|
9076
9598
|
default: vue.withCtx(() => [
|
|
9077
9599
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(datasourceTypeList.value, (item, index) => {
|
|
9078
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
9600
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$z, {
|
|
9079
9601
|
data: {
|
|
9080
9602
|
type: "button",
|
|
9081
9603
|
text: item.text,
|
|
@@ -9091,195 +9613,40 @@
|
|
|
9091
9613
|
})) : vue.createCommentVNode("", true),
|
|
9092
9614
|
vue.renderSlot(_ctx.$slots, "data-source-panel-search")
|
|
9093
9615
|
]),
|
|
9094
|
-
vue.createVNode(_sfc_main$
|
|
9616
|
+
vue.createVNode(_sfc_main$h, {
|
|
9095
9617
|
ref_key: "dataSourceList",
|
|
9096
9618
|
ref: dataSourceList,
|
|
9097
9619
|
indent: _ctx.indent,
|
|
9098
9620
|
"next-level-indent-increment": _ctx.nextLevelIndentIncrement,
|
|
9099
9621
|
onEdit: vue.unref(editHandler),
|
|
9100
|
-
onRemove: removeHandler
|
|
9101
|
-
|
|
9622
|
+
onRemove: removeHandler,
|
|
9623
|
+
onNodeContextmenu: vue.unref(nodeContentMenuHandler)
|
|
9624
|
+
}, null, 8, ["indent", "next-level-indent-increment", "onEdit", "onNodeContextmenu"])
|
|
9102
9625
|
]),
|
|
9103
9626
|
_: 3
|
|
9104
9627
|
}),
|
|
9105
|
-
vue.createVNode(_sfc_main$
|
|
9628
|
+
vue.createVNode(_sfc_main$i, {
|
|
9106
9629
|
ref_key: "editDialog",
|
|
9107
9630
|
ref: editDialog,
|
|
9108
9631
|
disabled: !vue.unref(editable),
|
|
9109
9632
|
values: vue.unref(dataSourceValues),
|
|
9110
9633
|
title: vue.unref(dialogTitle),
|
|
9111
9634
|
onSubmit: vue.unref(submitDataSourceHandler)
|
|
9112
|
-
}, null, 8, ["disabled", "values", "title", "onSubmit"])
|
|
9635
|
+
}, null, 8, ["disabled", "values", "title", "onSubmit"]),
|
|
9636
|
+
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
9637
|
+
menuData.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$o, {
|
|
9638
|
+
key: 0,
|
|
9639
|
+
"menu-data": menuData.value,
|
|
9640
|
+
ref: "menu",
|
|
9641
|
+
style: { "overflow": "initial" },
|
|
9642
|
+
onHide: vue.unref(contentMenuHideHandler)
|
|
9643
|
+
}, null, 8, ["menu-data", "onHide"])) : vue.createCommentVNode("", true)
|
|
9644
|
+
]))
|
|
9113
9645
|
], 64);
|
|
9114
9646
|
};
|
|
9115
9647
|
}
|
|
9116
9648
|
});
|
|
9117
9649
|
|
|
9118
|
-
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
9119
|
-
...{
|
|
9120
|
-
name: "MEditorContentMenu"
|
|
9121
|
-
},
|
|
9122
|
-
__name: "ContentMenu",
|
|
9123
|
-
props: {
|
|
9124
|
-
menuData: { default: () => [] },
|
|
9125
|
-
isSubMenu: { type: Boolean, default: false },
|
|
9126
|
-
active: {},
|
|
9127
|
-
autoHide: { type: Boolean, default: true }
|
|
9128
|
-
},
|
|
9129
|
-
emits: ["hide", "show", "mouseenter"],
|
|
9130
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
9131
|
-
const props = __props;
|
|
9132
|
-
const emit = __emit;
|
|
9133
|
-
const menu = vue.ref();
|
|
9134
|
-
const buttons = vue.ref();
|
|
9135
|
-
const subMenu = vue.ref();
|
|
9136
|
-
const visible = vue.ref(false);
|
|
9137
|
-
const subMenuData = vue.ref([]);
|
|
9138
|
-
const zIndex = designPlugin.useZIndex();
|
|
9139
|
-
const curZIndex = vue.ref(0);
|
|
9140
|
-
const menuPosition = vue.ref({
|
|
9141
|
-
left: 0,
|
|
9142
|
-
top: 0
|
|
9143
|
-
});
|
|
9144
|
-
const menuStyle = vue.computed(() => ({
|
|
9145
|
-
top: `${menuPosition.value.top}px`,
|
|
9146
|
-
left: `${menuPosition.value.left}px`,
|
|
9147
|
-
zIndex: curZIndex.value
|
|
9148
|
-
}));
|
|
9149
|
-
const contains = (el) => menu.value?.contains(el) || subMenu.value?.contains(el);
|
|
9150
|
-
const hide = () => {
|
|
9151
|
-
if (!visible.value) return;
|
|
9152
|
-
visible.value = false;
|
|
9153
|
-
subMenu.value?.hide();
|
|
9154
|
-
emit("hide");
|
|
9155
|
-
};
|
|
9156
|
-
const clickHandler = () => {
|
|
9157
|
-
if (!props.autoHide) return;
|
|
9158
|
-
hide();
|
|
9159
|
-
};
|
|
9160
|
-
const outsideClickHideHandler = (e) => {
|
|
9161
|
-
if (!props.autoHide) return;
|
|
9162
|
-
const target = e.target;
|
|
9163
|
-
if (!visible.value || !target) {
|
|
9164
|
-
return;
|
|
9165
|
-
}
|
|
9166
|
-
if (contains(target)) {
|
|
9167
|
-
return;
|
|
9168
|
-
}
|
|
9169
|
-
hide();
|
|
9170
|
-
};
|
|
9171
|
-
const setPosition = (e) => {
|
|
9172
|
-
const menuHeight = menu.value?.clientHeight || 0;
|
|
9173
|
-
let top = e.clientY;
|
|
9174
|
-
if (menuHeight + e.clientY > document.body.clientHeight) {
|
|
9175
|
-
top = document.body.clientHeight - menuHeight;
|
|
9176
|
-
}
|
|
9177
|
-
menuPosition.value = {
|
|
9178
|
-
top,
|
|
9179
|
-
left: e.clientX
|
|
9180
|
-
};
|
|
9181
|
-
};
|
|
9182
|
-
const show = (e) => {
|
|
9183
|
-
setTimeout(() => {
|
|
9184
|
-
visible.value = true;
|
|
9185
|
-
vue.nextTick(() => {
|
|
9186
|
-
e && setPosition(e);
|
|
9187
|
-
curZIndex.value = zIndex.nextZIndex();
|
|
9188
|
-
emit("show");
|
|
9189
|
-
});
|
|
9190
|
-
}, 300);
|
|
9191
|
-
};
|
|
9192
|
-
const showSubMenu = (item, index) => {
|
|
9193
|
-
const menuItem = item;
|
|
9194
|
-
if (typeof item !== "object") {
|
|
9195
|
-
return;
|
|
9196
|
-
}
|
|
9197
|
-
subMenuData.value = menuItem.items || [];
|
|
9198
|
-
setTimeout(() => {
|
|
9199
|
-
if (!visible.value) {
|
|
9200
|
-
return;
|
|
9201
|
-
}
|
|
9202
|
-
if (menu.value) {
|
|
9203
|
-
let y = menu.value.offsetTop;
|
|
9204
|
-
if (buttons.value?.[index].$el) {
|
|
9205
|
-
const rect = buttons.value?.[index].$el.getBoundingClientRect();
|
|
9206
|
-
y = rect.top;
|
|
9207
|
-
}
|
|
9208
|
-
subMenu.value?.show({
|
|
9209
|
-
clientX: menu.value.offsetLeft + menu.value.clientWidth,
|
|
9210
|
-
clientY: y
|
|
9211
|
-
});
|
|
9212
|
-
}
|
|
9213
|
-
}, 0);
|
|
9214
|
-
};
|
|
9215
|
-
const mouseenterHandler = () => {
|
|
9216
|
-
emit("mouseenter");
|
|
9217
|
-
};
|
|
9218
|
-
vue.onMounted(() => {
|
|
9219
|
-
if (props.isSubMenu) return;
|
|
9220
|
-
globalThis.addEventListener("mousedown", outsideClickHideHandler, true);
|
|
9221
|
-
});
|
|
9222
|
-
vue.onBeforeUnmount(() => {
|
|
9223
|
-
if (props.isSubMenu) return;
|
|
9224
|
-
globalThis.removeEventListener("mousedown", outsideClickHideHandler, true);
|
|
9225
|
-
});
|
|
9226
|
-
__expose({
|
|
9227
|
-
menu,
|
|
9228
|
-
menuPosition,
|
|
9229
|
-
hide,
|
|
9230
|
-
show,
|
|
9231
|
-
contains,
|
|
9232
|
-
setPosition
|
|
9233
|
-
});
|
|
9234
|
-
return (_ctx, _cache) => {
|
|
9235
|
-
const _component_content_menu = vue.resolveComponent("content-menu", true);
|
|
9236
|
-
return vue.openBlock(), vue.createBlock(vue.Transition, { name: "fade" }, {
|
|
9237
|
-
default: vue.withCtx(() => [
|
|
9238
|
-
vue.withDirectives(vue.createElementVNode("div", {
|
|
9239
|
-
class: "magic-editor-content-menu",
|
|
9240
|
-
ref_key: "menu",
|
|
9241
|
-
ref: menu,
|
|
9242
|
-
style: vue.normalizeStyle(menuStyle.value),
|
|
9243
|
-
onMouseenter: _cache[0] || (_cache[0] = ($event) => mouseenterHandler())
|
|
9244
|
-
}, [
|
|
9245
|
-
vue.renderSlot(_ctx.$slots, "title"),
|
|
9246
|
-
vue.createElementVNode("div", null, [
|
|
9247
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menuData, (item, index) => {
|
|
9248
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$y, {
|
|
9249
|
-
"event-type": "mouseup",
|
|
9250
|
-
ref_for: true,
|
|
9251
|
-
ref_key: "buttons",
|
|
9252
|
-
ref: buttons,
|
|
9253
|
-
class: vue.normalizeClass({ active: _ctx.active && item.id === _ctx.active }),
|
|
9254
|
-
data: item,
|
|
9255
|
-
key: index,
|
|
9256
|
-
onMouseup: clickHandler,
|
|
9257
|
-
onMouseenter: ($event) => showSubMenu(item, index)
|
|
9258
|
-
}, null, 8, ["class", "data", "onMouseenter"]);
|
|
9259
|
-
}), 128))
|
|
9260
|
-
]),
|
|
9261
|
-
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
9262
|
-
subMenuData.value.length ? (vue.openBlock(), vue.createBlock(_component_content_menu, {
|
|
9263
|
-
key: 0,
|
|
9264
|
-
class: "sub-menu",
|
|
9265
|
-
ref_key: "subMenu",
|
|
9266
|
-
ref: subMenu,
|
|
9267
|
-
active: _ctx.active,
|
|
9268
|
-
"menu-data": subMenuData.value,
|
|
9269
|
-
"is-sub-menu": true,
|
|
9270
|
-
onHide: hide
|
|
9271
|
-
}, null, 8, ["active", "menu-data"])) : vue.createCommentVNode("", true)
|
|
9272
|
-
]))
|
|
9273
|
-
], 36), [
|
|
9274
|
-
[vue.vShow, visible.value]
|
|
9275
|
-
])
|
|
9276
|
-
]),
|
|
9277
|
-
_: 3
|
|
9278
|
-
});
|
|
9279
|
-
};
|
|
9280
|
-
}
|
|
9281
|
-
});
|
|
9282
|
-
|
|
9283
9650
|
const _hoisted_1$5 = {
|
|
9284
9651
|
width: "1em",
|
|
9285
9652
|
height: "1em",
|
|
@@ -9385,15 +9752,15 @@
|
|
|
9385
9752
|
},
|
|
9386
9753
|
__name: "LayerMenu",
|
|
9387
9754
|
props: {
|
|
9388
|
-
layerContentMenu: {
|
|
9389
|
-
customContentMenu: { type: Function
|
|
9755
|
+
layerContentMenu: {},
|
|
9756
|
+
customContentMenu: { type: Function }
|
|
9390
9757
|
},
|
|
9391
9758
|
emits: ["collapse-all"],
|
|
9392
9759
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
9393
9760
|
const props = __props;
|
|
9394
9761
|
const emit = __emit;
|
|
9395
9762
|
const services = vue.inject("services");
|
|
9396
|
-
const menu = vue.
|
|
9763
|
+
const menu = vue.useTemplateRef("menu");
|
|
9397
9764
|
const node = vue.computed(() => services?.editorService.get("node"));
|
|
9398
9765
|
const nodes = vue.computed(() => services?.editorService.get("nodes"));
|
|
9399
9766
|
const componentList = vue.computed(() => services?.componentListService.getList() || []);
|
|
@@ -9475,7 +9842,7 @@
|
|
|
9475
9842
|
show
|
|
9476
9843
|
});
|
|
9477
9844
|
return (_ctx, _cache) => {
|
|
9478
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
9845
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$o, {
|
|
9479
9846
|
"menu-data": menuData.value,
|
|
9480
9847
|
ref_key: "menu",
|
|
9481
9848
|
ref: menu,
|
|
@@ -9503,12 +9870,12 @@
|
|
|
9503
9870
|
};
|
|
9504
9871
|
return (_ctx, _cache) => {
|
|
9505
9872
|
return _ctx.data.type !== "page" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
9506
|
-
_ctx.data.visible === false ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
9873
|
+
_ctx.data.visible === false ? (vue.openBlock(), vue.createBlock(_sfc_main$Z, {
|
|
9507
9874
|
key: 0,
|
|
9508
9875
|
icon: vue.unref(iconsVue.Hide),
|
|
9509
9876
|
onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => setNodeVisible(true), ["stop"])),
|
|
9510
9877
|
title: "点击显示"
|
|
9511
|
-
}, null, 8, ["icon"])) : (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
9878
|
+
}, null, 8, ["icon"])) : (vue.openBlock(), vue.createBlock(_sfc_main$Z, {
|
|
9512
9879
|
key: 1,
|
|
9513
9880
|
icon: vue.unref(iconsVue.View),
|
|
9514
9881
|
onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => setNodeVisible(false), ["stop"])),
|
|
@@ -9585,7 +9952,7 @@
|
|
|
9585
9952
|
select(data);
|
|
9586
9953
|
});
|
|
9587
9954
|
};
|
|
9588
|
-
const menu = vue.
|
|
9955
|
+
const menu = vue.useTemplateRef("menu");
|
|
9589
9956
|
return {
|
|
9590
9957
|
menu,
|
|
9591
9958
|
nodeClickHandler,
|
|
@@ -9996,7 +10363,7 @@
|
|
|
9996
10363
|
setup(__props) {
|
|
9997
10364
|
const services = vue.inject("services");
|
|
9998
10365
|
const editorService = services?.editorService;
|
|
9999
|
-
const tree = vue.
|
|
10366
|
+
const tree = vue.useTemplateRef("tree");
|
|
10000
10367
|
const page = vue.computed(() => editorService?.get("page"));
|
|
10001
10368
|
const nodeData = vue.computed(() => !page.value ? [] : [page.value]);
|
|
10002
10369
|
const { nodeStatusMap } = useNodeStatus(services);
|
|
@@ -10032,8 +10399,8 @@
|
|
|
10032
10399
|
return vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicScrollbar), { class: "m-editor-layer-panel" }, {
|
|
10033
10400
|
default: vue.withCtx(() => [
|
|
10034
10401
|
vue.renderSlot(_ctx.$slots, "layer-panel-header"),
|
|
10035
|
-
vue.createVNode(_sfc_main$
|
|
10036
|
-
page.value && vue.unref(nodeStatusMap) ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
10402
|
+
vue.createVNode(_sfc_main$n, { onSearch: vue.unref(filterTextChangeHandler) }, null, 8, ["onSearch"]),
|
|
10403
|
+
page.value && vue.unref(nodeStatusMap) ? (vue.openBlock(), vue.createBlock(_sfc_main$l, {
|
|
10037
10404
|
key: 0,
|
|
10038
10405
|
tabindex: "-1",
|
|
10039
10406
|
ref_key: "tree",
|
|
@@ -10155,7 +10522,7 @@
|
|
|
10155
10522
|
return vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicScrollbar), null, {
|
|
10156
10523
|
default: vue.withCtx(() => [
|
|
10157
10524
|
vue.renderSlot(_ctx.$slots, "component-list-panel-header"),
|
|
10158
|
-
vue.createVNode(_sfc_main$
|
|
10525
|
+
vue.createVNode(_sfc_main$n, { onSearch: filterTextChangeHandler }),
|
|
10159
10526
|
vue.renderSlot(_ctx.$slots, "component-list", { componentGroupList: list.value }, () => [
|
|
10160
10527
|
vue.createVNode(vue.unref(designPlugin.TMagicCollapse), {
|
|
10161
10528
|
class: "ui-component-panel",
|
|
@@ -10169,7 +10536,7 @@
|
|
|
10169
10536
|
name: `${index}`
|
|
10170
10537
|
}, {
|
|
10171
10538
|
title: vue.withCtx(() => [
|
|
10172
|
-
vue.createVNode(_sfc_main$
|
|
10539
|
+
vue.createVNode(_sfc_main$Z, { icon: vue.unref(iconsVue.Grid) }, null, 8, ["icon"]),
|
|
10173
10540
|
vue.createTextVNode(vue.toDisplayString(group.title), 1)
|
|
10174
10541
|
]),
|
|
10175
10542
|
default: vue.withCtx(() => [
|
|
@@ -10190,7 +10557,7 @@
|
|
|
10190
10557
|
content: item.desc
|
|
10191
10558
|
}, {
|
|
10192
10559
|
default: vue.withCtx(() => [
|
|
10193
|
-
vue.createVNode(_sfc_main$
|
|
10560
|
+
vue.createVNode(_sfc_main$Z, {
|
|
10194
10561
|
icon: item.icon
|
|
10195
10562
|
}, null, 8, ["icon"])
|
|
10196
10563
|
]),
|
|
@@ -10296,10 +10663,11 @@
|
|
|
10296
10663
|
type: "component",
|
|
10297
10664
|
icon: iconsVue.EditPen,
|
|
10298
10665
|
text: "代码编辑",
|
|
10299
|
-
component: _sfc_main$
|
|
10666
|
+
component: _sfc_main$j,
|
|
10300
10667
|
props: {
|
|
10301
10668
|
indent: props.indent,
|
|
10302
|
-
nextLevelIndentIncrement: props.nextLevelIndentIncrement
|
|
10669
|
+
nextLevelIndentIncrement: props.nextLevelIndentIncrement,
|
|
10670
|
+
customContentMenu: props.customContentMenu
|
|
10303
10671
|
},
|
|
10304
10672
|
slots: {}
|
|
10305
10673
|
},
|
|
@@ -10308,10 +10676,11 @@
|
|
|
10308
10676
|
type: "component",
|
|
10309
10677
|
icon: iconsVue.Coin,
|
|
10310
10678
|
text: "数据源",
|
|
10311
|
-
component: _sfc_main$
|
|
10679
|
+
component: _sfc_main$g,
|
|
10312
10680
|
props: {
|
|
10313
10681
|
indent: props.indent,
|
|
10314
|
-
nextLevelIndentIncrement: props.nextLevelIndentIncrement
|
|
10682
|
+
nextLevelIndentIncrement: props.nextLevelIndentIncrement,
|
|
10683
|
+
customContentMenu: props.customContentMenu
|
|
10315
10684
|
},
|
|
10316
10685
|
slots: {}
|
|
10317
10686
|
}
|
|
@@ -10379,7 +10748,7 @@
|
|
|
10379
10748
|
(...args) => vue.unref(dragstartHandler) && vue.unref(dragstartHandler)(...args)),
|
|
10380
10749
|
onDragend: ($event) => vue.unref(dragendHandler)(config.$key, $event)
|
|
10381
10750
|
}, [
|
|
10382
|
-
config.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
10751
|
+
config.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$Z, {
|
|
10383
10752
|
key: 0,
|
|
10384
10753
|
icon: config.icon
|
|
10385
10754
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
@@ -10525,7 +10894,7 @@
|
|
|
10525
10894
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
10526
10895
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(sideBarItems.value, (config, index) => {
|
|
10527
10896
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
10528
|
-
vue.unref(floatBoxStates)[config.$key]?.status ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
10897
|
+
vue.unref(floatBoxStates)[config.$key]?.status ? (vue.openBlock(), vue.createBlock(_sfc_main$R, {
|
|
10529
10898
|
key: config.$key ?? index,
|
|
10530
10899
|
visible: vue.unref(floatBoxStates)[config.$key].status,
|
|
10531
10900
|
"onUpdate:visible": ($event) => vue.unref(floatBoxStates)[config.$key].status = $event,
|
|
@@ -10571,8 +10940,8 @@
|
|
|
10571
10940
|
setup(__props, { emit: __emit }) {
|
|
10572
10941
|
const props = __props;
|
|
10573
10942
|
const emit = __emit;
|
|
10574
|
-
const bar = vue.
|
|
10575
|
-
const thumb = vue.
|
|
10943
|
+
const bar = vue.useTemplateRef("bar");
|
|
10944
|
+
const thumb = vue.useTemplateRef("thumb");
|
|
10576
10945
|
const thumbSize = vue.computed(() => props.size * (props.size / props.scrollSize));
|
|
10577
10946
|
const thumbPos = vue.computed(() => props.pos / props.scrollSize * props.size);
|
|
10578
10947
|
const thumbStyle = vue.computed(() => ({
|
|
@@ -10660,8 +11029,8 @@
|
|
|
10660
11029
|
},
|
|
10661
11030
|
setup(__props, { expose: __expose }) {
|
|
10662
11031
|
const props = __props;
|
|
10663
|
-
const container = vue.
|
|
10664
|
-
const el = vue.
|
|
11032
|
+
const container = vue.useTemplateRef("container");
|
|
11033
|
+
const el = vue.useTemplateRef("el");
|
|
10665
11034
|
const style = vue.computed(
|
|
10666
11035
|
() => `
|
|
10667
11036
|
width: ${utils.isNumber(`${props.width}`) ? `${props.width}px` : props.width};
|
|
@@ -10755,8 +11124,8 @@
|
|
|
10755
11124
|
const editorService = services?.editorService;
|
|
10756
11125
|
const visible = vue.ref(false);
|
|
10757
11126
|
const buttonVisible = vue.ref(false);
|
|
10758
|
-
const button = vue.
|
|
10759
|
-
const box = vue.
|
|
11127
|
+
const button = vue.useTemplateRef("button");
|
|
11128
|
+
const box = vue.useTemplateRef("box");
|
|
10760
11129
|
const stage = vue.computed(() => editorService?.get("stage"));
|
|
10761
11130
|
const page = vue.computed(() => editorService?.get("page"));
|
|
10762
11131
|
const nodes = vue.computed(() => editorService?.get("nodes") || []);
|
|
@@ -10828,7 +11197,7 @@
|
|
|
10828
11197
|
]),
|
|
10829
11198
|
_: 1
|
|
10830
11199
|
})) : vue.createCommentVNode("", true),
|
|
10831
|
-
page.value && vue.unref(nodeStatusMap) && buttonVisible.value ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
11200
|
+
page.value && vue.unref(nodeStatusMap) && buttonVisible.value ? (vue.openBlock(), vue.createBlock(_sfc_main$R, {
|
|
10832
11201
|
key: 1,
|
|
10833
11202
|
ref_key: "box",
|
|
10834
11203
|
ref: box,
|
|
@@ -10838,7 +11207,7 @@
|
|
|
10838
11207
|
position: menuPosition.value
|
|
10839
11208
|
}, {
|
|
10840
11209
|
body: vue.withCtx(() => [
|
|
10841
|
-
vue.createVNode(_sfc_main$
|
|
11210
|
+
vue.createVNode(_sfc_main$l, {
|
|
10842
11211
|
class: "m-editor-node-list-menu magic-editor-layer-tree",
|
|
10843
11212
|
data: nodeData.value,
|
|
10844
11213
|
"node-status-map": vue.unref(nodeStatusMap),
|
|
@@ -10857,7 +11226,7 @@
|
|
|
10857
11226
|
setup(__props) {
|
|
10858
11227
|
const services = vue.inject("services");
|
|
10859
11228
|
const stageOptions = vue.inject("stageOptions");
|
|
10860
|
-
const stageOverlay = vue.
|
|
11229
|
+
const stageOverlay = vue.useTemplateRef("stageOverlay");
|
|
10861
11230
|
const stageOverlayVisible = vue.computed(() => services?.stageOverlayService.get("stageOverlayVisible"));
|
|
10862
11231
|
const wrapWidth = vue.computed(() => services?.stageOverlayService.get("wrapWidth") || 0);
|
|
10863
11232
|
const wrapHeight = vue.computed(() => services?.stageOverlayService.get("wrapHeight") || 0);
|
|
@@ -10971,14 +11340,14 @@
|
|
|
10971
11340
|
__name: "ViewerMenu",
|
|
10972
11341
|
props: {
|
|
10973
11342
|
isMultiSelect: { type: Boolean, default: false },
|
|
10974
|
-
stageContentMenu: {
|
|
10975
|
-
customContentMenu: {
|
|
11343
|
+
stageContentMenu: {},
|
|
11344
|
+
customContentMenu: {}
|
|
10976
11345
|
},
|
|
10977
11346
|
setup(__props, { expose: __expose }) {
|
|
10978
11347
|
const props = __props;
|
|
10979
11348
|
const services = vue.inject("services");
|
|
10980
11349
|
const editorService = services?.editorService;
|
|
10981
|
-
const menu = vue.
|
|
11350
|
+
const menu = vue.useTemplateRef("menu");
|
|
10982
11351
|
const canCenter = vue.ref(false);
|
|
10983
11352
|
const node = vue.computed(() => editorService?.get("node"));
|
|
10984
11353
|
const nodes = vue.computed(() => editorService?.get("nodes"));
|
|
@@ -11083,7 +11452,7 @@
|
|
|
11083
11452
|
};
|
|
11084
11453
|
__expose({ show });
|
|
11085
11454
|
return (_ctx, _cache) => {
|
|
11086
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
11455
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$o, {
|
|
11087
11456
|
"menu-data": menuData.value,
|
|
11088
11457
|
ref_key: "menu",
|
|
11089
11458
|
ref: menu
|
|
@@ -11109,9 +11478,9 @@
|
|
|
11109
11478
|
let runtime = null;
|
|
11110
11479
|
const services = vue.inject("services");
|
|
11111
11480
|
const stageLoading = vue.computed(() => services?.editorService.get("stageLoading") || false);
|
|
11112
|
-
const stageWrap = vue.
|
|
11113
|
-
const stageContainer = vue.
|
|
11114
|
-
const menu = vue.
|
|
11481
|
+
const stageWrap = vue.useTemplateRef("stageWrap");
|
|
11482
|
+
const stageContainer = vue.useTemplateRef("stageContainer");
|
|
11483
|
+
const menu = vue.useTemplateRef("menu");
|
|
11115
11484
|
const nodes = vue.computed(() => services?.editorService.get("nodes") || []);
|
|
11116
11485
|
const isMultiSelect = vue.computed(() => nodes.value.length > 1);
|
|
11117
11486
|
const stageRect = vue.computed(() => services?.uiService.get("stageRect"));
|
|
@@ -11269,7 +11638,7 @@
|
|
|
11269
11638
|
width: 60,
|
|
11270
11639
|
height: 50
|
|
11271
11640
|
},
|
|
11272
|
-
onClick: _cache[0] || (_cache[0] = ($event) => stageWrap
|
|
11641
|
+
onClick: _cache[0] || (_cache[0] = ($event) => vue.unref(stageWrap)?.container?.focus())
|
|
11273
11642
|
}, {
|
|
11274
11643
|
content: vue.withCtx(() => [
|
|
11275
11644
|
!_ctx.disabledStageOverlay ? (vue.openBlock(), vue.createBlock(_sfc_main$6, { key: 0 })) : vue.createCommentVNode("", true),
|
|
@@ -12342,7 +12711,8 @@
|
|
|
12342
12711
|
datasourceConfigs: () => ({}),
|
|
12343
12712
|
canSelect: (el) => Boolean(utils.getIdFromEl()(el)),
|
|
12344
12713
|
isContainer: (el) => el.classList.contains("magic-ui-container"),
|
|
12345
|
-
codeOptions: () => ({})
|
|
12714
|
+
codeOptions: () => ({}),
|
|
12715
|
+
customContentMenu: (menus) => menus
|
|
12346
12716
|
};
|
|
12347
12717
|
|
|
12348
12718
|
const initServiceState = (props, {
|
|
@@ -12847,9 +13217,18 @@
|
|
|
12847
13217
|
vue.provide("codeOptions", props.codeOptions);
|
|
12848
13218
|
vue.provide("stageOptions", stageOptions);
|
|
12849
13219
|
vue.provide("eventBus", new events.EventEmitter());
|
|
13220
|
+
const propsPanelMountedHandler = (e) => {
|
|
13221
|
+
emit("props-panel-mounted", e);
|
|
13222
|
+
};
|
|
13223
|
+
const propsPanelSubmitErrorHandler = (e) => {
|
|
13224
|
+
emit("props-submit-error", e);
|
|
13225
|
+
};
|
|
13226
|
+
const propsPanelFormErrorHandler = (e) => {
|
|
13227
|
+
emit("props-form-error", e);
|
|
13228
|
+
};
|
|
12850
13229
|
__expose(services);
|
|
12851
13230
|
return (_ctx, _cache) => {
|
|
12852
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
13231
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$s, {
|
|
12853
13232
|
"disabled-page-fragment": _ctx.disabledPageFragment,
|
|
12854
13233
|
"page-bar-sort-options": _ctx.pageBarSortOptions,
|
|
12855
13234
|
"page-filter-function": _ctx.pageFilterFunction
|
|
@@ -12859,7 +13238,7 @@
|
|
|
12859
13238
|
]),
|
|
12860
13239
|
nav: vue.withCtx(() => [
|
|
12861
13240
|
vue.renderSlot(_ctx.$slots, "nav", { editorService: vue.unref(editorService) }, () => [
|
|
12862
|
-
vue.createVNode(_sfc_main$
|
|
13241
|
+
vue.createVNode(_sfc_main$r, { data: _ctx.menu }, null, 8, ["data"])
|
|
12863
13242
|
])
|
|
12864
13243
|
]),
|
|
12865
13244
|
"content-before": vue.withCtx(() => [
|
|
@@ -12942,9 +13321,9 @@
|
|
|
12942
13321
|
vue.createVNode(_sfc_main$p, {
|
|
12943
13322
|
"extend-state": _ctx.extendFormState,
|
|
12944
13323
|
"disabled-show-src": _ctx.disabledShowSrc,
|
|
12945
|
-
onMounted:
|
|
12946
|
-
onFormError:
|
|
12947
|
-
onSubmitError:
|
|
13324
|
+
onMounted: propsPanelMountedHandler,
|
|
13325
|
+
onFormError: propsPanelFormErrorHandler,
|
|
13326
|
+
onSubmitError: propsPanelSubmitErrorHandler
|
|
12948
13327
|
}, {
|
|
12949
13328
|
"props-panel-header": vue.withCtx(() => [
|
|
12950
13329
|
vue.renderSlot(_ctx.$slots, "props-panel-header")
|
|
@@ -12996,24 +13375,24 @@
|
|
|
12996
13375
|
app.config.globalProperties.$TMAGIC_EDITOR = option;
|
|
12997
13376
|
setEditorConfig(option);
|
|
12998
13377
|
app.component(`${_sfc_main.name || "MEditor"}`, _sfc_main);
|
|
12999
|
-
app.component("magic-code-editor", _sfc_main$
|
|
13000
|
-
app.component("m-fields-ui-select", _sfc_main$
|
|
13001
|
-
app.component("m-fields-code-link", _sfc_main$
|
|
13002
|
-
app.component("m-fields-vs-code", _sfc_main$
|
|
13003
|
-
app.component("m-fields-code-select", _sfc_main$
|
|
13004
|
-
app.component("m-fields-code-select-col", _sfc_main$
|
|
13005
|
-
app.component("m-fields-event-select", _sfc_main$
|
|
13006
|
-
app.component("m-fields-data-source-fields", _sfc_main$
|
|
13007
|
-
app.component("m-fields-data-source-mocks", _sfc_main$
|
|
13008
|
-
app.component("m-fields-key-value", _sfc_main$
|
|
13009
|
-
app.component("m-fields-data-source-input", _sfc_main$
|
|
13010
|
-
app.component("m-fields-data-source-select", _sfc_main$
|
|
13011
|
-
app.component("m-fields-data-source-methods", _sfc_main$
|
|
13012
|
-
app.component("m-fields-data-source-method-select", _sfc_main$
|
|
13013
|
-
app.component("m-fields-data-source-field-select", _sfc_main$
|
|
13014
|
-
app.component("m-fields-page-fragment-select", _sfc_main$
|
|
13015
|
-
app.component("m-fields-display-conds", _sfc_main$
|
|
13016
|
-
app.component("m-fields-cond-op-select", _sfc_main$
|
|
13378
|
+
app.component("magic-code-editor", _sfc_main$Y);
|
|
13379
|
+
app.component("m-fields-ui-select", _sfc_main$C);
|
|
13380
|
+
app.component("m-fields-code-link", _sfc_main$W);
|
|
13381
|
+
app.component("m-fields-vs-code", _sfc_main$X);
|
|
13382
|
+
app.component("m-fields-code-select", _sfc_main$V);
|
|
13383
|
+
app.component("m-fields-code-select-col", _sfc_main$T);
|
|
13384
|
+
app.component("m-fields-event-select", _sfc_main$G);
|
|
13385
|
+
app.component("m-fields-data-source-fields", _sfc_main$Q);
|
|
13386
|
+
app.component("m-fields-data-source-mocks", _sfc_main$J);
|
|
13387
|
+
app.component("m-fields-key-value", _sfc_main$E);
|
|
13388
|
+
app.component("m-fields-data-source-input", _sfc_main$N);
|
|
13389
|
+
app.component("m-fields-data-source-select", _sfc_main$I);
|
|
13390
|
+
app.component("m-fields-data-source-methods", _sfc_main$L);
|
|
13391
|
+
app.component("m-fields-data-source-method-select", _sfc_main$K);
|
|
13392
|
+
app.component("m-fields-data-source-field-select", _sfc_main$O);
|
|
13393
|
+
app.component("m-fields-page-fragment-select", _sfc_main$D);
|
|
13394
|
+
app.component("m-fields-display-conds", _sfc_main$H);
|
|
13395
|
+
app.component("m-fields-cond-op-select", _sfc_main$S);
|
|
13017
13396
|
}
|
|
13018
13397
|
};
|
|
13019
13398
|
|
|
@@ -13029,50 +13408,51 @@
|
|
|
13029
13408
|
exports.COPY_CODE_STORAGE_KEY = COPY_CODE_STORAGE_KEY;
|
|
13030
13409
|
exports.COPY_DS_STORAGE_KEY = COPY_DS_STORAGE_KEY;
|
|
13031
13410
|
exports.COPY_STORAGE_KEY = COPY_STORAGE_KEY;
|
|
13032
|
-
exports.CodeBlockEditor = _sfc_main$
|
|
13033
|
-
exports.CodeBlockList = _sfc_main$
|
|
13034
|
-
exports.CodeBlockListPanel = _sfc_main$
|
|
13411
|
+
exports.CodeBlockEditor = _sfc_main$M;
|
|
13412
|
+
exports.CodeBlockList = _sfc_main$k;
|
|
13413
|
+
exports.CodeBlockListPanel = _sfc_main$j;
|
|
13035
13414
|
exports.CodeDeleteErrorType = CodeDeleteErrorType;
|
|
13036
|
-
exports.CodeSelect = _sfc_main$
|
|
13037
|
-
exports.CodeSelectCol = _sfc_main$
|
|
13415
|
+
exports.CodeSelect = _sfc_main$V;
|
|
13416
|
+
exports.CodeSelectCol = _sfc_main$T;
|
|
13038
13417
|
exports.ColumnLayout = ColumnLayout;
|
|
13039
13418
|
exports.ComponentListPanel = _sfc_main$b;
|
|
13040
|
-
exports.CondOpSelect = _sfc_main$
|
|
13041
|
-
exports.ContentMenu = _sfc_main$
|
|
13042
|
-
exports.DataSourceConfigPanel = _sfc_main$
|
|
13043
|
-
exports.DataSourceFieldSelect = _sfc_main$
|
|
13044
|
-
exports.DataSourceFields = _sfc_main$
|
|
13045
|
-
exports.DataSourceInput = _sfc_main$
|
|
13046
|
-
exports.DataSourceMethodSelect = _sfc_main$
|
|
13047
|
-
exports.DataSourceMethods = _sfc_main$
|
|
13048
|
-
exports.DataSourceMocks = _sfc_main$
|
|
13049
|
-
exports.DataSourceSelect = _sfc_main$
|
|
13050
|
-
exports.DisplayConds = _sfc_main$
|
|
13419
|
+
exports.CondOpSelect = _sfc_main$S;
|
|
13420
|
+
exports.ContentMenu = _sfc_main$o;
|
|
13421
|
+
exports.DataSourceConfigPanel = _sfc_main$i;
|
|
13422
|
+
exports.DataSourceFieldSelect = _sfc_main$O;
|
|
13423
|
+
exports.DataSourceFields = _sfc_main$Q;
|
|
13424
|
+
exports.DataSourceInput = _sfc_main$N;
|
|
13425
|
+
exports.DataSourceMethodSelect = _sfc_main$K;
|
|
13426
|
+
exports.DataSourceMethods = _sfc_main$L;
|
|
13427
|
+
exports.DataSourceMocks = _sfc_main$J;
|
|
13428
|
+
exports.DataSourceSelect = _sfc_main$I;
|
|
13429
|
+
exports.DisplayConds = _sfc_main$H;
|
|
13051
13430
|
exports.DragType = DragType;
|
|
13052
|
-
exports.EventSelect = _sfc_main$
|
|
13431
|
+
exports.EventSelect = _sfc_main$G;
|
|
13053
13432
|
exports.Fixed2Other = Fixed2Other;
|
|
13054
|
-
exports.FloatingBox = _sfc_main$
|
|
13433
|
+
exports.FloatingBox = _sfc_main$R;
|
|
13055
13434
|
exports.H_GUIDE_LINE_STORAGE_KEY = H_GUIDE_LINE_STORAGE_KEY;
|
|
13056
|
-
exports.Icon = _sfc_main$
|
|
13435
|
+
exports.Icon = _sfc_main$Z;
|
|
13057
13436
|
exports.IdleTask = IdleTask;
|
|
13058
13437
|
exports.KeyBindingCommand = KeyBindingCommand;
|
|
13059
|
-
exports.KeyValue = _sfc_main$
|
|
13438
|
+
exports.KeyValue = _sfc_main$E;
|
|
13060
13439
|
exports.Keys = Keys;
|
|
13061
13440
|
exports.LayerOffset = LayerOffset;
|
|
13062
13441
|
exports.LayerPanel = _sfc_main$c;
|
|
13063
13442
|
exports.Layout = Layout;
|
|
13064
|
-
exports.LayoutContainer = _sfc_main$
|
|
13065
|
-
exports.PageFragmentSelect = _sfc_main$
|
|
13443
|
+
exports.LayoutContainer = _sfc_main$A;
|
|
13444
|
+
exports.PageFragmentSelect = _sfc_main$D;
|
|
13445
|
+
exports.PropsFormPanel = _sfc_main$q;
|
|
13066
13446
|
exports.PropsPanel = _sfc_main$p;
|
|
13067
|
-
exports.Resizer = _sfc_main$
|
|
13447
|
+
exports.Resizer = _sfc_main$B;
|
|
13068
13448
|
exports.ScrollViewer = ScrollViewer;
|
|
13069
13449
|
exports.SideItemKey = SideItemKey;
|
|
13070
|
-
exports.SplitView = _sfc_main$
|
|
13071
|
-
exports.TMagicCodeEditor = _sfc_main$
|
|
13450
|
+
exports.SplitView = _sfc_main$A;
|
|
13451
|
+
exports.TMagicCodeEditor = _sfc_main$Y;
|
|
13072
13452
|
exports.TMagicEditor = _sfc_main;
|
|
13073
|
-
exports.ToolButton = _sfc_main$
|
|
13074
|
-
exports.Tree = _sfc_main$
|
|
13075
|
-
exports.TreeNode = _sfc_main$
|
|
13453
|
+
exports.ToolButton = _sfc_main$z;
|
|
13454
|
+
exports.Tree = _sfc_main$l;
|
|
13455
|
+
exports.TreeNode = _sfc_main$m;
|
|
13076
13456
|
exports.UI_SELECT_MODE_EVENT_NAME = UI_SELECT_MODE_EVENT_NAME;
|
|
13077
13457
|
exports.UndoRedo = UndoRedo;
|
|
13078
13458
|
exports.V_GUIDE_LINE_STORAGE_KEY = V_GUIDE_LINE_STORAGE_KEY;
|