@tmagic/editor 1.5.2 → 1.5.4
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 +366 -6
- package/dist/tmagic-editor.js +1749 -829
- package/dist/tmagic-editor.umd.cjs +1764 -843
- package/package.json +7 -7
- package/src/components/CodeBlockEditor.vue +3 -3
- package/src/components/CodeParams.vue +2 -2
- package/src/components/ContentMenu.vue +13 -13
- package/src/components/FloatingBox.vue +9 -9
- package/src/components/Resizer.vue +2 -2
- package/src/components/ScrollBar.vue +6 -7
- package/src/components/ScrollViewer.vue +6 -6
- package/src/components/SplitView.vue +3 -3
- package/src/fields/DataSourceInput.vue +3 -3
- package/src/fields/DataSourceMethods.vue +4 -4
- package/src/fields/DisplayConds.vue +2 -1
- package/src/fields/StyleSetter/Index.vue +69 -0
- package/src/fields/StyleSetter/components/BackgroundPosition.vue +71 -0
- package/src/fields/StyleSetter/components/Border.vue +104 -0
- package/src/fields/StyleSetter/components/Box.vue +73 -0
- package/src/fields/StyleSetter/components/Position.vue +54 -0
- package/src/fields/StyleSetter/icons/background-position/LeftBottom.vue +7 -0
- package/src/fields/StyleSetter/icons/background-position/LeftCenter.vue +7 -0
- package/src/fields/StyleSetter/icons/background-position/LeftTop.vue +12 -0
- package/src/fields/StyleSetter/icons/background-position/index.ts +3 -0
- package/src/fields/StyleSetter/icons/background-repeat/NoRepeat.vue +8 -0
- package/src/fields/StyleSetter/icons/background-repeat/Repeat.vue +31 -0
- package/src/fields/StyleSetter/icons/background-repeat/RepeatX.vue +8 -0
- package/src/fields/StyleSetter/icons/background-repeat/RepeatY.vue +8 -0
- package/src/fields/StyleSetter/icons/background-repeat/index.ts +4 -0
- package/src/fields/StyleSetter/icons/display/Block.vue +7 -0
- package/src/fields/StyleSetter/icons/display/Flex.vue +7 -0
- package/src/fields/StyleSetter/icons/display/Inline.vue +7 -0
- package/src/fields/StyleSetter/icons/display/InlineBlock.vue +7 -0
- package/src/fields/StyleSetter/icons/display/None.vue +7 -0
- package/src/fields/StyleSetter/icons/display/index.ts +5 -0
- package/src/fields/StyleSetter/icons/flex-direction/Column.vue +7 -0
- package/src/fields/StyleSetter/icons/flex-direction/ColumnReverse.vue +7 -0
- package/src/fields/StyleSetter/icons/flex-direction/Row.vue +7 -0
- package/src/fields/StyleSetter/icons/flex-direction/RowReverse.vue +7 -0
- package/src/fields/StyleSetter/icons/flex-direction/index.ts +4 -0
- package/src/fields/StyleSetter/icons/justify-content/Center.vue +5 -0
- package/src/fields/StyleSetter/icons/justify-content/FlexEnd.vue +5 -0
- package/src/fields/StyleSetter/icons/justify-content/FlexStart.vue +5 -0
- package/src/fields/StyleSetter/icons/justify-content/SpaceAround.vue +7 -0
- package/src/fields/StyleSetter/icons/justify-content/SpaceBetween.vue +5 -0
- package/src/fields/StyleSetter/icons/justify-content/index.ts +5 -0
- package/src/fields/StyleSetter/icons/text-align/Center.vue +7 -0
- package/src/fields/StyleSetter/icons/text-align/Left.vue +7 -0
- package/src/fields/StyleSetter/icons/text-align/Right.vue +7 -0
- package/src/fields/StyleSetter/icons/text-align/index.ts +3 -0
- package/src/fields/StyleSetter/pro/Background.vue +78 -0
- package/src/fields/StyleSetter/pro/Border.vue +35 -0
- package/src/fields/StyleSetter/pro/Font.vue +90 -0
- package/src/fields/StyleSetter/pro/Layout.vue +164 -0
- package/src/fields/StyleSetter/pro/Position.vue +48 -0
- package/src/fields/StyleSetter/pro/index.ts +5 -0
- package/src/hooks/use-code-block-edit.ts +5 -5
- package/src/index.ts +3 -0
- package/src/initService.ts +104 -66
- package/src/layouts/CodeEditor.vue +6 -6
- package/src/layouts/Framework.vue +5 -5
- package/src/layouts/NavMenu.vue +6 -3
- package/src/layouts/page-bar/PageBar.vue +13 -13
- package/src/layouts/page-bar/PageBarScrollContainer.vue +12 -11
- package/src/layouts/props-panel/FormPanel.vue +7 -7
- package/src/layouts/props-panel/PropsPanel.vue +36 -4
- package/src/layouts/sidebar/code-block/CodeBlockListPanel.vue +3 -3
- package/src/layouts/sidebar/layer/LayerMenu.vue +2 -2
- package/src/layouts/sidebar/layer/LayerPanel.vue +5 -4
- package/src/layouts/sidebar/layer/use-click.ts +4 -6
- package/src/layouts/workspace/viewer/NodeListMenu.vue +5 -5
- package/src/layouts/workspace/viewer/Stage.vue +13 -13
- package/src/layouts/workspace/viewer/StageOverlay.vue +2 -2
- package/src/layouts/workspace/viewer/ViewerMenu.vue +3 -3
- package/src/services/componentList.ts +2 -2
- package/src/services/dep.ts +8 -2
- package/src/services/editor.ts +2 -2
- package/src/services/stageOverlay.ts +2 -2
- package/src/services/ui.ts +2 -2
- package/src/theme/props-panel.scss +13 -0
- package/src/theme/resizer.scss +2 -2
- package/src/theme/style-setter/background.scss +113 -0
- package/src/theme/style-setter/border.scss +53 -0
- package/src/theme/style-setter/index.scss +28 -0
- package/src/theme/style-setter/layout.scss +199 -0
- package/src/theme/theme.scss +1 -0
- package/src/utils/idle-task.ts +26 -10
- package/src/utils/props.ts +52 -297
- package/types/index.d.ts +432 -170
|
@@ -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$10 = ["src"];
|
|
27
|
+
const _sfc_main$1s = /* @__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$10)
|
|
52
52
|
]),
|
|
53
53
|
_: 1
|
|
54
54
|
})) : typeof _ctx.icon === "string" ? (vue.openBlock(), vue.createElementBlock("i", {
|
|
@@ -76,10 +76,14 @@
|
|
|
76
76
|
emmetMonacoEs.emmetHTML(monaco__namespace);
|
|
77
77
|
emmetMonacoEs.emmetCSS(monaco__namespace, ["css", "scss"]);
|
|
78
78
|
|
|
79
|
-
const _hoisted_1
|
|
79
|
+
const _hoisted_1$$ = {
|
|
80
80
|
class: /* @__PURE__ */ vue.normalizeClass(`magic-code-editor`)
|
|
81
81
|
};
|
|
82
|
-
const
|
|
82
|
+
const _hoisted_2$o = {
|
|
83
|
+
ref: "codeEditor",
|
|
84
|
+
class: "magic-code-editor-content"
|
|
85
|
+
};
|
|
86
|
+
const _sfc_main$1r = /* @__PURE__ */ vue.defineComponent({
|
|
83
87
|
...{
|
|
84
88
|
name: "MEditorCodeEditor"
|
|
85
89
|
},
|
|
@@ -132,7 +136,7 @@
|
|
|
132
136
|
let vsDiffEditor = null;
|
|
133
137
|
const values = vue.ref("");
|
|
134
138
|
const loading = vue.ref(false);
|
|
135
|
-
const
|
|
139
|
+
const codeEditorEl = vue.useTemplateRef("codeEditor");
|
|
136
140
|
const resizeObserver = new globalThis.ResizeObserver(
|
|
137
141
|
lodashEs.throttle(() => {
|
|
138
142
|
vsEditor?.layout();
|
|
@@ -153,7 +157,7 @@
|
|
|
153
157
|
};
|
|
154
158
|
const getEditorValue = () => (props.type === "diff" ? vsDiffEditor?.getModifiedEditor().getValue() : vsEditor?.getValue()) || "";
|
|
155
159
|
const init = async () => {
|
|
156
|
-
if (!
|
|
160
|
+
if (!codeEditorEl.value) return;
|
|
157
161
|
const options = {
|
|
158
162
|
value: values.value,
|
|
159
163
|
language: props.language,
|
|
@@ -161,14 +165,14 @@
|
|
|
161
165
|
...props.options
|
|
162
166
|
};
|
|
163
167
|
if (props.type === "diff") {
|
|
164
|
-
vsDiffEditor = monaco__namespace.editor.createDiffEditor(
|
|
168
|
+
vsDiffEditor = monaco__namespace.editor.createDiffEditor(codeEditorEl.value, options);
|
|
165
169
|
} else {
|
|
166
|
-
vsEditor = monaco__namespace.editor.create(
|
|
170
|
+
vsEditor = monaco__namespace.editor.create(codeEditorEl.value, options);
|
|
167
171
|
}
|
|
168
172
|
setEditorValue(props.initValues, props.modifiedValues);
|
|
169
173
|
loading.value = false;
|
|
170
174
|
emit("initd", vsEditor);
|
|
171
|
-
|
|
175
|
+
codeEditorEl.value.addEventListener("keydown", (e) => {
|
|
172
176
|
if (e.keyCode === 83 && (navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey)) {
|
|
173
177
|
e.preventDefault();
|
|
174
178
|
e.stopPropagation();
|
|
@@ -186,7 +190,7 @@
|
|
|
186
190
|
}
|
|
187
191
|
});
|
|
188
192
|
}
|
|
189
|
-
resizeObserver.observe(
|
|
193
|
+
resizeObserver.observe(codeEditorEl.value);
|
|
190
194
|
};
|
|
191
195
|
vue.watch(
|
|
192
196
|
() => props.initValues,
|
|
@@ -236,7 +240,7 @@
|
|
|
236
240
|
}
|
|
237
241
|
});
|
|
238
242
|
return (_ctx, _cache) => {
|
|
239
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1
|
|
243
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$$, [
|
|
240
244
|
(vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
241
245
|
to: "body",
|
|
242
246
|
disabled: !fullScreen.value
|
|
@@ -252,15 +256,11 @@
|
|
|
252
256
|
onClick: fullScreenHandler
|
|
253
257
|
}, {
|
|
254
258
|
default: vue.withCtx(() => [
|
|
255
|
-
vue.createVNode(_sfc_main$
|
|
259
|
+
vue.createVNode(_sfc_main$1s, { icon: vue.unref(iconsVue.FullScreen) }, null, 8, ["icon"])
|
|
256
260
|
]),
|
|
257
261
|
_: 1
|
|
258
262
|
}),
|
|
259
|
-
vue.createElementVNode("div",
|
|
260
|
-
ref_key: "codeEditor",
|
|
261
|
-
ref: codeEditor,
|
|
262
|
-
class: "magic-code-editor-content"
|
|
263
|
-
}, null, 512)
|
|
263
|
+
vue.createElementVNode("div", _hoisted_2$o, null, 512)
|
|
264
264
|
], 6)
|
|
265
265
|
], 8, ["disabled"]))
|
|
266
266
|
]);
|
|
@@ -268,7 +268,7 @@
|
|
|
268
268
|
}
|
|
269
269
|
});
|
|
270
270
|
|
|
271
|
-
const _sfc_main$
|
|
271
|
+
const _sfc_main$1q = /* @__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$1r, {
|
|
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$1p = /* @__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$1o = /* @__PURE__ */ vue.defineComponent({
|
|
389
389
|
...{
|
|
390
390
|
name: "MFieldsCodeSelect"
|
|
391
391
|
},
|
|
@@ -528,303 +528,60 @@
|
|
|
528
528
|
items: [
|
|
529
529
|
{
|
|
530
530
|
name: "style",
|
|
531
|
+
labelWidth: "100px",
|
|
532
|
+
type: "style-setter",
|
|
531
533
|
items: [
|
|
532
534
|
{
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
name: "bottom",
|
|
584
|
-
text: "bottom",
|
|
585
|
-
checkStrictly: false,
|
|
586
|
-
dataSourceFieldType: ["string", "number"],
|
|
587
|
-
fieldConfig: {
|
|
588
|
-
type: "text"
|
|
589
|
-
},
|
|
590
|
-
disabled: (_vm, { model }) => model.position === "fixed" && model._magic_position === "fixedTop"
|
|
591
|
-
}
|
|
592
|
-
]
|
|
593
|
-
},
|
|
594
|
-
{
|
|
595
|
-
type: "fieldset",
|
|
596
|
-
legend: "盒子",
|
|
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
|
-
},
|
|
619
|
-
{
|
|
620
|
-
type: "data-source-field-select",
|
|
621
|
-
name: "width",
|
|
622
|
-
text: "宽度",
|
|
623
|
-
checkStrictly: false,
|
|
624
|
-
dataSourceFieldType: ["string", "number"],
|
|
625
|
-
fieldConfig: {
|
|
626
|
-
type: "text"
|
|
627
|
-
}
|
|
628
|
-
},
|
|
629
|
-
{
|
|
630
|
-
type: "data-source-field-select",
|
|
631
|
-
name: "height",
|
|
632
|
-
text: "高度",
|
|
633
|
-
checkStrictly: false,
|
|
634
|
-
dataSourceFieldType: ["string", "number"],
|
|
635
|
-
fieldConfig: {
|
|
636
|
-
type: "text"
|
|
637
|
-
}
|
|
638
|
-
},
|
|
639
|
-
{
|
|
640
|
-
type: "data-source-field-select",
|
|
641
|
-
text: "overflow",
|
|
642
|
-
name: "overflow",
|
|
643
|
-
checkStrictly: false,
|
|
644
|
-
dataSourceFieldType: ["string"],
|
|
645
|
-
fieldConfig: {
|
|
646
|
-
type: "select",
|
|
647
|
-
clearable: true,
|
|
648
|
-
allowCreate: true,
|
|
649
|
-
options: [
|
|
650
|
-
{ text: "visible", value: "visible" },
|
|
651
|
-
{ text: "hidden", value: "hidden" },
|
|
652
|
-
{ text: "clip", value: "clip" },
|
|
653
|
-
{ text: "scroll", value: "scroll" },
|
|
654
|
-
{ text: "auto", value: "auto" },
|
|
655
|
-
{ text: "overlay", value: "overlay" },
|
|
656
|
-
{ text: "initial", value: "initial" }
|
|
657
|
-
]
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
]
|
|
661
|
-
},
|
|
662
|
-
{
|
|
663
|
-
type: "fieldset",
|
|
664
|
-
legend: "边框",
|
|
665
|
-
items: [
|
|
666
|
-
{
|
|
667
|
-
type: "data-source-field-select",
|
|
668
|
-
name: "borderWidth",
|
|
669
|
-
text: "宽度",
|
|
670
|
-
defaultValue: "0",
|
|
671
|
-
checkStrictly: false,
|
|
672
|
-
dataSourceFieldType: ["string", "number"],
|
|
673
|
-
fieldConfig: {
|
|
674
|
-
type: "text"
|
|
675
|
-
}
|
|
676
|
-
},
|
|
677
|
-
{
|
|
678
|
-
type: "data-source-field-select",
|
|
679
|
-
name: "borderColor",
|
|
680
|
-
text: "颜色",
|
|
681
|
-
checkStrictly: false,
|
|
682
|
-
dataSourceFieldType: ["string"],
|
|
683
|
-
fieldConfig: {
|
|
684
|
-
type: "text"
|
|
685
|
-
}
|
|
686
|
-
},
|
|
687
|
-
{
|
|
688
|
-
type: "data-source-field-select",
|
|
689
|
-
name: "borderStyle",
|
|
690
|
-
text: "样式",
|
|
691
|
-
defaultValue: "none",
|
|
692
|
-
checkStrictly: false,
|
|
693
|
-
dataSourceFieldType: ["string"],
|
|
694
|
-
fieldConfig: {
|
|
695
|
-
type: "select",
|
|
696
|
-
options: [
|
|
697
|
-
{ text: "none", value: "none" },
|
|
698
|
-
{ text: "hidden", value: "hidden" },
|
|
699
|
-
{ text: "dotted", value: "dotted" },
|
|
700
|
-
{ text: "dashed", value: "dashed" },
|
|
701
|
-
{ text: "solid", value: "solid" },
|
|
702
|
-
{ text: "double", value: "double" },
|
|
703
|
-
{ text: "groove", value: "groove" },
|
|
704
|
-
{ text: "ridge", value: "ridge" },
|
|
705
|
-
{ text: "inset", value: "inset" },
|
|
706
|
-
{ text: "outset", value: "outset" }
|
|
707
|
-
]
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
|
-
]
|
|
711
|
-
},
|
|
712
|
-
{
|
|
713
|
-
type: "fieldset",
|
|
714
|
-
legend: "背景",
|
|
715
|
-
items: [
|
|
716
|
-
{
|
|
717
|
-
type: "data-source-field-select",
|
|
718
|
-
name: "backgroundImage",
|
|
719
|
-
text: "背景图",
|
|
720
|
-
checkStrictly: false,
|
|
721
|
-
dataSourceFieldType: ["string"],
|
|
722
|
-
fieldConfig: {
|
|
723
|
-
type: "img-upload"
|
|
724
|
-
}
|
|
725
|
-
},
|
|
726
|
-
{
|
|
727
|
-
type: "data-source-field-select",
|
|
728
|
-
name: "backgroundColor",
|
|
729
|
-
text: "背景颜色",
|
|
730
|
-
checkStrictly: false,
|
|
731
|
-
dataSourceFieldType: ["string"],
|
|
732
|
-
fieldConfig: {
|
|
733
|
-
type: "colorPicker"
|
|
734
|
-
}
|
|
735
|
-
},
|
|
736
|
-
{
|
|
737
|
-
type: "data-source-field-select",
|
|
738
|
-
name: "backgroundRepeat",
|
|
739
|
-
text: "背景图重复",
|
|
740
|
-
defaultValue: "no-repeat",
|
|
741
|
-
checkStrictly: false,
|
|
742
|
-
dataSourceFieldType: ["string"],
|
|
743
|
-
fieldConfig: {
|
|
744
|
-
type: "select",
|
|
745
|
-
options: [
|
|
746
|
-
{ text: "repeat", value: "repeat" },
|
|
747
|
-
{ text: "repeat-x", value: "repeat-x" },
|
|
748
|
-
{ text: "repeat-y", value: "repeat-y" },
|
|
749
|
-
{ text: "no-repeat", value: "no-repeat" },
|
|
750
|
-
{ text: "inherit", value: "inherit" }
|
|
751
|
-
]
|
|
752
|
-
}
|
|
753
|
-
},
|
|
754
|
-
{
|
|
755
|
-
type: "data-source-field-select",
|
|
756
|
-
name: "backgroundSize",
|
|
757
|
-
text: "背景图大小",
|
|
758
|
-
defaultValue: "100% 100%",
|
|
759
|
-
checkStrictly: false,
|
|
760
|
-
dataSourceFieldType: ["string"],
|
|
761
|
-
fieldConfig: {
|
|
762
|
-
type: "text"
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
]
|
|
766
|
-
},
|
|
767
|
-
{
|
|
768
|
-
type: "fieldset",
|
|
769
|
-
legend: "字体",
|
|
770
|
-
items: [
|
|
771
|
-
{
|
|
772
|
-
type: "data-source-field-select",
|
|
773
|
-
name: "color",
|
|
774
|
-
text: "颜色",
|
|
775
|
-
checkStrictly: false,
|
|
776
|
-
dataSourceFieldType: ["string"],
|
|
777
|
-
fieldConfig: {
|
|
778
|
-
type: "colorPicker"
|
|
779
|
-
}
|
|
780
|
-
},
|
|
781
|
-
{
|
|
782
|
-
type: "data-source-field-select",
|
|
783
|
-
name: "fontSize",
|
|
784
|
-
text: "大小",
|
|
785
|
-
checkStrictly: false,
|
|
786
|
-
dataSourceFieldType: ["string", "number"],
|
|
787
|
-
fieldConfig: {
|
|
788
|
-
type: "text"
|
|
789
|
-
}
|
|
790
|
-
},
|
|
791
|
-
{
|
|
792
|
-
type: "data-source-field-select",
|
|
793
|
-
name: "fontWeight",
|
|
794
|
-
text: "粗细",
|
|
795
|
-
checkStrictly: false,
|
|
796
|
-
dataSourceFieldType: ["string", "number"],
|
|
797
|
-
fieldConfig: {
|
|
798
|
-
type: "text"
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
]
|
|
802
|
-
},
|
|
803
|
-
{
|
|
804
|
-
type: "fieldset",
|
|
805
|
-
legend: "变形",
|
|
806
|
-
name: "transform",
|
|
807
|
-
items: [
|
|
808
|
-
{
|
|
809
|
-
type: "data-source-field-select",
|
|
810
|
-
name: "rotate",
|
|
811
|
-
text: "旋转角度",
|
|
812
|
-
checkStrictly: false,
|
|
813
|
-
dataSourceFieldType: ["string"],
|
|
814
|
-
fieldConfig: {
|
|
815
|
-
type: "text"
|
|
816
|
-
}
|
|
817
|
-
},
|
|
818
|
-
{
|
|
819
|
-
type: "data-source-field-select",
|
|
820
|
-
name: "scale",
|
|
821
|
-
text: "缩放",
|
|
822
|
-
checkStrictly: false,
|
|
823
|
-
dataSourceFieldType: ["number", "string"],
|
|
824
|
-
fieldConfig: {
|
|
825
|
-
type: "text"
|
|
826
|
-
}
|
|
827
|
-
}
|
|
535
|
+
names: [
|
|
536
|
+
"display",
|
|
537
|
+
"flexDirection",
|
|
538
|
+
"justifyContent",
|
|
539
|
+
"alignItems",
|
|
540
|
+
"flexWrap",
|
|
541
|
+
"marginTop",
|
|
542
|
+
"marginRight",
|
|
543
|
+
"marginBottom",
|
|
544
|
+
"marginLeft",
|
|
545
|
+
"paddingTop",
|
|
546
|
+
"paddingRight",
|
|
547
|
+
"paddingBottom",
|
|
548
|
+
"paddingLeft",
|
|
549
|
+
"width",
|
|
550
|
+
"height",
|
|
551
|
+
"overflow",
|
|
552
|
+
"fontSize",
|
|
553
|
+
"lineHeight",
|
|
554
|
+
"fontWeight",
|
|
555
|
+
"color",
|
|
556
|
+
"textAlign",
|
|
557
|
+
"backgroundColor",
|
|
558
|
+
"backgroundImage",
|
|
559
|
+
"backgroundSize",
|
|
560
|
+
"backgroundPosition",
|
|
561
|
+
"backgroundRepeat",
|
|
562
|
+
"position",
|
|
563
|
+
"zIndex",
|
|
564
|
+
"top",
|
|
565
|
+
"right",
|
|
566
|
+
"bottom",
|
|
567
|
+
"left",
|
|
568
|
+
"borderRadius",
|
|
569
|
+
"borderTopWidth",
|
|
570
|
+
"borderTopStyle",
|
|
571
|
+
"borderTopColor",
|
|
572
|
+
"borderRightColor",
|
|
573
|
+
"borderRightWidth",
|
|
574
|
+
"borderRightStyle",
|
|
575
|
+
"borderRightColor",
|
|
576
|
+
"borderBottomWidth",
|
|
577
|
+
"borderBottomStyle",
|
|
578
|
+
"borderBottomColor",
|
|
579
|
+
"borderLeftStyle",
|
|
580
|
+
"borderLeftWidth",
|
|
581
|
+
"borderLeftColor",
|
|
582
|
+
"borderWidth",
|
|
583
|
+
"borderStyle",
|
|
584
|
+
"borderColor"
|
|
828
585
|
]
|
|
829
586
|
}
|
|
830
587
|
]
|
|
@@ -2209,8 +1966,8 @@
|
|
|
2209
1966
|
if (!info.node) throw new Error(`获取不到id为${config.id}的节点`);
|
|
2210
1967
|
const node = vue.toRaw(info.node);
|
|
2211
1968
|
let newConfig = await this.toggleFixedPosition(vue.toRaw(config), node, root);
|
|
2212
|
-
newConfig = lodashEs.mergeWith(lodashEs.cloneDeep(node), newConfig, (objValue, srcValue, key) => {
|
|
2213
|
-
if (typeof srcValue === "undefined" && Object.hasOwn(
|
|
1969
|
+
newConfig = lodashEs.mergeWith(lodashEs.cloneDeep(node), newConfig, (objValue, srcValue, key, object, source) => {
|
|
1970
|
+
if (typeof srcValue === "undefined" && Object.hasOwn(source, key)) {
|
|
2214
1971
|
return "";
|
|
2215
1972
|
}
|
|
2216
1973
|
if (lodashEs.isObject(srcValue) && Array.isArray(objValue)) {
|
|
@@ -3073,13 +2830,14 @@
|
|
|
3073
2830
|
};
|
|
3074
2831
|
class IdleTask extends events.EventEmitter {
|
|
3075
2832
|
taskList = [];
|
|
2833
|
+
hightLevelTaskList = [];
|
|
3076
2834
|
taskHandle = null;
|
|
3077
2835
|
constructor() {
|
|
3078
2836
|
super();
|
|
3079
2837
|
this.setMaxListeners(1e3);
|
|
3080
2838
|
}
|
|
3081
|
-
enqueueTask(taskHandler, taskData) {
|
|
3082
|
-
this.taskList.push({
|
|
2839
|
+
enqueueTask(taskHandler, taskData, isHightLevel = false) {
|
|
2840
|
+
(isHightLevel ? this.hightLevelTaskList : this.taskList).push({
|
|
3083
2841
|
handler: taskHandler,
|
|
3084
2842
|
data: taskData
|
|
3085
2843
|
});
|
|
@@ -3088,6 +2846,10 @@
|
|
|
3088
2846
|
}
|
|
3089
2847
|
}
|
|
3090
2848
|
clearTasks() {
|
|
2849
|
+
if (this.taskHandle) {
|
|
2850
|
+
globalThis.cancelIdleCallback(this.taskHandle);
|
|
2851
|
+
}
|
|
2852
|
+
this.hightLevelTaskList = [];
|
|
3091
2853
|
this.taskList = [];
|
|
3092
2854
|
}
|
|
3093
2855
|
on(eventName, listener) {
|
|
@@ -3100,7 +2862,8 @@
|
|
|
3100
2862
|
return super.emit(eventName, ...args);
|
|
3101
2863
|
}
|
|
3102
2864
|
runTaskQueue(deadline) {
|
|
3103
|
-
|
|
2865
|
+
const { hightLevelTaskList, taskList } = this;
|
|
2866
|
+
while (deadline.timeRemaining() > 0 && taskList.length) {
|
|
3104
2867
|
const timeRemaining = deadline.timeRemaining();
|
|
3105
2868
|
let times = 0;
|
|
3106
2869
|
if (timeRemaining <= 5) {
|
|
@@ -3113,16 +2876,19 @@
|
|
|
3113
2876
|
times = 600;
|
|
3114
2877
|
}
|
|
3115
2878
|
for (let i = 0; i < times; i++) {
|
|
3116
|
-
const task =
|
|
2879
|
+
const task = hightLevelTaskList.length > 0 ? hightLevelTaskList.shift() : taskList.shift();
|
|
3117
2880
|
if (task) {
|
|
3118
2881
|
task.handler(task.data);
|
|
3119
2882
|
}
|
|
3120
|
-
if (
|
|
2883
|
+
if (hightLevelTaskList.length === 0 && taskList.length === 0) {
|
|
3121
2884
|
break;
|
|
3122
2885
|
}
|
|
3123
2886
|
}
|
|
3124
2887
|
}
|
|
3125
|
-
if (
|
|
2888
|
+
if (!hightLevelTaskList.length) {
|
|
2889
|
+
this.emit("hight-level-finish");
|
|
2890
|
+
}
|
|
2891
|
+
if (hightLevelTaskList.length || taskList.length) {
|
|
3126
2892
|
this.taskHandle = globalThis.requestIdleCallback(this.runTaskQueue.bind(this), { timeout: 300 });
|
|
3127
2893
|
} else {
|
|
3128
2894
|
this.taskHandle = 0;
|
|
@@ -3268,7 +3034,7 @@
|
|
|
3268
3034
|
});
|
|
3269
3035
|
};
|
|
3270
3036
|
|
|
3271
|
-
const _sfc_main$
|
|
3037
|
+
const _sfc_main$1n = /* @__PURE__ */ vue.defineComponent({
|
|
3272
3038
|
...{
|
|
3273
3039
|
name: "MEditorCodeParams"
|
|
3274
3040
|
},
|
|
@@ -3284,7 +3050,7 @@
|
|
|
3284
3050
|
setup(__props, { emit: __emit }) {
|
|
3285
3051
|
const props = __props;
|
|
3286
3052
|
const emit = __emit;
|
|
3287
|
-
const
|
|
3053
|
+
const formRef = vue.useTemplateRef("form");
|
|
3288
3054
|
const getFormConfig = (items = []) => [
|
|
3289
3055
|
{
|
|
3290
3056
|
type: "fieldset",
|
|
@@ -3307,7 +3073,7 @@
|
|
|
3307
3073
|
);
|
|
3308
3074
|
const onParamsChangeHandler = async (v, eventData) => {
|
|
3309
3075
|
try {
|
|
3310
|
-
const value = await
|
|
3076
|
+
const value = await formRef.value?.submitForm(true);
|
|
3311
3077
|
emit("change", value, eventData);
|
|
3312
3078
|
} catch (e) {
|
|
3313
3079
|
error(e);
|
|
@@ -3315,8 +3081,7 @@
|
|
|
3315
3081
|
};
|
|
3316
3082
|
return (_ctx, _cache) => {
|
|
3317
3083
|
return vue.openBlock(), vue.createBlock(vue.unref(formPlugin.MForm), {
|
|
3318
|
-
|
|
3319
|
-
ref: form,
|
|
3084
|
+
ref: "form",
|
|
3320
3085
|
config: codeParamsConfig.value,
|
|
3321
3086
|
"init-values": _ctx.model,
|
|
3322
3087
|
disabled: _ctx.disabled,
|
|
@@ -3328,9 +3093,9 @@
|
|
|
3328
3093
|
}
|
|
3329
3094
|
});
|
|
3330
3095
|
|
|
3331
|
-
const _hoisted_1$
|
|
3332
|
-
const _hoisted_2$
|
|
3333
|
-
const _sfc_main$
|
|
3096
|
+
const _hoisted_1$_ = { class: "m-fields-code-select-col" };
|
|
3097
|
+
const _hoisted_2$n = { class: "code-select-container" };
|
|
3098
|
+
const _sfc_main$1m = /* @__PURE__ */ vue.defineComponent({
|
|
3334
3099
|
...{
|
|
3335
3100
|
name: "MFieldsCodeSelectCol"
|
|
3336
3101
|
},
|
|
@@ -3426,8 +3191,8 @@
|
|
|
3426
3191
|
eventBus?.emit("edit-code", id);
|
|
3427
3192
|
};
|
|
3428
3193
|
return (_ctx, _cache) => {
|
|
3429
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
3430
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3194
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$_, [
|
|
3195
|
+
vue.createElementVNode("div", _hoisted_2$n, [
|
|
3431
3196
|
vue.createVNode(vue.unref(formPlugin.MContainer), {
|
|
3432
3197
|
class: "select",
|
|
3433
3198
|
config: selectConfig,
|
|
@@ -3442,14 +3207,14 @@
|
|
|
3442
3207
|
onClick: _cache[0] || (_cache[0] = ($event) => editCode(_ctx.model[_ctx.name]))
|
|
3443
3208
|
}, {
|
|
3444
3209
|
default: vue.withCtx(() => [
|
|
3445
|
-
vue.createVNode(_sfc_main$
|
|
3210
|
+
vue.createVNode(_sfc_main$1s, {
|
|
3446
3211
|
icon: !notEditable.value ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View)
|
|
3447
3212
|
}, null, 8, ["icon"])
|
|
3448
3213
|
]),
|
|
3449
3214
|
_: 1
|
|
3450
3215
|
}, 8, ["size"])) : vue.createCommentVNode("", true)
|
|
3451
3216
|
]),
|
|
3452
|
-
paramsConfig.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3217
|
+
paramsConfig.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$1n, {
|
|
3453
3218
|
name: "params",
|
|
3454
3219
|
key: _ctx.model[_ctx.name],
|
|
3455
3220
|
model: _ctx.model,
|
|
@@ -3462,7 +3227,7 @@
|
|
|
3462
3227
|
}
|
|
3463
3228
|
});
|
|
3464
3229
|
|
|
3465
|
-
const _sfc_main$
|
|
3230
|
+
const _sfc_main$1l = /* @__PURE__ */ vue.defineComponent({
|
|
3466
3231
|
...{
|
|
3467
3232
|
name: "MFieldsCondOpSelect"
|
|
3468
3233
|
},
|
|
@@ -3548,7 +3313,11 @@
|
|
|
3548
3313
|
}
|
|
3549
3314
|
});
|
|
3550
3315
|
|
|
3551
|
-
const
|
|
3316
|
+
const _hoisted_1$Z = {
|
|
3317
|
+
ref: "title",
|
|
3318
|
+
class: "m-editor-float-box-title"
|
|
3319
|
+
};
|
|
3320
|
+
const _sfc_main$1k = /* @__PURE__ */ vue.defineComponent({
|
|
3552
3321
|
__name: "FloatingBox",
|
|
3553
3322
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
3554
3323
|
position: { default: () => ({ left: 0, top: 0 }) },
|
|
@@ -3568,8 +3337,8 @@
|
|
|
3568
3337
|
const height = vue.useModel(__props, "height");
|
|
3569
3338
|
const visible = vue.useModel(__props, "visible");
|
|
3570
3339
|
const props = __props;
|
|
3571
|
-
const
|
|
3572
|
-
const titleEl = vue.useTemplateRef("
|
|
3340
|
+
const targetEl = vue.useTemplateRef("target");
|
|
3341
|
+
const titleEl = vue.useTemplateRef("title");
|
|
3573
3342
|
const zIndex = designPlugin.useZIndex();
|
|
3574
3343
|
const curZIndex = vue.ref(0);
|
|
3575
3344
|
const titleHeight = vue.ref(0);
|
|
@@ -3577,8 +3346,8 @@
|
|
|
3577
3346
|
if (height.value) {
|
|
3578
3347
|
return height.value - titleHeight.value;
|
|
3579
3348
|
}
|
|
3580
|
-
if (
|
|
3581
|
-
return
|
|
3349
|
+
if (targetEl.value) {
|
|
3350
|
+
return targetEl.value.clientHeight - titleHeight.value;
|
|
3582
3351
|
}
|
|
3583
3352
|
return "auto";
|
|
3584
3353
|
});
|
|
@@ -3600,7 +3369,7 @@
|
|
|
3600
3369
|
const initMoveable = () => {
|
|
3601
3370
|
moveable = new VanillaMoveable(globalThis.document.body, {
|
|
3602
3371
|
className: "m-editor-floating-box-moveable",
|
|
3603
|
-
target:
|
|
3372
|
+
target: targetEl.value,
|
|
3604
3373
|
draggable: true,
|
|
3605
3374
|
resizable: true,
|
|
3606
3375
|
edge: true,
|
|
@@ -3634,7 +3403,7 @@
|
|
|
3634
3403
|
if (visible2) {
|
|
3635
3404
|
await vue.nextTick();
|
|
3636
3405
|
curZIndex.value = zIndex.nextZIndex();
|
|
3637
|
-
const targetRect =
|
|
3406
|
+
const targetRect = targetEl.value?.getBoundingClientRect();
|
|
3638
3407
|
if (targetRect) {
|
|
3639
3408
|
width.value = targetRect.width;
|
|
3640
3409
|
height.value = targetRect.height;
|
|
@@ -3670,10 +3439,10 @@
|
|
|
3670
3439
|
const nextZIndex = () => {
|
|
3671
3440
|
curZIndex.value = zIndex.nextZIndex();
|
|
3672
3441
|
};
|
|
3673
|
-
vue.provide("parentFloating",
|
|
3442
|
+
vue.provide("parentFloating", targetEl);
|
|
3674
3443
|
__expose({
|
|
3675
3444
|
bodyHeight,
|
|
3676
|
-
target,
|
|
3445
|
+
target: targetEl,
|
|
3677
3446
|
titleEl
|
|
3678
3447
|
});
|
|
3679
3448
|
return (_ctx, _cache) => {
|
|
@@ -3682,17 +3451,12 @@
|
|
|
3682
3451
|
to: "body"
|
|
3683
3452
|
}, [
|
|
3684
3453
|
vue.createElementVNode("div", {
|
|
3685
|
-
|
|
3686
|
-
ref: target,
|
|
3454
|
+
ref: "target",
|
|
3687
3455
|
class: "m-editor-float-box",
|
|
3688
3456
|
style: vue.normalizeStyle({ ...style.value, zIndex: curZIndex.value }),
|
|
3689
3457
|
onMousedown: nextZIndex
|
|
3690
3458
|
}, [
|
|
3691
|
-
vue.createElementVNode("div",
|
|
3692
|
-
ref_key: "titleEl",
|
|
3693
|
-
ref: titleEl,
|
|
3694
|
-
class: "m-editor-float-box-title"
|
|
3695
|
-
}, [
|
|
3459
|
+
vue.createElementVNode("div", _hoisted_1$Z, [
|
|
3696
3460
|
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
3697
3461
|
vue.createElementVNode("span", null, vue.toDisplayString(_ctx.title), 1)
|
|
3698
3462
|
]),
|
|
@@ -3703,7 +3467,7 @@
|
|
|
3703
3467
|
onClick: closeHandler
|
|
3704
3468
|
}, {
|
|
3705
3469
|
default: vue.withCtx(() => [
|
|
3706
|
-
vue.createVNode(_sfc_main$
|
|
3470
|
+
vue.createVNode(_sfc_main$1s, { icon: vue.unref(iconsVue.Close) }, null, 8, ["icon"])
|
|
3707
3471
|
]),
|
|
3708
3472
|
_: 1
|
|
3709
3473
|
})
|
|
@@ -3724,7 +3488,7 @@
|
|
|
3724
3488
|
const useCodeBlockEdit = (codeBlockService) => {
|
|
3725
3489
|
const codeConfig = vue.ref();
|
|
3726
3490
|
const codeId = vue.ref();
|
|
3727
|
-
const
|
|
3491
|
+
const codeBlockEditorRef = vue.useTemplateRef("codeBlockEditor");
|
|
3728
3492
|
const createCodeBlock = async () => {
|
|
3729
3493
|
if (!codeBlockService) {
|
|
3730
3494
|
designPlugin.tMagicMessage.error("新增代码块失败");
|
|
@@ -3739,7 +3503,7 @@
|
|
|
3739
3503
|
};
|
|
3740
3504
|
codeId.value = await codeBlockService.getUniqueId();
|
|
3741
3505
|
await vue.nextTick();
|
|
3742
|
-
|
|
3506
|
+
codeBlockEditorRef.value?.show();
|
|
3743
3507
|
};
|
|
3744
3508
|
const editCode = async (id) => {
|
|
3745
3509
|
const codeBlock = await codeBlockService?.getCodeContentById(id);
|
|
@@ -3757,7 +3521,7 @@
|
|
|
3757
3521
|
};
|
|
3758
3522
|
codeId.value = id;
|
|
3759
3523
|
await vue.nextTick();
|
|
3760
|
-
|
|
3524
|
+
codeBlockEditorRef.value?.show();
|
|
3761
3525
|
};
|
|
3762
3526
|
const deleteCode = async (key) => {
|
|
3763
3527
|
codeBlockService?.deleteCodeDslByIds([key]);
|
|
@@ -3765,12 +3529,12 @@
|
|
|
3765
3529
|
const submitCodeBlockHandler = async (values) => {
|
|
3766
3530
|
if (!codeId.value) return;
|
|
3767
3531
|
await codeBlockService?.setCodeDslById(codeId.value, values);
|
|
3768
|
-
|
|
3532
|
+
codeBlockEditorRef.value?.hide();
|
|
3769
3533
|
};
|
|
3770
3534
|
return {
|
|
3771
3535
|
codeId,
|
|
3772
3536
|
codeConfig,
|
|
3773
|
-
codeBlockEditor,
|
|
3537
|
+
codeBlockEditor: codeBlockEditorRef,
|
|
3774
3538
|
createCodeBlock,
|
|
3775
3539
|
editCode,
|
|
3776
3540
|
deleteCode,
|
|
@@ -3778,7 +3542,7 @@
|
|
|
3778
3542
|
};
|
|
3779
3543
|
};
|
|
3780
3544
|
|
|
3781
|
-
const state = vue.
|
|
3545
|
+
const state = vue.shallowReactive({
|
|
3782
3546
|
uiSelectMode: false,
|
|
3783
3547
|
showSrc: false,
|
|
3784
3548
|
showStylePanel: true,
|
|
@@ -4226,9 +3990,9 @@
|
|
|
4226
3990
|
};
|
|
4227
3991
|
};
|
|
4228
3992
|
|
|
4229
|
-
const _hoisted_1$
|
|
4230
|
-
const _hoisted_2$
|
|
4231
|
-
const _sfc_main$
|
|
3993
|
+
const _hoisted_1$Y = { class: "m-editor-data-source-fields" };
|
|
3994
|
+
const _hoisted_2$m = { class: "m-editor-data-source-fields-footer" };
|
|
3995
|
+
const _sfc_main$1j = /* @__PURE__ */ vue.defineComponent({
|
|
4232
3996
|
...{
|
|
4233
3997
|
name: "MFieldsDataSourceFields"
|
|
4234
3998
|
},
|
|
@@ -4492,12 +4256,12 @@
|
|
|
4492
4256
|
const parentFloating = vue.inject("parentFloating", vue.ref(null));
|
|
4493
4257
|
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
|
|
4494
4258
|
return (_ctx, _cache) => {
|
|
4495
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
4259
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$Y, [
|
|
4496
4260
|
vue.createVNode(vue.unref(tablePlugin.MagicTable), {
|
|
4497
4261
|
data: _ctx.model[_ctx.name],
|
|
4498
4262
|
columns: fieldColumns
|
|
4499
4263
|
}, null, 8, ["data"]),
|
|
4500
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
4264
|
+
vue.createElementVNode("div", _hoisted_2$m, [
|
|
4501
4265
|
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
4502
4266
|
size: "small",
|
|
4503
4267
|
disabled: _ctx.disabled,
|
|
@@ -4522,7 +4286,7 @@
|
|
|
4522
4286
|
_: 1
|
|
4523
4287
|
}, 8, ["disabled"])
|
|
4524
4288
|
]),
|
|
4525
|
-
vue.createVNode(_sfc_main$
|
|
4289
|
+
vue.createVNode(_sfc_main$1k, {
|
|
4526
4290
|
visible: addDialogVisible.value,
|
|
4527
4291
|
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => addDialogVisible.value = $event),
|
|
4528
4292
|
width: width.value,
|
|
@@ -4545,7 +4309,7 @@
|
|
|
4545
4309
|
]),
|
|
4546
4310
|
_: 1
|
|
4547
4311
|
}, 8, ["visible", "width", "height", "title", "position"]),
|
|
4548
|
-
vue.createVNode(_sfc_main$
|
|
4312
|
+
vue.createVNode(_sfc_main$1k, {
|
|
4549
4313
|
visible: addFromJsonDialogVisible.value,
|
|
4550
4314
|
"onUpdate:visible": _cache[5] || (_cache[5] = ($event) => addFromJsonDialogVisible.value = $event),
|
|
4551
4315
|
width: width.value,
|
|
@@ -4570,8 +4334,8 @@
|
|
|
4570
4334
|
}
|
|
4571
4335
|
});
|
|
4572
4336
|
|
|
4573
|
-
const _hoisted_1$
|
|
4574
|
-
const _sfc_main$
|
|
4337
|
+
const _hoisted_1$X = { class: "m-editor-data-source-field-select" };
|
|
4338
|
+
const _sfc_main$1i = /* @__PURE__ */ vue.defineComponent({
|
|
4575
4339
|
__name: "FieldSelect",
|
|
4576
4340
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
4577
4341
|
value: {},
|
|
@@ -4652,7 +4416,7 @@
|
|
|
4652
4416
|
eventBus?.emit("edit-data-source", removeDataSourceFieldPrefix(id));
|
|
4653
4417
|
};
|
|
4654
4418
|
return (_ctx, _cache) => {
|
|
4655
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
4419
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$X, [
|
|
4656
4420
|
_ctx.checkStrictly ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
4657
4421
|
vue.createVNode(vue.unref(designPlugin.TMagicSelect), {
|
|
4658
4422
|
"model-value": selectDataSourceId.value,
|
|
@@ -4720,7 +4484,7 @@
|
|
|
4720
4484
|
onClick: _cache[0] || (_cache[0] = ($event) => editHandler(selectDataSourceId.value))
|
|
4721
4485
|
}, {
|
|
4722
4486
|
default: vue.withCtx(() => [
|
|
4723
|
-
vue.createVNode(_sfc_main$
|
|
4487
|
+
vue.createVNode(_sfc_main$1s, {
|
|
4724
4488
|
icon: !notEditable.value ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View)
|
|
4725
4489
|
}, null, 8, ["icon"])
|
|
4726
4490
|
]),
|
|
@@ -4734,8 +4498,8 @@
|
|
|
4734
4498
|
}
|
|
4735
4499
|
});
|
|
4736
4500
|
|
|
4737
|
-
const _hoisted_1$
|
|
4738
|
-
const _sfc_main$
|
|
4501
|
+
const _hoisted_1$W = { class: "m-fields-data-source-field-select" };
|
|
4502
|
+
const _sfc_main$1h = /* @__PURE__ */ vue.defineComponent({
|
|
4739
4503
|
...{
|
|
4740
4504
|
name: "MFieldsDataSourceFieldSelect"
|
|
4741
4505
|
},
|
|
@@ -4836,8 +4600,8 @@
|
|
|
4836
4600
|
}
|
|
4837
4601
|
};
|
|
4838
4602
|
return (_ctx, _cache) => {
|
|
4839
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
4840
|
-
showDataSourceFieldSelect.value || !_ctx.config.fieldConfig ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
4603
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$W, [
|
|
4604
|
+
showDataSourceFieldSelect.value || !_ctx.config.fieldConfig ? (vue.openBlock(), vue.createBlock(_sfc_main$1i, {
|
|
4841
4605
|
key: 0,
|
|
4842
4606
|
"model-value": _ctx.model[_ctx.name],
|
|
4843
4607
|
disabled: _ctx.disabled,
|
|
@@ -4872,7 +4636,7 @@
|
|
|
4872
4636
|
onClick: _cache[0] || (_cache[0] = ($event) => showDataSourceFieldSelect.value = !showDataSourceFieldSelect.value)
|
|
4873
4637
|
}, {
|
|
4874
4638
|
default: vue.withCtx(() => [
|
|
4875
|
-
vue.createVNode(_sfc_main$
|
|
4639
|
+
vue.createVNode(_sfc_main$1s, { icon: vue.unref(iconsVue.Coin) }, null, 8, ["icon"])
|
|
4876
4640
|
]),
|
|
4877
4641
|
_: 1
|
|
4878
4642
|
}, 8, ["type", "size"])
|
|
@@ -4884,10 +4648,10 @@
|
|
|
4884
4648
|
}
|
|
4885
4649
|
});
|
|
4886
4650
|
|
|
4887
|
-
const _hoisted_1$
|
|
4888
|
-
const _hoisted_2$
|
|
4889
|
-
const _hoisted_3$
|
|
4890
|
-
const _sfc_main$
|
|
4651
|
+
const _hoisted_1$V = { style: { "display": "flex", "flex-direction": "column", "line-height": "1.2em" } };
|
|
4652
|
+
const _hoisted_2$l = { style: { "font-size": "10px", "color": "rgba(0, 0, 0, 0.6)" } };
|
|
4653
|
+
const _hoisted_3$8 = { class: "el-input__inner t-input__inner" };
|
|
4654
|
+
const _sfc_main$1g = /* @__PURE__ */ vue.defineComponent({
|
|
4891
4655
|
...{
|
|
4892
4656
|
name: "MFieldsDataSourceInput"
|
|
4893
4657
|
},
|
|
@@ -4908,11 +4672,11 @@
|
|
|
4908
4672
|
const props = __props;
|
|
4909
4673
|
const emit = __emit;
|
|
4910
4674
|
const { dataSourceService } = vue.inject("services") || {};
|
|
4911
|
-
const
|
|
4675
|
+
const autocompleteRef = vue.useTemplateRef("autocomplete");
|
|
4912
4676
|
const isFocused = vue.ref(false);
|
|
4913
4677
|
const state = vue.ref("");
|
|
4914
4678
|
const displayState = vue.ref([]);
|
|
4915
|
-
const input = vue.computed(() =>
|
|
4679
|
+
const input = vue.computed(() => autocompleteRef.value?.inputRef?.input);
|
|
4916
4680
|
const dataSources = vue.computed(() => dataSourceService?.get("dataSources") || []);
|
|
4917
4681
|
const setDisplayState = () => {
|
|
4918
4682
|
displayState.value = getDisplayField(dataSources.value, state.value);
|
|
@@ -4931,7 +4695,7 @@
|
|
|
4931
4695
|
const focusOffset = selection?.focusOffset || 0;
|
|
4932
4696
|
isFocused.value = true;
|
|
4933
4697
|
await vue.nextTick();
|
|
4934
|
-
|
|
4698
|
+
autocompleteRef.value?.focus();
|
|
4935
4699
|
if (focusOffset && input.value) {
|
|
4936
4700
|
input.value.setSelectionRange(anchorOffset, focusOffset);
|
|
4937
4701
|
}
|
|
@@ -5067,8 +4831,7 @@
|
|
|
5067
4831
|
{
|
|
5068
4832
|
key: 0,
|
|
5069
4833
|
class: "tmagic-design-auto-complete",
|
|
5070
|
-
|
|
5071
|
-
ref: autocomplete,
|
|
4834
|
+
ref: "autocomplete",
|
|
5072
4835
|
modelValue: state.value,
|
|
5073
4836
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.value = $event)
|
|
5074
4837
|
},
|
|
@@ -5087,12 +4850,12 @@
|
|
|
5087
4850
|
}
|
|
5088
4851
|
), {
|
|
5089
4852
|
suffix: vue.withCtx(() => [
|
|
5090
|
-
vue.createVNode(_sfc_main$
|
|
4853
|
+
vue.createVNode(_sfc_main$1s, { icon: vue.unref(iconsVue.Coin) }, null, 8, ["icon"])
|
|
5091
4854
|
]),
|
|
5092
4855
|
default: vue.withCtx(({ item }) => [
|
|
5093
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
4856
|
+
vue.createElementVNode("div", _hoisted_1$V, [
|
|
5094
4857
|
vue.createElementVNode("div", null, vue.toDisplayString(item.text), 1),
|
|
5095
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
4858
|
+
vue.createElementVNode("span", _hoisted_2$l, vue.toDisplayString(item.value), 1)
|
|
5096
4859
|
])
|
|
5097
4860
|
]),
|
|
5098
4861
|
_: 1
|
|
@@ -5104,7 +4867,7 @@
|
|
|
5104
4867
|
vue.createElementVNode("div", {
|
|
5105
4868
|
class: vue.normalizeClass(`tmagic-data-source-input-text-wrapper el-input__wrapper ${isFocused.value ? " is-focus" : ""}`)
|
|
5106
4869
|
}, [
|
|
5107
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
4870
|
+
vue.createElementVNode("div", _hoisted_3$8, [
|
|
5108
4871
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(displayState.value, (item, index) => {
|
|
5109
4872
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
5110
4873
|
item.type === "text" ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
@@ -5122,7 +4885,7 @@
|
|
|
5122
4885
|
}, 1032, ["size"])) : vue.createCommentVNode("", true)
|
|
5123
4886
|
], 64);
|
|
5124
4887
|
}), 256)),
|
|
5125
|
-
vue.createVNode(_sfc_main$
|
|
4888
|
+
vue.createVNode(_sfc_main$1s, {
|
|
5126
4889
|
class: "tmagic-data-source-input-icon",
|
|
5127
4890
|
icon: vue.unref(iconsVue.Coin)
|
|
5128
4891
|
}, null, 8, ["icon"])
|
|
@@ -5133,11 +4896,11 @@
|
|
|
5133
4896
|
}
|
|
5134
4897
|
});
|
|
5135
4898
|
|
|
5136
|
-
const _hoisted_1$
|
|
5137
|
-
const _hoisted_2$
|
|
5138
|
-
const _hoisted_3$
|
|
5139
|
-
const _hoisted_4$
|
|
5140
|
-
const _sfc_main$
|
|
4899
|
+
const _hoisted_1$U = { style: { "display": "flex", "margin-bottom": "10px" } };
|
|
4900
|
+
const _hoisted_2$k = { style: { "flex": "1" } };
|
|
4901
|
+
const _hoisted_3$7 = { style: { "flex": "1" } };
|
|
4902
|
+
const _hoisted_4$5 = { class: "dialog-footer" };
|
|
4903
|
+
const _sfc_main$1f = /* @__PURE__ */ vue.defineComponent({
|
|
5141
4904
|
...{
|
|
5142
4905
|
name: "MEditorCodeBlockEditor"
|
|
5143
4906
|
},
|
|
@@ -5163,12 +4926,12 @@
|
|
|
5163
4926
|
const { height: codeBlockEditorHeight } = useEditorContentHeight();
|
|
5164
4927
|
const difVisible = vue.ref(false);
|
|
5165
4928
|
const { rect: windowRect } = useWindowRect();
|
|
5166
|
-
const
|
|
4929
|
+
const magicVsEditorRef = vue.useTemplateRef("magicVsEditor");
|
|
5167
4930
|
const diffChange = () => {
|
|
5168
|
-
if (!
|
|
4931
|
+
if (!magicVsEditorRef.value || !formBox.value?.form) {
|
|
5169
4932
|
return;
|
|
5170
4933
|
}
|
|
5171
|
-
formBox.value.form.values.content =
|
|
4934
|
+
formBox.value.form.values.content = magicVsEditorRef.value.getEditorValue();
|
|
5172
4935
|
difVisible.value = false;
|
|
5173
4936
|
};
|
|
5174
4937
|
const defaultParamColConfig = {
|
|
@@ -5310,7 +5073,7 @@
|
|
|
5310
5073
|
});
|
|
5311
5074
|
return (_ctx, _cache) => {
|
|
5312
5075
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
5313
|
-
vue.createVNode(_sfc_main$
|
|
5076
|
+
vue.createVNode(_sfc_main$1k, {
|
|
5314
5077
|
visible: boxVisible.value,
|
|
5315
5078
|
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => boxVisible.value = $event),
|
|
5316
5079
|
width: width.value,
|
|
@@ -5364,7 +5127,7 @@
|
|
|
5364
5127
|
fullscreen: ""
|
|
5365
5128
|
}, {
|
|
5366
5129
|
footer: vue.withCtx(() => [
|
|
5367
|
-
vue.createElementVNode("span", _hoisted_4$
|
|
5130
|
+
vue.createElementVNode("span", _hoisted_4$5, [
|
|
5368
5131
|
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
5369
5132
|
size: "small",
|
|
5370
5133
|
onClick: _cache[4] || (_cache[4] = ($event) => difVisible.value = false)
|
|
@@ -5387,8 +5150,8 @@
|
|
|
5387
5150
|
])
|
|
5388
5151
|
]),
|
|
5389
5152
|
default: vue.withCtx(() => [
|
|
5390
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
5391
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5153
|
+
vue.createElementVNode("div", _hoisted_1$U, [
|
|
5154
|
+
vue.createElementVNode("div", _hoisted_2$k, [
|
|
5392
5155
|
vue.createVNode(vue.unref(designPlugin.TMagicTag), {
|
|
5393
5156
|
size: "small",
|
|
5394
5157
|
type: "info"
|
|
@@ -5399,7 +5162,7 @@
|
|
|
5399
5162
|
_: 1
|
|
5400
5163
|
})
|
|
5401
5164
|
]),
|
|
5402
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
5165
|
+
vue.createElementVNode("div", _hoisted_3$7, [
|
|
5403
5166
|
vue.createVNode(vue.unref(designPlugin.TMagicTag), {
|
|
5404
5167
|
size: "small",
|
|
5405
5168
|
type: "success"
|
|
@@ -5411,10 +5174,9 @@
|
|
|
5411
5174
|
})
|
|
5412
5175
|
])
|
|
5413
5176
|
]),
|
|
5414
|
-
difVisible.value ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5177
|
+
difVisible.value ? (vue.openBlock(), vue.createBlock(_sfc_main$1r, {
|
|
5415
5178
|
key: 0,
|
|
5416
|
-
|
|
5417
|
-
ref: magicVsEditor,
|
|
5179
|
+
ref: "magicVsEditor",
|
|
5418
5180
|
type: "diff",
|
|
5419
5181
|
language: "json",
|
|
5420
5182
|
initValues: _ctx.content.content,
|
|
@@ -5430,9 +5192,9 @@
|
|
|
5430
5192
|
}
|
|
5431
5193
|
});
|
|
5432
5194
|
|
|
5433
|
-
const _hoisted_1$
|
|
5434
|
-
const _hoisted_2$
|
|
5435
|
-
const _sfc_main$
|
|
5195
|
+
const _hoisted_1$T = { class: "m-editor-data-source-methods" };
|
|
5196
|
+
const _hoisted_2$j = { class: "m-editor-data-source-methods-footer" };
|
|
5197
|
+
const _sfc_main$1e = /* @__PURE__ */ vue.defineComponent({
|
|
5436
5198
|
...{
|
|
5437
5199
|
name: "MFieldsDataSourceMethods"
|
|
5438
5200
|
},
|
|
@@ -5453,7 +5215,7 @@
|
|
|
5453
5215
|
const props = __props;
|
|
5454
5216
|
const emit = __emit;
|
|
5455
5217
|
const codeConfig = vue.ref();
|
|
5456
|
-
const
|
|
5218
|
+
const codeBlockEditorRef = vue.useTemplateRef("codeBlockEditor");
|
|
5457
5219
|
let editIndex = -1;
|
|
5458
5220
|
const methodColumns = [
|
|
5459
5221
|
{
|
|
@@ -5492,7 +5254,7 @@
|
|
|
5492
5254
|
};
|
|
5493
5255
|
editIndex = index;
|
|
5494
5256
|
vue.nextTick(() => {
|
|
5495
|
-
|
|
5257
|
+
codeBlockEditorRef.value?.show();
|
|
5496
5258
|
});
|
|
5497
5259
|
}
|
|
5498
5260
|
},
|
|
@@ -5518,7 +5280,7 @@
|
|
|
5518
5280
|
};
|
|
5519
5281
|
editIndex = -1;
|
|
5520
5282
|
vue.nextTick(() => {
|
|
5521
|
-
|
|
5283
|
+
codeBlockEditorRef.value?.show();
|
|
5522
5284
|
});
|
|
5523
5285
|
};
|
|
5524
5286
|
const submitCodeHandler = (value, data) => {
|
|
@@ -5550,15 +5312,15 @@
|
|
|
5550
5312
|
}
|
|
5551
5313
|
editIndex = -1;
|
|
5552
5314
|
codeConfig.value = void 0;
|
|
5553
|
-
|
|
5315
|
+
codeBlockEditorRef.value?.hide();
|
|
5554
5316
|
};
|
|
5555
5317
|
return (_ctx, _cache) => {
|
|
5556
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
5318
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$T, [
|
|
5557
5319
|
vue.createVNode(vue.unref(tablePlugin.MagicTable), {
|
|
5558
5320
|
data: _ctx.model[_ctx.name],
|
|
5559
5321
|
columns: methodColumns
|
|
5560
5322
|
}, null, 8, ["data"]),
|
|
5561
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5323
|
+
vue.createElementVNode("div", _hoisted_2$j, [
|
|
5562
5324
|
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
5563
5325
|
size: "small",
|
|
5564
5326
|
type: "primary",
|
|
@@ -5572,10 +5334,9 @@
|
|
|
5572
5334
|
_: 1
|
|
5573
5335
|
}, 8, ["disabled"])
|
|
5574
5336
|
]),
|
|
5575
|
-
codeConfig.value ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5337
|
+
codeConfig.value ? (vue.openBlock(), vue.createBlock(_sfc_main$1f, {
|
|
5576
5338
|
key: 0,
|
|
5577
|
-
|
|
5578
|
-
ref: codeBlockEditor,
|
|
5339
|
+
ref: "codeBlockEditor",
|
|
5579
5340
|
disabled: _ctx.disabled,
|
|
5580
5341
|
content: codeConfig.value,
|
|
5581
5342
|
"is-data-source": true,
|
|
@@ -5587,9 +5348,9 @@
|
|
|
5587
5348
|
}
|
|
5588
5349
|
});
|
|
5589
5350
|
|
|
5590
|
-
const _hoisted_1$
|
|
5591
|
-
const _hoisted_2$
|
|
5592
|
-
const _sfc_main$
|
|
5351
|
+
const _hoisted_1$S = { class: "m-fields-data-source-method-select" };
|
|
5352
|
+
const _hoisted_2$i = { class: "data-source-method-select-container" };
|
|
5353
|
+
const _sfc_main$1d = /* @__PURE__ */ vue.defineComponent({
|
|
5593
5354
|
...{
|
|
5594
5355
|
name: "MFieldsDataSourceMethodSelect"
|
|
5595
5356
|
},
|
|
@@ -5675,8 +5436,8 @@
|
|
|
5675
5436
|
eventBus?.emit("edit-data-source", id);
|
|
5676
5437
|
};
|
|
5677
5438
|
return (_ctx, _cache) => {
|
|
5678
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
5679
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5439
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$S, [
|
|
5440
|
+
vue.createElementVNode("div", _hoisted_2$i, [
|
|
5680
5441
|
vue.createVNode(vue.unref(formPlugin.MContainer), {
|
|
5681
5442
|
class: "select",
|
|
5682
5443
|
config: cascaderConfig.value,
|
|
@@ -5695,7 +5456,7 @@
|
|
|
5695
5456
|
onClick: editCodeHandler
|
|
5696
5457
|
}, {
|
|
5697
5458
|
default: vue.withCtx(() => [
|
|
5698
|
-
vue.createVNode(_sfc_main$
|
|
5459
|
+
vue.createVNode(_sfc_main$1s, {
|
|
5699
5460
|
icon: !notEditable.value ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View)
|
|
5700
5461
|
}, null, 8, ["icon"])
|
|
5701
5462
|
]),
|
|
@@ -5705,7 +5466,7 @@
|
|
|
5705
5466
|
_: 1
|
|
5706
5467
|
}, 8, ["content"])) : vue.createCommentVNode("", true)
|
|
5707
5468
|
]),
|
|
5708
|
-
paramsConfig.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5469
|
+
paramsConfig.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$1n, {
|
|
5709
5470
|
key: 0,
|
|
5710
5471
|
name: "params",
|
|
5711
5472
|
model: _ctx.model,
|
|
@@ -5719,9 +5480,9 @@
|
|
|
5719
5480
|
}
|
|
5720
5481
|
});
|
|
5721
5482
|
|
|
5722
|
-
const _hoisted_1$
|
|
5723
|
-
const _hoisted_2$
|
|
5724
|
-
const _sfc_main$
|
|
5483
|
+
const _hoisted_1$R = { class: "m-editor-data-source-fields" };
|
|
5484
|
+
const _hoisted_2$h = { class: "m-editor-data-source-fields-footer" };
|
|
5485
|
+
const _sfc_main$1c = /* @__PURE__ */ vue.defineComponent({
|
|
5725
5486
|
...{
|
|
5726
5487
|
name: "MFieldsDataSourceMocks"
|
|
5727
5488
|
},
|
|
@@ -5810,7 +5571,7 @@
|
|
|
5810
5571
|
const columns = [
|
|
5811
5572
|
{
|
|
5812
5573
|
type: "expand",
|
|
5813
|
-
component: _sfc_main$
|
|
5574
|
+
component: _sfc_main$1r,
|
|
5814
5575
|
props: (row) => ({
|
|
5815
5576
|
initValues: row.data,
|
|
5816
5577
|
language: "json",
|
|
@@ -5925,12 +5686,12 @@
|
|
|
5925
5686
|
const parentFloating = vue.inject("parentFloating", vue.ref(null));
|
|
5926
5687
|
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
|
|
5927
5688
|
return (_ctx, _cache) => {
|
|
5928
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
5689
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$R, [
|
|
5929
5690
|
vue.createVNode(vue.unref(tablePlugin.MagicTable), {
|
|
5930
5691
|
data: _ctx.model[_ctx.name],
|
|
5931
5692
|
columns
|
|
5932
5693
|
}, null, 8, ["data"]),
|
|
5933
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5694
|
+
vue.createElementVNode("div", _hoisted_2$h, [
|
|
5934
5695
|
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
5935
5696
|
size: "small",
|
|
5936
5697
|
type: "primary",
|
|
@@ -5944,7 +5705,7 @@
|
|
|
5944
5705
|
_: 1
|
|
5945
5706
|
}, 8, ["disabled"])
|
|
5946
5707
|
]),
|
|
5947
|
-
vue.createVNode(_sfc_main$
|
|
5708
|
+
vue.createVNode(_sfc_main$1k, {
|
|
5948
5709
|
visible: addDialogVisible.value,
|
|
5949
5710
|
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => addDialogVisible.value = $event),
|
|
5950
5711
|
width: width.value,
|
|
@@ -5971,8 +5732,8 @@
|
|
|
5971
5732
|
}
|
|
5972
5733
|
});
|
|
5973
5734
|
|
|
5974
|
-
const _hoisted_1$
|
|
5975
|
-
const _sfc_main$
|
|
5735
|
+
const _hoisted_1$Q = { class: "m-fields-data-source-select" };
|
|
5736
|
+
const _sfc_main$1b = /* @__PURE__ */ vue.defineComponent({
|
|
5976
5737
|
...{
|
|
5977
5738
|
name: "MFieldsDataSourceSelect"
|
|
5978
5739
|
},
|
|
@@ -6029,7 +5790,7 @@
|
|
|
6029
5790
|
eventBus?.emit("edit-data-source", id);
|
|
6030
5791
|
};
|
|
6031
5792
|
return (_ctx, _cache) => {
|
|
6032
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
5793
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$Q, [
|
|
6033
5794
|
vue.createVNode(vue.unref(formPlugin.MSelect), {
|
|
6034
5795
|
model: _ctx.model,
|
|
6035
5796
|
name: _ctx.name,
|
|
@@ -6051,7 +5812,7 @@
|
|
|
6051
5812
|
onClick: editHandler
|
|
6052
5813
|
}, {
|
|
6053
5814
|
default: vue.withCtx(() => [
|
|
6054
|
-
vue.createVNode(_sfc_main$
|
|
5815
|
+
vue.createVNode(_sfc_main$1s, {
|
|
6055
5816
|
icon: !notEditable.value ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View)
|
|
6056
5817
|
}, null, 8, ["icon"])
|
|
6057
5818
|
]),
|
|
@@ -6065,7 +5826,7 @@
|
|
|
6065
5826
|
}
|
|
6066
5827
|
});
|
|
6067
5828
|
|
|
6068
|
-
const _sfc_main$
|
|
5829
|
+
const _sfc_main$1a = /* @__PURE__ */ vue.defineComponent({
|
|
6069
5830
|
...{
|
|
6070
5831
|
name: "m-fields-display-conds"
|
|
6071
5832
|
},
|
|
@@ -6097,7 +5858,8 @@
|
|
|
6097
5858
|
{
|
|
6098
5859
|
type: "table",
|
|
6099
5860
|
name: "cond",
|
|
6100
|
-
operateColWidth:
|
|
5861
|
+
operateColWidth: 100,
|
|
5862
|
+
enableToggleMode: false,
|
|
6101
5863
|
items: [
|
|
6102
5864
|
parentFields.value.length ? {
|
|
6103
5865
|
type: "cascader",
|
|
@@ -6196,12 +5958,12 @@
|
|
|
6196
5958
|
}
|
|
6197
5959
|
});
|
|
6198
5960
|
|
|
6199
|
-
const _hoisted_1$
|
|
6200
|
-
const _hoisted_2$
|
|
5961
|
+
const _hoisted_1$P = { class: "m-fields-event-select" };
|
|
5962
|
+
const _hoisted_2$g = {
|
|
6201
5963
|
key: 1,
|
|
6202
5964
|
class: "fullWidth"
|
|
6203
5965
|
};
|
|
6204
|
-
const _sfc_main$
|
|
5966
|
+
const _sfc_main$19 = /* @__PURE__ */ vue.defineComponent({
|
|
6205
5967
|
...{
|
|
6206
5968
|
name: "MFieldsEventSelect"
|
|
6207
5969
|
},
|
|
@@ -6477,7 +6239,7 @@
|
|
|
6477
6239
|
const onChangeHandler = (v, eventData) => emit("change", props.model[props.name], eventData);
|
|
6478
6240
|
return (_ctx, _cache) => {
|
|
6479
6241
|
const _component_m_form_table = vue.resolveComponent("m-form-table");
|
|
6480
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
6242
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$P, [
|
|
6481
6243
|
isOldVersion.value ? (vue.openBlock(), vue.createBlock(_component_m_form_table, {
|
|
6482
6244
|
key: 0,
|
|
6483
6245
|
name: "events",
|
|
@@ -6486,7 +6248,7 @@
|
|
|
6486
6248
|
model: _ctx.model,
|
|
6487
6249
|
config: tableConfig.value,
|
|
6488
6250
|
onChange: onChangeHandler
|
|
6489
|
-
}, null, 8, ["size", "disabled", "model", "config"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
6251
|
+
}, null, 8, ["size", "disabled", "model", "config"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$g, [
|
|
6490
6252
|
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
6491
6253
|
class: "create-button",
|
|
6492
6254
|
type: "primary",
|
|
@@ -6538,29 +6300,29 @@
|
|
|
6538
6300
|
}
|
|
6539
6301
|
});
|
|
6540
6302
|
|
|
6541
|
-
const _hoisted_1$
|
|
6303
|
+
const _hoisted_1$O = {
|
|
6542
6304
|
viewBox: "0 0 32 32",
|
|
6543
6305
|
version: "1.1",
|
|
6544
6306
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6545
6307
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
6546
6308
|
};
|
|
6547
|
-
const _sfc_main$
|
|
6309
|
+
const _sfc_main$18 = /* @__PURE__ */ vue.defineComponent({
|
|
6548
6310
|
...{
|
|
6549
6311
|
name: "MEditorCodeIcon"
|
|
6550
6312
|
},
|
|
6551
6313
|
__name: "CodeIcon",
|
|
6552
6314
|
setup(__props) {
|
|
6553
6315
|
return (_ctx, _cache) => {
|
|
6554
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
6316
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$O, _cache[0] || (_cache[0] = [
|
|
6555
6317
|
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)
|
|
6556
6318
|
]));
|
|
6557
6319
|
};
|
|
6558
6320
|
}
|
|
6559
6321
|
});
|
|
6560
6322
|
|
|
6561
|
-
const _hoisted_1$
|
|
6562
|
-
const _hoisted_2$
|
|
6563
|
-
const _sfc_main$
|
|
6323
|
+
const _hoisted_1$N = { class: "m-fields-key-value" };
|
|
6324
|
+
const _hoisted_2$f = { key: 0 };
|
|
6325
|
+
const _sfc_main$17 = /* @__PURE__ */ vue.defineComponent({
|
|
6564
6326
|
...{
|
|
6565
6327
|
name: "MFieldsKeyValue"
|
|
6566
6328
|
},
|
|
@@ -6622,8 +6384,8 @@
|
|
|
6622
6384
|
emit("change", v);
|
|
6623
6385
|
};
|
|
6624
6386
|
return (_ctx, _cache) => {
|
|
6625
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
6626
|
-
!showCode.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
6387
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$N, [
|
|
6388
|
+
!showCode.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$f, [
|
|
6627
6389
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(records.value, (item, index) => {
|
|
6628
6390
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
6629
6391
|
class: "m-fields-key-value-item",
|
|
@@ -6672,7 +6434,7 @@
|
|
|
6672
6434
|
_: 1
|
|
6673
6435
|
}, 8, ["size", "disabled", "icon"])
|
|
6674
6436
|
])) : vue.createCommentVNode("", true),
|
|
6675
|
-
_ctx.config.advanced && showCode.value ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
6437
|
+
_ctx.config.advanced && showCode.value ? (vue.openBlock(), vue.createBlock(_sfc_main$1r, {
|
|
6676
6438
|
key: 1,
|
|
6677
6439
|
height: "200px",
|
|
6678
6440
|
"init-values": _ctx.model[_ctx.name],
|
|
@@ -6688,7 +6450,7 @@
|
|
|
6688
6450
|
size: "default",
|
|
6689
6451
|
disabled: _ctx.disabled,
|
|
6690
6452
|
link: "",
|
|
6691
|
-
icon: _sfc_main$
|
|
6453
|
+
icon: _sfc_main$18,
|
|
6692
6454
|
onClick: _cache[0] || (_cache[0] = ($event) => showCode.value = !showCode.value)
|
|
6693
6455
|
}, null, 8, ["disabled"])) : vue.createCommentVNode("", true)
|
|
6694
6456
|
]);
|
|
@@ -6696,9 +6458,9 @@
|
|
|
6696
6458
|
}
|
|
6697
6459
|
});
|
|
6698
6460
|
|
|
6699
|
-
const _hoisted_1$
|
|
6700
|
-
const _hoisted_2$
|
|
6701
|
-
const _sfc_main$
|
|
6461
|
+
const _hoisted_1$M = { class: "m-fields-page-fragment-select" };
|
|
6462
|
+
const _hoisted_2$e = { class: "page-fragment-select-container" };
|
|
6463
|
+
const _sfc_main$16 = /* @__PURE__ */ vue.defineComponent({
|
|
6702
6464
|
...{
|
|
6703
6465
|
name: "MFieldsPageFragmentSelect"
|
|
6704
6466
|
},
|
|
@@ -6744,8 +6506,8 @@
|
|
|
6744
6506
|
};
|
|
6745
6507
|
return (_ctx, _cache) => {
|
|
6746
6508
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
6747
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
6748
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
6509
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$M, [
|
|
6510
|
+
vue.createElementVNode("div", _hoisted_2$e, [
|
|
6749
6511
|
vue.createVNode(_component_m_form_container, {
|
|
6750
6512
|
class: "select",
|
|
6751
6513
|
config: selectConfig,
|
|
@@ -6753,7 +6515,7 @@
|
|
|
6753
6515
|
size: _ctx.size,
|
|
6754
6516
|
onChange: changeHandler
|
|
6755
6517
|
}, null, 8, ["model", "size"]),
|
|
6756
|
-
_ctx.model[_ctx.name] ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
6518
|
+
_ctx.model[_ctx.name] ? (vue.openBlock(), vue.createBlock(_sfc_main$1s, {
|
|
6757
6519
|
key: 0,
|
|
6758
6520
|
class: "icon",
|
|
6759
6521
|
icon: vue.unref(iconsVue.Edit),
|
|
@@ -6765,16 +6527,11 @@
|
|
|
6765
6527
|
}
|
|
6766
6528
|
});
|
|
6767
6529
|
|
|
6768
|
-
const _hoisted_1$
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
6774
|
-
...{
|
|
6775
|
-
name: "MFieldsUISelect"
|
|
6776
|
-
},
|
|
6777
|
-
__name: "UISelect",
|
|
6530
|
+
const _hoisted_1$L = { class: "background-position-container" };
|
|
6531
|
+
const _hoisted_2$d = { class: "presets-value-list" };
|
|
6532
|
+
const _hoisted_3$6 = { class: "custom-value" };
|
|
6533
|
+
const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
|
|
6534
|
+
__name: "BackgroundPosition",
|
|
6778
6535
|
props: {
|
|
6779
6536
|
config: {},
|
|
6780
6537
|
model: {},
|
|
@@ -6788,43 +6545,1173 @@
|
|
|
6788
6545
|
},
|
|
6789
6546
|
emits: ["change"],
|
|
6790
6547
|
setup(__props, { emit: __emit }) {
|
|
6791
|
-
const props = __props;
|
|
6792
6548
|
const emit = __emit;
|
|
6793
|
-
const
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
if (detail.nodeType) {
|
|
6806
|
-
id = utils.getIdFromEl()(detail) || id;
|
|
6807
|
-
}
|
|
6808
|
-
if (id) {
|
|
6809
|
-
props.model[props.name] = id;
|
|
6810
|
-
emit("change", id);
|
|
6811
|
-
mForm?.$emit("field-change", props.prop, id);
|
|
6549
|
+
const horizontalList = [
|
|
6550
|
+
{
|
|
6551
|
+
value: "left",
|
|
6552
|
+
text: "左"
|
|
6553
|
+
},
|
|
6554
|
+
{
|
|
6555
|
+
value: "center",
|
|
6556
|
+
text: "中"
|
|
6557
|
+
},
|
|
6558
|
+
{
|
|
6559
|
+
value: "right",
|
|
6560
|
+
text: "右"
|
|
6812
6561
|
}
|
|
6813
|
-
|
|
6814
|
-
|
|
6562
|
+
];
|
|
6563
|
+
const verticalList = [
|
|
6564
|
+
{
|
|
6565
|
+
value: "top",
|
|
6566
|
+
text: "上"
|
|
6567
|
+
},
|
|
6568
|
+
{
|
|
6569
|
+
value: "center",
|
|
6570
|
+
text: "中"
|
|
6571
|
+
},
|
|
6572
|
+
{
|
|
6573
|
+
value: "bottom",
|
|
6574
|
+
text: "下"
|
|
6815
6575
|
}
|
|
6576
|
+
];
|
|
6577
|
+
const list = verticalList.map(
|
|
6578
|
+
(vertical) => horizontalList.map((horizontal) => ({
|
|
6579
|
+
value: `${horizontal.value} ${vertical.value}`,
|
|
6580
|
+
tips: `${horizontal.text}${vertical.text}`,
|
|
6581
|
+
class: `${horizontal.value}-${vertical.value}`
|
|
6582
|
+
}))
|
|
6583
|
+
).flat();
|
|
6584
|
+
const changeHandler = (v) => {
|
|
6585
|
+
emit("change", v);
|
|
6816
6586
|
};
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
|
|
6587
|
+
return (_ctx, _cache) => {
|
|
6588
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$L, [
|
|
6589
|
+
vue.createElementVNode("div", _hoisted_2$d, [
|
|
6590
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(list), (item, index) => {
|
|
6591
|
+
return vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicButton), {
|
|
6592
|
+
key: index,
|
|
6593
|
+
link: "",
|
|
6594
|
+
class: vue.normalizeClass(_ctx.model[_ctx.name] === item.value && "btn-active"),
|
|
6595
|
+
onClick: ($event) => changeHandler(item.value)
|
|
6596
|
+
}, {
|
|
6597
|
+
default: vue.withCtx(() => [
|
|
6598
|
+
vue.createElementVNode("div", {
|
|
6599
|
+
class: vue.normalizeClass(["position-icon", item.class, _ctx.model[_ctx.name] === item.value && "active"])
|
|
6600
|
+
}, null, 2)
|
|
6601
|
+
]),
|
|
6602
|
+
_: 2
|
|
6603
|
+
}, 1032, ["class", "onClick"]);
|
|
6604
|
+
}), 128))
|
|
6605
|
+
]),
|
|
6606
|
+
vue.createElementVNode("div", _hoisted_3$6, [
|
|
6607
|
+
vue.createVNode(vue.unref(designPlugin.TMagicInput), {
|
|
6608
|
+
modelValue: _ctx.model[_ctx.name],
|
|
6609
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
6610
|
+
size: "small",
|
|
6611
|
+
placeholder: "自定义背景位置",
|
|
6612
|
+
clearable: "",
|
|
6613
|
+
onChange: changeHandler
|
|
6614
|
+
}, null, 8, ["modelValue"])
|
|
6615
|
+
])
|
|
6616
|
+
]);
|
|
6617
|
+
};
|
|
6618
|
+
}
|
|
6619
|
+
});
|
|
6620
|
+
|
|
6621
|
+
const _export_sfc = (sfc, props) => {
|
|
6622
|
+
const target = sfc.__vccOpts || sfc;
|
|
6623
|
+
for (const [key, val] of props) {
|
|
6624
|
+
target[key] = val;
|
|
6625
|
+
}
|
|
6626
|
+
return target;
|
|
6627
|
+
};
|
|
6628
|
+
|
|
6629
|
+
const _sfc_main$14 = {};
|
|
6630
|
+
|
|
6631
|
+
const _hoisted_1$K = {
|
|
6632
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6633
|
+
viewBox: "0 0 1024 1024"
|
|
6634
|
+
};
|
|
6635
|
+
|
|
6636
|
+
function _sfc_render$k(_ctx, _cache) {
|
|
6637
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$K, _cache[0] || (_cache[0] = [
|
|
6638
|
+
vue.createStaticVNode("<path d=\"M884.736 102.4l-147.456 0c-20.48 0-36.864 16.384-36.864 36.864l0 147.456C696.32 311.296 712.704 327.68 733.184 327.68l147.456 0c20.48 0 36.864-16.384 36.864-36.864L917.504 139.264C921.6 118.784 905.216 102.4 884.736 102.4zM884.736 290.816l-147.456 0L737.28 139.264l147.456 0L884.736 290.816z\"></path><path d=\"M884.736 696.32l-147.456 0c-20.48 0-36.864 16.384-36.864 36.864l0 147.456c0 20.48 16.384 36.864 36.864 36.864l147.456 0c20.48 0 36.864-16.384 36.864-36.864l0-147.456C921.6 712.704 905.216 696.32 884.736 696.32zM884.736 884.736l-147.456 0 0-147.456 147.456 0L884.736 884.736z\"></path><path d=\"M884.736 401.408l-147.456 0c-20.48 0-36.864 16.384-36.864 36.864l0 147.456c0 20.48 16.384 36.864 36.864 36.864l147.456 0c20.48 0 36.864-16.384 36.864-36.864l0-147.456C921.6 417.792 905.216 401.408 884.736 401.408zM884.736 585.728l-147.456 0 0-147.456 147.456 0L884.736 585.728z\"></path><path d=\"M585.728 401.408l-147.456 0c-20.48 0-36.864 16.384-36.864 36.864l0 147.456c0 20.48 16.384 36.864 36.864 36.864l147.456 0c20.48 0 36.864-16.384 36.864-36.864l0-147.456C622.592 417.792 606.208 401.408 585.728 401.408zM585.728 585.728l-147.456 0 0-147.456 147.456 0L585.728 585.728z\"></path><path d=\"M585.728 102.4l-147.456 0c-20.48 0-36.864 16.384-36.864 36.864l0 147.456c0 20.48 16.384 36.864 36.864 36.864l147.456 0c20.48 0 36.864-16.384 36.864-36.864L622.592 139.264C622.592 118.784 606.208 102.4 585.728 102.4zM585.728 290.816l-147.456 0L438.272 139.264l147.456 0L585.728 290.816z\"></path><path d=\"M585.728 696.32l-147.456 0c-20.48 0-36.864 16.384-36.864 36.864l0 147.456c0 20.48 16.384 36.864 36.864 36.864l147.456 0c20.48 0 36.864-16.384 36.864-36.864l0-147.456C622.592 712.704 606.208 696.32 585.728 696.32zM585.728 884.736l-147.456 0 0-147.456 147.456 0L585.728 884.736z\"></path><path d=\"M290.816 696.32 139.264 696.32c-20.48 0-36.864 16.384-36.864 36.864l0 147.456c0 20.48 16.384 36.864 36.864 36.864l147.456 0c20.48 0 36.864-16.384 36.864-36.864l0-147.456C327.68 712.704 311.296 696.32 290.816 696.32zM290.816 884.736 139.264 884.736l0-147.456 147.456 0L286.72 884.736z\"></path><path d=\"M290.816 401.408 139.264 401.408c-20.48 0-36.864 16.384-36.864 36.864l0 147.456c0 20.48 16.384 36.864 36.864 36.864l147.456 0c20.48 0 36.864-16.384 36.864-36.864l0-147.456C327.68 417.792 311.296 401.408 290.816 401.408zM290.816 585.728 139.264 585.728l0-147.456 147.456 0L286.72 585.728z\"></path><path d=\"M290.816 102.4 139.264 102.4c-20.48 0-36.864 16.384-36.864 36.864l0 147.456C102.4 311.296 118.784 327.68 139.264 327.68l147.456 0C311.296 327.68 327.68 311.296 327.68 290.816L327.68 139.264C327.68 118.784 311.296 102.4 290.816 102.4zM290.816 290.816 139.264 290.816 139.264 139.264l147.456 0L286.72 290.816z\"></path>", 9)
|
|
6639
|
+
])))
|
|
6640
|
+
}
|
|
6641
|
+
const BackgroundRepeat = /*#__PURE__*/_export_sfc(_sfc_main$14, [['render',_sfc_render$k]]);
|
|
6642
|
+
|
|
6643
|
+
const _sfc_main$13 = {};
|
|
6644
|
+
|
|
6645
|
+
const _hoisted_1$J = {
|
|
6646
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6647
|
+
viewBox: "0 0 1024 1024"
|
|
6648
|
+
};
|
|
6649
|
+
|
|
6650
|
+
function _sfc_render$j(_ctx, _cache) {
|
|
6651
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$J, _cache[0] || (_cache[0] = [
|
|
6652
|
+
vue.createElementVNode("path", {
|
|
6653
|
+
d: "M796.444444 170.666667h-227.555555v682.666666h227.555555V170.666667z m-56.888888 625.777777h-113.777778V227.555556h113.777778v568.888888zM455.111111 170.666667H227.555556v682.666666h227.555555V170.666667zM398.222222 796.444444H284.444444V227.555556h113.777778v568.888888zM910.222222 56.888889h56.888889v910.222222h-56.888889zM56.888889 56.888889h56.888889v910.222222H56.888889z",
|
|
6654
|
+
fill: "#333333"
|
|
6655
|
+
}, null, -1)
|
|
6656
|
+
])))
|
|
6657
|
+
}
|
|
6658
|
+
const BackgroundRepeatX = /*#__PURE__*/_export_sfc(_sfc_main$13, [['render',_sfc_render$j]]);
|
|
6659
|
+
|
|
6660
|
+
const _sfc_main$12 = {};
|
|
6661
|
+
|
|
6662
|
+
const _hoisted_1$I = {
|
|
6663
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6664
|
+
viewBox: "0 0 1024 1024"
|
|
6665
|
+
};
|
|
6666
|
+
|
|
6667
|
+
function _sfc_render$i(_ctx, _cache) {
|
|
6668
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$I, _cache[0] || (_cache[0] = [
|
|
6669
|
+
vue.createElementVNode("path", {
|
|
6670
|
+
d: "M170.666667 227.555556v227.555555h682.666666V227.555556H170.666667z m625.777777 56.888888v113.777778H227.555556V284.444444h568.888888zM170.666667 568.888889v227.555555h682.666666v-227.555555H170.666667z m625.777777 56.888889v113.777778H227.555556v-113.777778h568.888888zM56.888889 56.888889h910.222222v56.888889H56.888889zM56.888889 910.222222h910.222222v56.888889H56.888889z",
|
|
6671
|
+
fill: "#333333"
|
|
6672
|
+
}, null, -1)
|
|
6673
|
+
])))
|
|
6674
|
+
}
|
|
6675
|
+
const BackgroundRepeatY = /*#__PURE__*/_export_sfc(_sfc_main$12, [['render',_sfc_render$i]]);
|
|
6676
|
+
|
|
6677
|
+
const _sfc_main$11 = {};
|
|
6678
|
+
|
|
6679
|
+
const _hoisted_1$H = {
|
|
6680
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6681
|
+
viewBox: "0 0 1024 1024"
|
|
6682
|
+
};
|
|
6683
|
+
|
|
6684
|
+
function _sfc_render$h(_ctx, _cache) {
|
|
6685
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$H, _cache[0] || (_cache[0] = [
|
|
6686
|
+
vue.createElementVNode("path", {
|
|
6687
|
+
d: "M912.526651 867.741144 555.540144 510.712681l356.986507-357.000833c11.171434-11.18576 11.171434-29.257348 0-40.443108-11.20111-11.18576-29.272697-11.18576-40.444131 0L515.096013 470.267527 158.096203 113.267716c-11.187807-11.159154-29.258371-11.159154-40.444131 0-11.186783 11.186783-11.186783 29.286 0 40.47176L474.623229 510.712681 117.623419 867.741144c-11.159154 11.172457-11.159154 29.216415 0 40.443108 11.18576 11.17348 29.284977 11.17348 40.47176 0l357.000833-357.027439 356.985484 357.027439c11.171434 11.17348 29.243021 11.17348 40.444131 0C923.698085 896.957559 923.725714 878.913601 912.526651 867.741144z",
|
|
6688
|
+
fill: "#5D5D5D"
|
|
6689
|
+
}, null, -1)
|
|
6690
|
+
])))
|
|
6691
|
+
}
|
|
6692
|
+
const BackgroundNoRepeat = /*#__PURE__*/_export_sfc(_sfc_main$11, [['render',_sfc_render$h]]);
|
|
6693
|
+
|
|
6694
|
+
const _sfc_main$10 = /* @__PURE__ */ vue.defineComponent({
|
|
6695
|
+
__name: "Background",
|
|
6696
|
+
props: {
|
|
6697
|
+
values: {}
|
|
6698
|
+
},
|
|
6699
|
+
emits: ["change"],
|
|
6700
|
+
setup(__props, { emit: __emit }) {
|
|
6701
|
+
const emit = __emit;
|
|
6702
|
+
const config = {
|
|
6703
|
+
items: [
|
|
6704
|
+
{
|
|
6705
|
+
name: "backgroundColor",
|
|
6706
|
+
text: "背景色",
|
|
6707
|
+
labelWidth: "68px",
|
|
6708
|
+
type: "data-source-field-select",
|
|
6709
|
+
fieldConfig: {
|
|
6710
|
+
type: "colorPicker"
|
|
6711
|
+
}
|
|
6712
|
+
},
|
|
6713
|
+
{
|
|
6714
|
+
name: "backgroundImage",
|
|
6715
|
+
text: "背景图",
|
|
6716
|
+
labelWidth: "68px",
|
|
6717
|
+
type: "data-source-field-select",
|
|
6718
|
+
fieldConfig: {
|
|
6719
|
+
type: "img-upload"
|
|
6720
|
+
}
|
|
6721
|
+
},
|
|
6722
|
+
{
|
|
6723
|
+
name: "backgroundSize",
|
|
6724
|
+
text: "背景尺寸",
|
|
6725
|
+
type: "radioGroup",
|
|
6726
|
+
childType: "button",
|
|
6727
|
+
labelWidth: "68px",
|
|
6728
|
+
options: [
|
|
6729
|
+
{ value: "auto", text: "默认", tooltip: "默认 auto" },
|
|
6730
|
+
{ value: "contain", text: "等比填充", tooltip: "等比填充 contain" },
|
|
6731
|
+
{ value: "cover", text: "等比覆盖", tooltip: "等比覆盖 cover" }
|
|
6732
|
+
]
|
|
6733
|
+
},
|
|
6734
|
+
{
|
|
6735
|
+
name: "backgroundRepeat",
|
|
6736
|
+
text: "重复显示",
|
|
6737
|
+
type: "radioGroup",
|
|
6738
|
+
childType: "button",
|
|
6739
|
+
labelWidth: "68px",
|
|
6740
|
+
options: [
|
|
6741
|
+
{ value: "repeat", icon: vue.markRaw(BackgroundRepeat), tooltip: "垂直和水平方向重复 repeat" },
|
|
6742
|
+
{ value: "repeat-x", icon: vue.markRaw(BackgroundRepeatX), tooltip: "水平方向重复 repeat-x" },
|
|
6743
|
+
{ value: "repeat-y", icon: vue.markRaw(BackgroundRepeatY), tooltip: "垂直方向重复 repeat-y" },
|
|
6744
|
+
{ value: "no-repeat", icon: vue.markRaw(BackgroundNoRepeat), tooltip: "不重复 no-repeat" }
|
|
6745
|
+
]
|
|
6746
|
+
},
|
|
6747
|
+
{
|
|
6748
|
+
name: "backgroundPosition",
|
|
6749
|
+
text: "背景定位",
|
|
6750
|
+
type: "component",
|
|
6751
|
+
component: _sfc_main$15,
|
|
6752
|
+
labelWidth: "68px"
|
|
6753
|
+
}
|
|
6754
|
+
]
|
|
6755
|
+
};
|
|
6756
|
+
const change = (value, eventData) => {
|
|
6757
|
+
emit("change", value, eventData);
|
|
6758
|
+
};
|
|
6759
|
+
return (_ctx, _cache) => {
|
|
6760
|
+
return vue.openBlock(), vue.createBlock(vue.unref(formPlugin.MContainer), {
|
|
6761
|
+
config,
|
|
6762
|
+
model: _ctx.values,
|
|
6763
|
+
onChange: change
|
|
6764
|
+
}, null, 8, ["model"]);
|
|
6765
|
+
};
|
|
6766
|
+
}
|
|
6767
|
+
});
|
|
6768
|
+
|
|
6769
|
+
const _sfc_main$$ = {};
|
|
6770
|
+
|
|
6771
|
+
const _hoisted_1$G = {
|
|
6772
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6773
|
+
viewBox: "0 0 1024 1024"
|
|
6774
|
+
};
|
|
6775
|
+
|
|
6776
|
+
function _sfc_render$g(_ctx, _cache) {
|
|
6777
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$G, _cache[0] || (_cache[0] = [
|
|
6778
|
+
vue.createElementVNode("path", { d: "M128 810.666667h768v85.333333H128z m0-170.666667h512v85.333333H128z m0-170.666667h768v85.333334H128z m0-341.333333h768v85.333333H128z m0 170.666667h512v85.333333H128z" }, null, -1)
|
|
6779
|
+
])))
|
|
6780
|
+
}
|
|
6781
|
+
const AlignLeft = /*#__PURE__*/_export_sfc(_sfc_main$$, [['render',_sfc_render$g]]);
|
|
6782
|
+
|
|
6783
|
+
const _sfc_main$_ = {};
|
|
6784
|
+
|
|
6785
|
+
const _hoisted_1$F = {
|
|
6786
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6787
|
+
viewBox: "0 0 1024 1024"
|
|
6788
|
+
};
|
|
6789
|
+
|
|
6790
|
+
function _sfc_render$f(_ctx, _cache) {
|
|
6791
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$F, _cache[0] || (_cache[0] = [
|
|
6792
|
+
vue.createElementVNode("path", { d: "M128 810.666667h768v85.333333H128z m128-170.666667h512v85.333333H256z m-128-170.666667h768v85.333334H128z m0-341.333333h768v85.333333H128z m128 170.666667h512v85.333333H256z" }, null, -1)
|
|
6793
|
+
])))
|
|
6794
|
+
}
|
|
6795
|
+
const AlignCenter = /*#__PURE__*/_export_sfc(_sfc_main$_, [['render',_sfc_render$f]]);
|
|
6796
|
+
|
|
6797
|
+
const _sfc_main$Z = {};
|
|
6798
|
+
|
|
6799
|
+
const _hoisted_1$E = {
|
|
6800
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6801
|
+
viewBox: "0 0 1024 1024"
|
|
6802
|
+
};
|
|
6803
|
+
|
|
6804
|
+
function _sfc_render$e(_ctx, _cache) {
|
|
6805
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$E, _cache[0] || (_cache[0] = [
|
|
6806
|
+
vue.createElementVNode("path", { d: "M128 128h768v85.333333H128z m0 682.666667h768v85.333333H128z m213.333333-170.666667h554.666667v85.333333H341.333333z m-213.333333-170.666667h768v85.333334H128z m213.333333-170.666666h554.666667v85.333333H341.333333z" }, null, -1)
|
|
6807
|
+
])))
|
|
6808
|
+
}
|
|
6809
|
+
const AlignRight = /*#__PURE__*/_export_sfc(_sfc_main$Z, [['render',_sfc_render$e]]);
|
|
6810
|
+
|
|
6811
|
+
const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
|
|
6812
|
+
__name: "Font",
|
|
6813
|
+
props: {
|
|
6814
|
+
values: {}
|
|
6815
|
+
},
|
|
6816
|
+
emits: ["change"],
|
|
6817
|
+
setup(__props, { emit: __emit }) {
|
|
6818
|
+
const emit = __emit;
|
|
6819
|
+
const config = {
|
|
6820
|
+
items: [
|
|
6821
|
+
{
|
|
6822
|
+
type: "row",
|
|
6823
|
+
items: [
|
|
6824
|
+
{
|
|
6825
|
+
labelWidth: "68px",
|
|
6826
|
+
name: "fontSize",
|
|
6827
|
+
text: "字号",
|
|
6828
|
+
type: "data-source-field-select",
|
|
6829
|
+
fieldConfig: {
|
|
6830
|
+
type: "text"
|
|
6831
|
+
}
|
|
6832
|
+
},
|
|
6833
|
+
{
|
|
6834
|
+
labelWidth: "68px",
|
|
6835
|
+
name: "lineHeight",
|
|
6836
|
+
text: "行高",
|
|
6837
|
+
type: "data-source-field-select",
|
|
6838
|
+
fieldConfig: {
|
|
6839
|
+
type: "text"
|
|
6840
|
+
}
|
|
6841
|
+
}
|
|
6842
|
+
]
|
|
6843
|
+
},
|
|
6844
|
+
{
|
|
6845
|
+
name: "fontWeight",
|
|
6846
|
+
text: "字重",
|
|
6847
|
+
labelWidth: "68px",
|
|
6848
|
+
type: "data-source-field-select",
|
|
6849
|
+
fieldConfig: {
|
|
6850
|
+
type: "select",
|
|
6851
|
+
options: ["normal", "bold"].concat(
|
|
6852
|
+
Array(7).fill(1).map((x, i) => `${i + 1}00`)
|
|
6853
|
+
).map((item) => ({
|
|
6854
|
+
value: item,
|
|
6855
|
+
text: item
|
|
6856
|
+
}))
|
|
6857
|
+
}
|
|
6858
|
+
},
|
|
6859
|
+
{
|
|
6860
|
+
labelWidth: "68px",
|
|
6861
|
+
name: "color",
|
|
6862
|
+
text: "颜色",
|
|
6863
|
+
type: "data-source-field-select",
|
|
6864
|
+
fieldConfig: {
|
|
6865
|
+
type: "colorPicker"
|
|
6866
|
+
}
|
|
6867
|
+
},
|
|
6868
|
+
{
|
|
6869
|
+
name: "textAlign",
|
|
6870
|
+
text: "对齐",
|
|
6871
|
+
type: "radioGroup",
|
|
6872
|
+
childType: "button",
|
|
6873
|
+
labelWidth: "68px",
|
|
6874
|
+
options: [
|
|
6875
|
+
{ value: "left", icon: vue.markRaw(AlignLeft), tooltip: "左对齐 row" },
|
|
6876
|
+
{ value: "center", icon: vue.markRaw(AlignCenter), tooltip: "居中对齐 center" },
|
|
6877
|
+
{ value: "right", icon: vue.markRaw(AlignRight), tooltip: "右对齐 right" }
|
|
6878
|
+
]
|
|
6879
|
+
}
|
|
6880
|
+
]
|
|
6881
|
+
};
|
|
6882
|
+
const change = (value, eventData) => {
|
|
6883
|
+
emit("change", value, eventData);
|
|
6884
|
+
};
|
|
6885
|
+
return (_ctx, _cache) => {
|
|
6886
|
+
return vue.openBlock(), vue.createBlock(vue.unref(formPlugin.MContainer), {
|
|
6887
|
+
config,
|
|
6888
|
+
model: _ctx.values,
|
|
6889
|
+
onChange: change
|
|
6890
|
+
}, null, 8, ["model"]);
|
|
6891
|
+
};
|
|
6892
|
+
}
|
|
6893
|
+
});
|
|
6894
|
+
|
|
6895
|
+
const _hoisted_1$D = { class: "layout-box-container" };
|
|
6896
|
+
const _hoisted_2$c = {
|
|
6897
|
+
key: 0,
|
|
6898
|
+
class: "help-txt"
|
|
6899
|
+
};
|
|
6900
|
+
const _hoisted_3$5 = { class: "next-input" };
|
|
6901
|
+
const _hoisted_4$4 = ["onUpdate:modelValue", "title", "onChange"];
|
|
6902
|
+
const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
|
|
6903
|
+
__name: "Box",
|
|
6904
|
+
props: {
|
|
6905
|
+
model: {}
|
|
6906
|
+
},
|
|
6907
|
+
emits: ["change"],
|
|
6908
|
+
setup(__props, { emit: __emit }) {
|
|
6909
|
+
const list = [
|
|
6910
|
+
{
|
|
6911
|
+
name: "marginTop",
|
|
6912
|
+
class: "outer-top-border"
|
|
6913
|
+
},
|
|
6914
|
+
{
|
|
6915
|
+
name: "marginRight",
|
|
6916
|
+
class: "outer-right-border"
|
|
6917
|
+
},
|
|
6918
|
+
{
|
|
6919
|
+
name: "marginBottom",
|
|
6920
|
+
text: "MARGIN",
|
|
6921
|
+
class: "outer-bottom-border"
|
|
6922
|
+
},
|
|
6923
|
+
{
|
|
6924
|
+
name: "marginLeft",
|
|
6925
|
+
class: "outer-left-border"
|
|
6926
|
+
},
|
|
6927
|
+
{
|
|
6928
|
+
name: "paddingTop",
|
|
6929
|
+
class: "inner-top-border"
|
|
6930
|
+
},
|
|
6931
|
+
{
|
|
6932
|
+
name: "paddingRight",
|
|
6933
|
+
class: "inner-right-border"
|
|
6934
|
+
},
|
|
6935
|
+
{
|
|
6936
|
+
name: "paddingBottom",
|
|
6937
|
+
text: "PADDING",
|
|
6938
|
+
class: "inner-bottom-border"
|
|
6939
|
+
},
|
|
6940
|
+
{
|
|
6941
|
+
name: "paddingLeft",
|
|
6942
|
+
class: "inner-left-border"
|
|
6943
|
+
}
|
|
6944
|
+
];
|
|
6945
|
+
const emit = __emit;
|
|
6946
|
+
const change = (event, name) => {
|
|
6947
|
+
emit("change", event.target.value, {
|
|
6948
|
+
modifyKey: name
|
|
6949
|
+
});
|
|
6950
|
+
};
|
|
6951
|
+
return (_ctx, _cache) => {
|
|
6952
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$D, [
|
|
6953
|
+
(vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(list, (item, index) => {
|
|
6954
|
+
return vue.createElementVNode("div", {
|
|
6955
|
+
key: index,
|
|
6956
|
+
class: vue.normalizeClass(item.class)
|
|
6957
|
+
}, [
|
|
6958
|
+
item.text ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$c, vue.toDisplayString(item.text), 1)) : vue.createCommentVNode("", true),
|
|
6959
|
+
vue.createElementVNode("span", _hoisted_3$5, [
|
|
6960
|
+
vue.withDirectives(vue.createElementVNode("input", {
|
|
6961
|
+
"onUpdate:modelValue": ($event) => _ctx.model[item.name] = $event,
|
|
6962
|
+
title: _ctx.model[item.name],
|
|
6963
|
+
onChange: ($event) => change($event, item.name),
|
|
6964
|
+
placeholder: "0"
|
|
6965
|
+
}, null, 40, _hoisted_4$4), [
|
|
6966
|
+
[vue.vModelText, _ctx.model[item.name]]
|
|
6967
|
+
])
|
|
6968
|
+
])
|
|
6969
|
+
], 2);
|
|
6970
|
+
}), 64))
|
|
6971
|
+
]);
|
|
6972
|
+
};
|
|
6973
|
+
}
|
|
6974
|
+
});
|
|
6975
|
+
|
|
6976
|
+
const _sfc_main$W = {};
|
|
6977
|
+
|
|
6978
|
+
const _hoisted_1$C = {
|
|
6979
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6980
|
+
viewBox: "0 0 1024 1024"
|
|
6981
|
+
};
|
|
6982
|
+
|
|
6983
|
+
function _sfc_render$d(_ctx, _cache) {
|
|
6984
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$C, _cache[0] || (_cache[0] = [
|
|
6985
|
+
vue.createElementVNode("path", { d: "M960 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H64a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h896z m0 64H64v640h896V192z m-96 64a32 32 0 0 1 32 32v448a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32h704z" }, null, -1)
|
|
6986
|
+
])))
|
|
6987
|
+
}
|
|
6988
|
+
const DisplayBlock = /*#__PURE__*/_export_sfc(_sfc_main$W, [['render',_sfc_render$d]]);
|
|
6989
|
+
|
|
6990
|
+
const _sfc_main$V = {};
|
|
6991
|
+
|
|
6992
|
+
const _hoisted_1$B = {
|
|
6993
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6994
|
+
viewBox: "0 0 1024 1024"
|
|
6995
|
+
};
|
|
6996
|
+
|
|
6997
|
+
function _sfc_render$c(_ctx, _cache) {
|
|
6998
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$B, _cache[0] || (_cache[0] = [
|
|
6999
|
+
vue.createElementVNode("path", { d: "M960 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H64a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h896z m0 64H64v640h896V192zM352 256v512H160V256h192z m256 0v512h-192V256h192z m256 0v512h-192V256h192z" }, null, -1)
|
|
7000
|
+
])))
|
|
7001
|
+
}
|
|
7002
|
+
const DisplayFlex = /*#__PURE__*/_export_sfc(_sfc_main$V, [['render',_sfc_render$c]]);
|
|
7003
|
+
|
|
7004
|
+
const _sfc_main$U = {};
|
|
7005
|
+
|
|
7006
|
+
const _hoisted_1$A = {
|
|
7007
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7008
|
+
viewBox: "0 0 1024 1024"
|
|
7009
|
+
};
|
|
7010
|
+
|
|
7011
|
+
function _sfc_render$b(_ctx, _cache) {
|
|
7012
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$A, _cache[0] || (_cache[0] = [
|
|
7013
|
+
vue.createElementVNode("path", { d: "M787.616 651.36a142.72 142.72 0 0 0 52.864 31.904 205.504 205.504 0 0 0 67.264 10.848 245.76 245.76 0 0 0 38.784-2.4c9.504-1.6 19.36-4 30.208-7.04 8.16-2.24 15.968-5.12 23.36-8.32l23.392-10.816V587.52h-8.736c-3.968 3.424-8.96 7.648-15.104 12.544a190.272 190.272 0 0 1-19.936 13.504 120.32 120.32 0 0 1-27.616 12.544 102.528 102.528 0 0 1-62.72-0.576 80 80 0 0 1-29.824-17.088 89.28 89.28 0 0 1-21.664-32.512c-5.696-13.664-8.64-30.784-8.64-51.296 0-19.744 2.72-36.384 7.968-50.08 5.248-13.664 12.384-24.896 20.992-33.056 9.12-8.832 18.816-14.816 29.632-18.816a101.824 101.824 0 0 1 63.68-0.736c9.408 3.136 18.08 7.04 26.112 11.68 13.024 7.808 25.28 16.768 36.672 26.784H1024v-78.72c-6.08-2.88-13.12-6.08-21.12-9.6a205.984 205.984 0 0 0-57.152-15.36 270.016 270.016 0 0 0-37.056-2.304c-24.864 0-47.744 4-68.704 11.84-20.992 7.776-38.432 18.784-52.64 33.6a144.256 144.256 0 0 0-33.632 54.176 207.68 207.68 0 0 0-12.48 70.176c0 27.84 3.968 52.352 12.16 73.568a146.08 146.08 0 0 0 34.176 53.184l0.064 0.416z m-186.112 34.656a122.912 122.912 0 0 0 42.784-21.504c11.2-8.32 20.224-19.296 26.24-31.936 6.56-13.664 9.888-28.704 9.664-43.904 0-22.784-6.272-41.024-18.912-54.72-12.544-13.92-29.664-23.04-51.104-27.36v-2.304c14.4-6.24 26.688-16.448 35.52-29.408 8.384-12.544 12.544-27.008 12.544-43.52 0-14.24-2.944-26.784-9.12-37.6a65.696 65.696 0 0 0-27.936-26.24 117.44 117.44 0 0 0-36.48-12.096A437.312 437.312 0 0 0 526.656 352h-127.552v340.384h143.392c23.84 0 43.52-2.112 59.008-6.4z m-118.112-271.584h7.968c16.544 0 29.472 0.128 38.656 0.352 9.248 0.576 16.864 1.728 23.04 4a26.24 26.24 0 0 1 14.4 13.12c2.656 5.28 4.064 11.072 4.128 16.96 0.16 6.656-1.056 13.248-3.52 19.392a28.064 28.064 0 0 1-15.04 13.696c-7.04 2.912-14.56 4.48-22.208 4.576-9.472 0.32-20.864 0.544-34.24 0.544h-13.184v-72.64z m6.144 215.52h-6.144v-84.8h18.464c12.64 0 24.736 0 36.384 0.256 9.216-0.16 18.432 0.896 27.36 3.2 9.696 2.848 16.544 7.232 20.512 13.12 4 5.92 6.08 14.24 6.08 25.088 0 8.192-1.728 15.488-4.992 21.824-3.232 6.336-9.696 11.392-18.24 15.392-8.544 4-18.24 5.696-28.48 6.272-10.304 0.224-27.392 0.224-51.328 0.224l0.384-0.576z m-378.56-6.016h124.672l23.36 68.416H348.8L224.32 353.728H124.416L0 692.384h87.52l23.488-68.416-0.064-0.032z m62.336-183.552l41.472 121.44h-82.88l41.408-121.44z" }, null, -1)
|
|
7014
|
+
])))
|
|
7015
|
+
}
|
|
7016
|
+
const DisplayInline = /*#__PURE__*/_export_sfc(_sfc_main$U, [['render',_sfc_render$b]]);
|
|
7017
|
+
|
|
7018
|
+
const _sfc_main$T = {};
|
|
7019
|
+
|
|
7020
|
+
const _hoisted_1$z = {
|
|
7021
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7022
|
+
viewBox: "0 0 1024 1024"
|
|
7023
|
+
};
|
|
7024
|
+
|
|
7025
|
+
function _sfc_render$a(_ctx, _cache) {
|
|
7026
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$z, _cache[0] || (_cache[0] = [
|
|
7027
|
+
vue.createElementVNode("path", { d: "M960 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H64a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h896z m0 64H64v640h896V192z m-131.936 158.496c65.984 1.824 109.024 32.512 129.184 92.064l-65.952 15.136-1.856-5.664c-9.984-27.52-30.432-42.112-61.376-43.84-46.72 2.784-71.456 35.296-74.208 97.6 1.856 63.2 26.56 96.64 74.24 100.32 37.536-0.928 59.52-23.36 65.92-67.328L960 559.36l-1.792 7.232c-16.96 63.872-60.352 95.84-130.144 95.84-93.44-4.608-142.464-56.8-147.04-156.672 4.576-98.048 53.6-149.792 147.04-155.296z m-568.928 4.128l114.08 302.336H297.6l-22.016-65.984H160.192L138.24 656.96H64l112.672-302.336h82.464z m278.976 0l7.68 0.32c62.816 3.36 96 27.104 99.52 71.136 0 35.744-19.712 59.552-59.104 71.456 42.144 9.184 65.952 32.544 71.456 70.08 0 59.552-37.568 89.344-112.672 89.344h-148.416v-302.336h141.536z m-4.128 173.152H465.28v81.088h67.328c33.92 0 51.296-13.76 52.224-41.248-2.752-25.632-19.68-38.912-50.848-39.84zM217.92 408.224h-1.376l-0.96 7.36c-1.184 7.232-3.168 13.92-5.92 20.128l-34.336 103.04h87.936l-38.464-104.416-2.624-9.024c-1.6-5.888-3.04-11.584-4.256-17.088z m309.184-2.752H465.28v71.456h61.824c29.344-0.928 44.448-13.76 45.376-38.464-0.96-22.016-16.032-32.992-45.376-32.992z" }, null, -1)
|
|
7028
|
+
])))
|
|
7029
|
+
}
|
|
7030
|
+
const DisplayInlineBlock = /*#__PURE__*/_export_sfc(_sfc_main$T, [['render',_sfc_render$a]]);
|
|
7031
|
+
|
|
7032
|
+
const _sfc_main$S = {};
|
|
7033
|
+
|
|
7034
|
+
const _hoisted_1$y = {
|
|
7035
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7036
|
+
viewBox: "0 0 1024 1024"
|
|
7037
|
+
};
|
|
7038
|
+
|
|
7039
|
+
function _sfc_render$9(_ctx, _cache) {
|
|
7040
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$y, _cache[0] || (_cache[0] = [
|
|
7041
|
+
vue.createElementVNode("path", { d: "M931.37 477.14c-43.94-69.49-93.39-125.03-147.99-166.35L663.31 441.46c8.79 21.36 13.63 44.91 13.63 69.62 0 96.27-73.84 174.32-164.95 174.32-21.63 0-42.28-4.39-61.32-12.47l-94.09 102.52a455.097 455.097 0 0 0 155.41 26.2c172.62 0 312.43-85.54 419.59-256.63 12.83-20.43 12.72-47.45-0.21-67.88zM795.52 127.99L682.24 252.82C627.73 231 570.1 220.04 512.11 220.5c-171.15 0-310.99 85.66-419.48 256.75-12.93 20.43-13.04 47.33-0.2 67.78 46.95 75.15 100.3 133.68 160.01 175.82L131.9 853.65l38.9 42.36 663.6-725.76-38.88-42.26zM519.68 438.37c-3.72-0.59-7.46-0.81-11.27-0.81-45.63 0-82.43 39.03-82.43 87.16 0 4.97 0.42 9.81 1.14 14.54l-57.15 60.14-5.92 8.33c-13.15-24.94-20.5-53.68-20.5-84.28 0-96.3 73.84-174.45 164.95-174.45 27.2 0 52.76 6.93 75.4 19.29l-64.22 70.08z m52.05 135.53c21.74-23.26 27.17-55.48 16.31-81.39l-96.42 103.16c26.59 9.08 58.38 1.48 80.11-21.77z" }, null, -1)
|
|
7042
|
+
])))
|
|
7043
|
+
}
|
|
7044
|
+
const DisplayNone = /*#__PURE__*/_export_sfc(_sfc_main$S, [['render',_sfc_render$9]]);
|
|
7045
|
+
|
|
7046
|
+
const _sfc_main$R = {};
|
|
7047
|
+
|
|
7048
|
+
const _hoisted_1$x = {
|
|
7049
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7050
|
+
viewBox: "0 0 1024 1024"
|
|
7051
|
+
};
|
|
7052
|
+
|
|
7053
|
+
function _sfc_render$8(_ctx, _cache) {
|
|
7054
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$x, _cache[0] || (_cache[0] = [
|
|
7055
|
+
vue.createElementVNode("path", { d: "M896 320H128V0h768v320z m0 320H128v-256h768v256z m-128 192l-256 192-256-192 192-0.032V704h128v128h192z" }, null, -1)
|
|
7056
|
+
])))
|
|
7057
|
+
}
|
|
7058
|
+
const FlexDirectionColumn = /*#__PURE__*/_export_sfc(_sfc_main$R, [['render',_sfc_render$8]]);
|
|
7059
|
+
|
|
7060
|
+
const _sfc_main$Q = {};
|
|
7061
|
+
|
|
7062
|
+
const _hoisted_1$w = {
|
|
7063
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7064
|
+
viewBox: "0 0 1024 1024"
|
|
7065
|
+
};
|
|
7066
|
+
|
|
7067
|
+
function _sfc_render$7(_ctx, _cache) {
|
|
7068
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$w, _cache[0] || (_cache[0] = [
|
|
7069
|
+
vue.createElementVNode("path", { d: "M896 704H128v320h768V704z m0-320H128v256h768v-256z m-128-192l-256-192-256 192 192 0.032V320h128V192h192z" }, null, -1)
|
|
7070
|
+
])))
|
|
7071
|
+
}
|
|
7072
|
+
const FlexDirectionColumnReverse = /*#__PURE__*/_export_sfc(_sfc_main$Q, [['render',_sfc_render$7]]);
|
|
7073
|
+
|
|
7074
|
+
const _sfc_main$P = {};
|
|
7075
|
+
|
|
7076
|
+
const _hoisted_1$v = {
|
|
7077
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7078
|
+
viewBox: "0 0 1024 1024"
|
|
7079
|
+
};
|
|
7080
|
+
|
|
7081
|
+
function _sfc_render$6(_ctx, _cache) {
|
|
7082
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$v, _cache[0] || (_cache[0] = [
|
|
7083
|
+
vue.createElementVNode("path", { d: "M320 128v768H0V128h320z m320 0v768h-256V128h256z m192 128l192 256-192 256-0.032-192H704v-128h128V256z" }, null, -1)
|
|
7084
|
+
])))
|
|
7085
|
+
}
|
|
7086
|
+
const FlexDirectionRow = /*#__PURE__*/_export_sfc(_sfc_main$P, [['render',_sfc_render$6]]);
|
|
7087
|
+
|
|
7088
|
+
const _sfc_main$O = {};
|
|
7089
|
+
|
|
7090
|
+
const _hoisted_1$u = {
|
|
7091
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7092
|
+
viewBox: "0 0 1024 1024"
|
|
7093
|
+
};
|
|
7094
|
+
|
|
7095
|
+
function _sfc_render$5(_ctx, _cache) {
|
|
7096
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$u, _cache[0] || (_cache[0] = [
|
|
7097
|
+
vue.createElementVNode("path", { d: "M704 128v768h320V128H704zM384 128v768h256V128h-256zM192 256l-192 256 192 256 0.032-192H320v-128H192V256z" }, null, -1)
|
|
7098
|
+
])))
|
|
7099
|
+
}
|
|
7100
|
+
const FlexDirectionRowReverse = /*#__PURE__*/_export_sfc(_sfc_main$O, [['render',_sfc_render$5]]);
|
|
7101
|
+
|
|
7102
|
+
const _sfc_main$N = {};
|
|
7103
|
+
|
|
7104
|
+
const _hoisted_1$t = {
|
|
7105
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7106
|
+
viewBox: "0 0 1024 1024"
|
|
7107
|
+
};
|
|
7108
|
+
|
|
7109
|
+
function _sfc_render$4(_ctx, _cache) {
|
|
7110
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$t, _cache[0] || (_cache[0] = [
|
|
7111
|
+
vue.createElementVNode("path", { d: "M480 1024V0h64v1024h-64z m128-64V64h320v896H608zM96 960V64h320v896H96z" }, null, -1)
|
|
7112
|
+
])))
|
|
7113
|
+
}
|
|
7114
|
+
const JustifyContentCenter = /*#__PURE__*/_export_sfc(_sfc_main$N, [['render',_sfc_render$4]]);
|
|
7115
|
+
|
|
7116
|
+
const _sfc_main$M = {};
|
|
7117
|
+
|
|
7118
|
+
const _hoisted_1$s = {
|
|
7119
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7120
|
+
viewBox: "0 0 1024 1024"
|
|
7121
|
+
};
|
|
7122
|
+
|
|
7123
|
+
function _sfc_render$3(_ctx, _cache) {
|
|
7124
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$s, _cache[0] || (_cache[0] = [
|
|
7125
|
+
vue.createElementVNode("path", { d: "M416 160H96v704h320V160z m384 0H480v704h320V160z m128-160h-64v1024h64V0z" }, null, -1)
|
|
7126
|
+
])))
|
|
7127
|
+
}
|
|
7128
|
+
const JustifyContentFlexEnd = /*#__PURE__*/_export_sfc(_sfc_main$M, [['render',_sfc_render$3]]);
|
|
7129
|
+
|
|
7130
|
+
const _sfc_main$L = {};
|
|
7131
|
+
|
|
7132
|
+
const _hoisted_1$r = {
|
|
7133
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7134
|
+
viewBox: "0 0 1024 1024"
|
|
7135
|
+
};
|
|
7136
|
+
|
|
7137
|
+
function _sfc_render$2(_ctx, _cache) {
|
|
7138
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$r, _cache[0] || (_cache[0] = [
|
|
7139
|
+
vue.createElementVNode("path", { d: "M608 160h320v704H608V160zM224 160h320v704H224V160zM96 0h64v1024H96V0z" }, null, -1)
|
|
7140
|
+
])))
|
|
7141
|
+
}
|
|
7142
|
+
const JustifyContentFlexStart = /*#__PURE__*/_export_sfc(_sfc_main$L, [['render',_sfc_render$2]]);
|
|
7143
|
+
|
|
7144
|
+
const _sfc_main$K = {};
|
|
7145
|
+
|
|
7146
|
+
const _hoisted_1$q = {
|
|
7147
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7148
|
+
viewBox: "0 0 1024 1024"
|
|
7149
|
+
};
|
|
7150
|
+
|
|
7151
|
+
function _sfc_render$1(_ctx, _cache) {
|
|
7152
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$q, _cache[0] || (_cache[0] = [
|
|
7153
|
+
vue.createElementVNode("path", { d: "M320 864H192v160H128v-160H0V160h128V0h64v160h128v704z m704 0h-128v160h-64v-160h-128V160h128V0h64v160h128v704z" }, null, -1)
|
|
7154
|
+
])))
|
|
7155
|
+
}
|
|
7156
|
+
const JustifyContentSpaceAround = /*#__PURE__*/_export_sfc(_sfc_main$K, [['render',_sfc_render$1]]);
|
|
7157
|
+
|
|
7158
|
+
const _sfc_main$J = {};
|
|
7159
|
+
|
|
7160
|
+
const _hoisted_1$p = {
|
|
7161
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7162
|
+
viewBox: "0 0 1024 1024"
|
|
7163
|
+
};
|
|
7164
|
+
|
|
7165
|
+
function _sfc_render(_ctx, _cache) {
|
|
7166
|
+
return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$p, _cache[0] || (_cache[0] = [
|
|
7167
|
+
vue.createElementVNode("path", { d: "M64 1024H0V0h64v1024z m384-160H128V160h320v704z m448 0H576V160h320v704z m128 160h-64V0h64v1024z" }, null, -1)
|
|
7168
|
+
])))
|
|
7169
|
+
}
|
|
7170
|
+
const JustifyContentSpaceBetween = /*#__PURE__*/_export_sfc(_sfc_main$J, [['render',_sfc_render]]);
|
|
7171
|
+
|
|
7172
|
+
const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
|
|
7173
|
+
__name: "Layout",
|
|
7174
|
+
props: {
|
|
7175
|
+
values: {}
|
|
7176
|
+
},
|
|
7177
|
+
emits: ["change"],
|
|
7178
|
+
setup(__props, { emit: __emit }) {
|
|
7179
|
+
const emit = __emit;
|
|
7180
|
+
const config = {
|
|
7181
|
+
items: [
|
|
7182
|
+
{
|
|
7183
|
+
name: "display",
|
|
7184
|
+
text: "模式",
|
|
7185
|
+
type: "radioGroup",
|
|
7186
|
+
childType: "button",
|
|
7187
|
+
labelWidth: "68px",
|
|
7188
|
+
options: [
|
|
7189
|
+
{ value: "inline", icon: vue.markRaw(DisplayInline), tooltip: "内联布局 inline" },
|
|
7190
|
+
{ value: "flex", icon: vue.markRaw(DisplayFlex), tooltip: "弹性布局 flex" },
|
|
7191
|
+
{ value: "block", icon: vue.markRaw(DisplayBlock), tooltip: "块级布局 block" },
|
|
7192
|
+
{ value: "inline-block", icon: vue.markRaw(DisplayInlineBlock), tooltip: "内联块布局 inline-block" },
|
|
7193
|
+
{ value: "none", icon: vue.markRaw(DisplayNone), tooltip: "隐藏 none" }
|
|
7194
|
+
]
|
|
7195
|
+
},
|
|
7196
|
+
{
|
|
7197
|
+
name: "flexDirection",
|
|
7198
|
+
text: "主轴方向",
|
|
7199
|
+
type: "radioGroup",
|
|
7200
|
+
childType: "button",
|
|
7201
|
+
labelWidth: "68px",
|
|
7202
|
+
options: [
|
|
7203
|
+
{ value: "row", icon: vue.markRaw(FlexDirectionRow), tooltip: "水平方向 起点在左侧 row" },
|
|
7204
|
+
{ value: "row-reverse", icon: vue.markRaw(FlexDirectionRowReverse), tooltip: "水平方向 起点在右侧 row-reverse" },
|
|
7205
|
+
{ value: "column", icon: vue.markRaw(FlexDirectionColumn), tooltip: "垂直方向 起点在上沿 column" },
|
|
7206
|
+
{
|
|
7207
|
+
value: "column-reverse",
|
|
7208
|
+
icon: vue.markRaw(FlexDirectionColumnReverse),
|
|
7209
|
+
tooltip: "垂直方向 起点在下沿 column-reverse"
|
|
7210
|
+
}
|
|
7211
|
+
],
|
|
7212
|
+
display: (mForm, { model }) => model.display === "flex"
|
|
7213
|
+
},
|
|
7214
|
+
{
|
|
7215
|
+
name: "justifyContent",
|
|
7216
|
+
text: "主轴对齐",
|
|
7217
|
+
type: "radioGroup",
|
|
7218
|
+
childType: "button",
|
|
7219
|
+
labelWidth: "68px",
|
|
7220
|
+
options: [
|
|
7221
|
+
{ value: "flex-start", icon: vue.markRaw(JustifyContentFlexStart), tooltip: "左对齐 flex-start" },
|
|
7222
|
+
{ value: "flex-end", icon: vue.markRaw(JustifyContentFlexEnd), tooltip: "右对齐 flex-end" },
|
|
7223
|
+
{ value: "center", icon: vue.markRaw(JustifyContentCenter), tooltip: "居中 center" },
|
|
7224
|
+
{ value: "space-between", icon: vue.markRaw(JustifyContentSpaceBetween), tooltip: "两端对齐 space-between" },
|
|
7225
|
+
{ value: "space-around", icon: vue.markRaw(JustifyContentSpaceAround), tooltip: "横向平分 space-around" }
|
|
7226
|
+
],
|
|
7227
|
+
display: (mForm, { model }) => model.display === "flex"
|
|
7228
|
+
},
|
|
7229
|
+
{
|
|
7230
|
+
name: "alignItems",
|
|
7231
|
+
text: "辅轴对齐",
|
|
7232
|
+
type: "radioGroup",
|
|
7233
|
+
childType: "button",
|
|
7234
|
+
labelWidth: "68px",
|
|
7235
|
+
options: [
|
|
7236
|
+
{ value: "flex-start", icon: vue.markRaw(JustifyContentFlexStart), tooltip: "左对齐 flex-start" },
|
|
7237
|
+
{ value: "flex-end", icon: vue.markRaw(JustifyContentFlexEnd), tooltip: "右对齐 flex-end" },
|
|
7238
|
+
{ value: "center", icon: vue.markRaw(JustifyContentCenter), tooltip: "居中 center" },
|
|
7239
|
+
{ value: "space-between", icon: vue.markRaw(JustifyContentSpaceBetween), tooltip: "两端对齐 space-between" },
|
|
7240
|
+
{ value: "space-around", icon: vue.markRaw(JustifyContentSpaceAround), tooltip: "横向平分 space-around" }
|
|
7241
|
+
],
|
|
7242
|
+
display: (mForm, { model }) => model.display === "flex"
|
|
7243
|
+
},
|
|
7244
|
+
{
|
|
7245
|
+
name: "flexWrap",
|
|
7246
|
+
text: "换行",
|
|
7247
|
+
type: "radioGroup",
|
|
7248
|
+
childType: "button",
|
|
7249
|
+
labelWidth: "68px",
|
|
7250
|
+
options: [
|
|
7251
|
+
{ value: "nowrap", text: "不换行", tooltip: "不换行 nowrap" },
|
|
7252
|
+
{ value: "wrap", text: "正换行", tooltip: "第一行在上方 wrap" },
|
|
7253
|
+
{ value: "wrap-reverse", text: "逆换行", tooltip: "第一行在下方 wrap-reverse" }
|
|
7254
|
+
],
|
|
7255
|
+
display: (mForm, { model }) => model.display === "flex"
|
|
7256
|
+
},
|
|
7257
|
+
{
|
|
7258
|
+
type: "row",
|
|
7259
|
+
items: [
|
|
7260
|
+
{
|
|
7261
|
+
name: "width",
|
|
7262
|
+
text: "宽度",
|
|
7263
|
+
labelWidth: "68px",
|
|
7264
|
+
type: "data-source-field-select",
|
|
7265
|
+
fieldConfig: {
|
|
7266
|
+
type: "text"
|
|
7267
|
+
}
|
|
7268
|
+
},
|
|
7269
|
+
{
|
|
7270
|
+
name: "height",
|
|
7271
|
+
text: "宽度",
|
|
7272
|
+
labelWidth: "68px",
|
|
7273
|
+
type: "data-source-field-select",
|
|
7274
|
+
fieldConfig: {
|
|
7275
|
+
type: "text"
|
|
7276
|
+
}
|
|
7277
|
+
}
|
|
7278
|
+
]
|
|
7279
|
+
},
|
|
7280
|
+
{
|
|
7281
|
+
type: "data-source-field-select",
|
|
7282
|
+
text: "overflow",
|
|
7283
|
+
name: "overflow",
|
|
7284
|
+
checkStrictly: false,
|
|
7285
|
+
dataSourceFieldType: ["string"],
|
|
7286
|
+
fieldConfig: {
|
|
7287
|
+
type: "select",
|
|
7288
|
+
clearable: true,
|
|
7289
|
+
allowCreate: true,
|
|
7290
|
+
options: [
|
|
7291
|
+
{ text: "visible", value: "visible" },
|
|
7292
|
+
{ text: "hidden", value: "hidden" },
|
|
7293
|
+
{ text: "clip", value: "clip" },
|
|
7294
|
+
{ text: "scroll", value: "scroll" },
|
|
7295
|
+
{ text: "auto", value: "auto" },
|
|
7296
|
+
{ text: "overlay", value: "overlay" },
|
|
7297
|
+
{ text: "initial", value: "initial" }
|
|
7298
|
+
]
|
|
7299
|
+
}
|
|
7300
|
+
}
|
|
7301
|
+
]
|
|
7302
|
+
};
|
|
7303
|
+
const change = (value, eventData) => {
|
|
7304
|
+
emit("change", value, eventData);
|
|
7305
|
+
};
|
|
7306
|
+
return (_ctx, _cache) => {
|
|
7307
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
7308
|
+
vue.createVNode(vue.unref(formPlugin.MContainer), {
|
|
7309
|
+
config,
|
|
7310
|
+
model: _ctx.values,
|
|
7311
|
+
onChange: change
|
|
7312
|
+
}, null, 8, ["model"]),
|
|
7313
|
+
vue.createVNode(_sfc_main$X, {
|
|
7314
|
+
model: _ctx.values,
|
|
7315
|
+
onChange: change
|
|
7316
|
+
}, null, 8, ["model"])
|
|
7317
|
+
], 64);
|
|
7318
|
+
};
|
|
7319
|
+
}
|
|
7320
|
+
});
|
|
7321
|
+
|
|
7322
|
+
const _hoisted_1$o = { class: "layout-box-container" };
|
|
7323
|
+
const _hoisted_2$b = { class: "next-input" };
|
|
7324
|
+
const _hoisted_3$4 = ["onUpdate:modelValue", "title", "onChange"];
|
|
7325
|
+
const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
|
|
7326
|
+
__name: "Position",
|
|
7327
|
+
props: {
|
|
7328
|
+
model: {}
|
|
7329
|
+
},
|
|
7330
|
+
emits: ["change"],
|
|
7331
|
+
setup(__props, { emit: __emit }) {
|
|
7332
|
+
const list = [
|
|
7333
|
+
{
|
|
7334
|
+
name: "top",
|
|
7335
|
+
class: "outer-top-border"
|
|
7336
|
+
},
|
|
7337
|
+
{
|
|
7338
|
+
name: "right",
|
|
7339
|
+
class: "outer-right-border"
|
|
7340
|
+
},
|
|
7341
|
+
{
|
|
7342
|
+
name: "bottom",
|
|
7343
|
+
class: "outer-bottom-border"
|
|
7344
|
+
},
|
|
7345
|
+
{
|
|
7346
|
+
name: "left",
|
|
7347
|
+
class: "outer-left-border"
|
|
7348
|
+
}
|
|
7349
|
+
];
|
|
7350
|
+
const emit = __emit;
|
|
7351
|
+
const change = (event, name) => {
|
|
7352
|
+
emit("change", event.target.value, {
|
|
7353
|
+
modifyKey: name
|
|
7354
|
+
});
|
|
7355
|
+
};
|
|
7356
|
+
return (_ctx, _cache) => {
|
|
7357
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$o, [
|
|
7358
|
+
(vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(list, (item, index) => {
|
|
7359
|
+
return vue.createElementVNode("div", {
|
|
7360
|
+
key: index,
|
|
7361
|
+
class: vue.normalizeClass(item.class)
|
|
7362
|
+
}, [
|
|
7363
|
+
vue.createElementVNode("span", _hoisted_2$b, [
|
|
7364
|
+
vue.withDirectives(vue.createElementVNode("input", {
|
|
7365
|
+
"onUpdate:modelValue": ($event) => _ctx.model[item.name] = $event,
|
|
7366
|
+
title: _ctx.model[item.name],
|
|
7367
|
+
onChange: ($event) => change($event, item.name),
|
|
7368
|
+
placeholder: "0"
|
|
7369
|
+
}, null, 40, _hoisted_3$4), [
|
|
7370
|
+
[vue.vModelText, _ctx.model[item.name]]
|
|
7371
|
+
])
|
|
7372
|
+
])
|
|
7373
|
+
], 2);
|
|
7374
|
+
}), 64))
|
|
7375
|
+
]);
|
|
7376
|
+
};
|
|
7377
|
+
}
|
|
7378
|
+
});
|
|
7379
|
+
|
|
7380
|
+
const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
|
|
7381
|
+
__name: "Position",
|
|
7382
|
+
props: {
|
|
7383
|
+
values: {}
|
|
7384
|
+
},
|
|
7385
|
+
emits: ["change"],
|
|
7386
|
+
setup(__props, { emit: __emit }) {
|
|
7387
|
+
const emit = __emit;
|
|
7388
|
+
const config = {
|
|
7389
|
+
items: [
|
|
7390
|
+
{
|
|
7391
|
+
name: "position",
|
|
7392
|
+
text: "定位",
|
|
7393
|
+
labelWidth: "68px",
|
|
7394
|
+
type: "data-source-field-select",
|
|
7395
|
+
fieldConfig: {
|
|
7396
|
+
type: "select",
|
|
7397
|
+
options: ["static", "relative", "absolute", "fixed", "sticky"].map((item) => ({
|
|
7398
|
+
value: item,
|
|
7399
|
+
text: item
|
|
7400
|
+
}))
|
|
7401
|
+
}
|
|
7402
|
+
},
|
|
7403
|
+
{
|
|
7404
|
+
labelWidth: "68px",
|
|
7405
|
+
name: "zIndex",
|
|
7406
|
+
text: "zIndex",
|
|
7407
|
+
type: "data-source-field-select",
|
|
7408
|
+
fieldConfig: {
|
|
7409
|
+
type: "text"
|
|
7410
|
+
}
|
|
7411
|
+
}
|
|
7412
|
+
]
|
|
7413
|
+
};
|
|
7414
|
+
const change = (value, eventData) => {
|
|
7415
|
+
emit("change", value, eventData);
|
|
7416
|
+
};
|
|
7417
|
+
return (_ctx, _cache) => {
|
|
7418
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
7419
|
+
vue.createVNode(vue.unref(formPlugin.MContainer), {
|
|
7420
|
+
config,
|
|
7421
|
+
model: _ctx.values,
|
|
7422
|
+
onChange: change
|
|
7423
|
+
}, null, 8, ["model"]),
|
|
7424
|
+
vue.withDirectives(vue.createVNode(_sfc_main$H, {
|
|
7425
|
+
model: _ctx.values,
|
|
7426
|
+
onChange: change
|
|
7427
|
+
}, null, 8, ["model"]), [
|
|
7428
|
+
[vue.vShow, _ctx.values["position"] !== "static"]
|
|
7429
|
+
])
|
|
7430
|
+
], 64);
|
|
7431
|
+
};
|
|
7432
|
+
}
|
|
7433
|
+
});
|
|
7434
|
+
|
|
7435
|
+
const _hoisted_1$n = { class: "border-box-container" };
|
|
7436
|
+
const _hoisted_2$a = { class: "border-icon-container" };
|
|
7437
|
+
const _hoisted_3$3 = { class: "border-icon-container-row" };
|
|
7438
|
+
const _hoisted_4$3 = { class: "border-icon-container-row" };
|
|
7439
|
+
const _hoisted_5$1 = { class: "border-icon-container-row" };
|
|
7440
|
+
const _hoisted_6 = { class: "border-value-container" };
|
|
7441
|
+
const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
7442
|
+
__name: "Border",
|
|
7443
|
+
props: {
|
|
7444
|
+
model: {}
|
|
7445
|
+
},
|
|
7446
|
+
emits: ["change"],
|
|
7447
|
+
setup(__props, { emit: __emit }) {
|
|
7448
|
+
const direction = vue.ref("");
|
|
7449
|
+
const config = vue.computed(() => ({
|
|
7450
|
+
items: [
|
|
7451
|
+
{
|
|
7452
|
+
name: `border${direction.value}Width`,
|
|
7453
|
+
text: "边框宽度",
|
|
7454
|
+
labelWidth: "68px",
|
|
7455
|
+
type: "data-source-field-select",
|
|
7456
|
+
fieldConfig: {
|
|
7457
|
+
type: "text"
|
|
7458
|
+
}
|
|
7459
|
+
},
|
|
7460
|
+
{
|
|
7461
|
+
name: `border${direction.value}Color`,
|
|
7462
|
+
text: "边框颜色",
|
|
7463
|
+
labelWidth: "68px",
|
|
7464
|
+
type: "data-source-field-select",
|
|
7465
|
+
fieldConfig: {
|
|
7466
|
+
type: "colorPicker"
|
|
7467
|
+
}
|
|
7468
|
+
},
|
|
7469
|
+
{
|
|
7470
|
+
name: `border${direction.value}Style`,
|
|
7471
|
+
text: "边框样式",
|
|
7472
|
+
labelWidth: "68px",
|
|
7473
|
+
type: "data-source-field-select",
|
|
7474
|
+
fieldConfig: {
|
|
7475
|
+
type: "select",
|
|
7476
|
+
options: ["solid", "dashed", "dotted"].map((item) => ({
|
|
7477
|
+
value: item,
|
|
7478
|
+
text: item
|
|
7479
|
+
}))
|
|
7480
|
+
}
|
|
7481
|
+
}
|
|
7482
|
+
]
|
|
7483
|
+
}));
|
|
7484
|
+
const selectDirection = (d) => direction.value = d || "";
|
|
7485
|
+
const emit = __emit;
|
|
7486
|
+
const change = (value, eventData) => {
|
|
7487
|
+
eventData.changeRecords?.forEach((record) => {
|
|
7488
|
+
emit("change", record.value, {
|
|
7489
|
+
modifyKey: record.propPath
|
|
7490
|
+
});
|
|
7491
|
+
});
|
|
7492
|
+
};
|
|
7493
|
+
return (_ctx, _cache) => {
|
|
7494
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$n, [
|
|
7495
|
+
vue.createElementVNode("div", _hoisted_2$a, [
|
|
7496
|
+
vue.createElementVNode("div", _hoisted_3$3, [
|
|
7497
|
+
vue.createElementVNode("div", {
|
|
7498
|
+
class: vue.normalizeClass(["border-icon border-icon-top", { active: direction.value === "Top" }]),
|
|
7499
|
+
onClick: _cache[0] || (_cache[0] = ($event) => selectDirection("Top"))
|
|
7500
|
+
}, null, 2)
|
|
7501
|
+
]),
|
|
7502
|
+
vue.createElementVNode("div", _hoisted_4$3, [
|
|
7503
|
+
vue.createElementVNode("div", {
|
|
7504
|
+
class: vue.normalizeClass(["border-icon border-icon-left", { active: direction.value === "Left" }]),
|
|
7505
|
+
onClick: _cache[1] || (_cache[1] = ($event) => selectDirection("Left"))
|
|
7506
|
+
}, null, 2),
|
|
7507
|
+
vue.createElementVNode("div", {
|
|
7508
|
+
class: vue.normalizeClass(["border-icon", { active: direction.value === "" }]),
|
|
7509
|
+
onClick: _cache[2] || (_cache[2] = ($event) => selectDirection())
|
|
7510
|
+
}, null, 2),
|
|
7511
|
+
vue.createElementVNode("div", {
|
|
7512
|
+
class: vue.normalizeClass(["border-icon border-icon-right", { active: direction.value === "Right" }]),
|
|
7513
|
+
onClick: _cache[3] || (_cache[3] = ($event) => selectDirection("Right"))
|
|
7514
|
+
}, null, 2)
|
|
7515
|
+
]),
|
|
7516
|
+
vue.createElementVNode("div", _hoisted_5$1, [
|
|
7517
|
+
vue.createElementVNode("div", {
|
|
7518
|
+
class: vue.normalizeClass(["border-icon border-icon-bottom", { active: direction.value === "Bottom" }]),
|
|
7519
|
+
onClick: _cache[4] || (_cache[4] = ($event) => selectDirection("Bottom"))
|
|
7520
|
+
}, null, 2)
|
|
7521
|
+
])
|
|
7522
|
+
]),
|
|
7523
|
+
vue.createElementVNode("div", _hoisted_6, [
|
|
7524
|
+
vue.createVNode(vue.unref(formPlugin.MContainer), {
|
|
7525
|
+
config: config.value,
|
|
7526
|
+
model: _ctx.model,
|
|
7527
|
+
onChange: change
|
|
7528
|
+
}, null, 8, ["config", "model"])
|
|
7529
|
+
])
|
|
7530
|
+
]);
|
|
7531
|
+
};
|
|
7532
|
+
}
|
|
7533
|
+
});
|
|
7534
|
+
|
|
7535
|
+
const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
7536
|
+
__name: "Border",
|
|
7537
|
+
props: {
|
|
7538
|
+
values: {}
|
|
7539
|
+
},
|
|
7540
|
+
emits: ["change"],
|
|
7541
|
+
setup(__props, { emit: __emit }) {
|
|
7542
|
+
const emit = __emit;
|
|
7543
|
+
const config = {
|
|
7544
|
+
items: [
|
|
7545
|
+
{
|
|
7546
|
+
labelWidth: "68px",
|
|
7547
|
+
name: "borderRadius",
|
|
7548
|
+
text: "圆角",
|
|
7549
|
+
type: "data-source-field-select",
|
|
7550
|
+
fieldConfig: {
|
|
7551
|
+
type: "text"
|
|
7552
|
+
}
|
|
7553
|
+
}
|
|
7554
|
+
]
|
|
7555
|
+
};
|
|
7556
|
+
const change = (value, eventData) => {
|
|
7557
|
+
emit("change", value, eventData);
|
|
7558
|
+
};
|
|
7559
|
+
return (_ctx, _cache) => {
|
|
7560
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
7561
|
+
vue.createVNode(vue.unref(formPlugin.MContainer), {
|
|
7562
|
+
config,
|
|
7563
|
+
model: _ctx.values,
|
|
7564
|
+
onChange: change
|
|
7565
|
+
}, null, 8, ["model"]),
|
|
7566
|
+
vue.createVNode(_sfc_main$F, {
|
|
7567
|
+
model: _ctx.values,
|
|
7568
|
+
onChange: change
|
|
7569
|
+
}, null, 8, ["model"])
|
|
7570
|
+
], 64);
|
|
7571
|
+
};
|
|
7572
|
+
}
|
|
7573
|
+
});
|
|
7574
|
+
|
|
7575
|
+
const _hoisted_1$m = { class: "m-fields-style-setter" };
|
|
7576
|
+
const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
7577
|
+
...{
|
|
7578
|
+
name: "MFieldsStyleSetter"
|
|
7579
|
+
},
|
|
7580
|
+
__name: "Index",
|
|
7581
|
+
props: {
|
|
7582
|
+
config: {},
|
|
7583
|
+
model: {},
|
|
7584
|
+
initValues: {},
|
|
7585
|
+
values: {},
|
|
7586
|
+
name: {},
|
|
7587
|
+
prop: {},
|
|
7588
|
+
disabled: { type: Boolean },
|
|
7589
|
+
size: {},
|
|
7590
|
+
lastValues: {}
|
|
7591
|
+
},
|
|
7592
|
+
emits: ["change"],
|
|
7593
|
+
setup(__props, { emit: __emit }) {
|
|
7594
|
+
const emit = __emit;
|
|
7595
|
+
const list = [
|
|
7596
|
+
{
|
|
7597
|
+
name: "font",
|
|
7598
|
+
title: "布局",
|
|
7599
|
+
component: _sfc_main$I
|
|
7600
|
+
},
|
|
7601
|
+
{
|
|
7602
|
+
title: "位置",
|
|
7603
|
+
component: _sfc_main$G
|
|
7604
|
+
},
|
|
7605
|
+
{
|
|
7606
|
+
title: "背景",
|
|
7607
|
+
component: _sfc_main$10
|
|
7608
|
+
},
|
|
7609
|
+
{
|
|
7610
|
+
title: "文字",
|
|
7611
|
+
component: _sfc_main$Y
|
|
7612
|
+
},
|
|
7613
|
+
{
|
|
7614
|
+
title: "边框与圆角",
|
|
7615
|
+
component: _sfc_main$E
|
|
7616
|
+
}
|
|
7617
|
+
];
|
|
7618
|
+
const collapseValue = vue.shallowRef(
|
|
7619
|
+
Array(list.length).fill(1).map((x, i) => `${i}`)
|
|
7620
|
+
);
|
|
7621
|
+
const change = (v, eventData) => {
|
|
7622
|
+
emit("change", v, eventData);
|
|
7623
|
+
};
|
|
7624
|
+
return (_ctx, _cache) => {
|
|
7625
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$m, [
|
|
7626
|
+
vue.createVNode(vue.unref(designPlugin.TMagicCollapse), { "model-value": collapseValue.value }, {
|
|
7627
|
+
default: vue.withCtx(() => [
|
|
7628
|
+
(vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(list, (item, index) => {
|
|
7629
|
+
return vue.createVNode(vue.unref(designPlugin.TMagicCollapseItem), {
|
|
7630
|
+
key: index,
|
|
7631
|
+
name: `${index}`
|
|
7632
|
+
}, {
|
|
7633
|
+
title: vue.withCtx(() => [
|
|
7634
|
+
vue.createVNode(_sfc_main$1s, { icon: vue.unref(iconsVue.Grid) }, null, 8, ["icon"]),
|
|
7635
|
+
vue.createTextVNode(vue.toDisplayString(item.title), 1)
|
|
7636
|
+
]),
|
|
7637
|
+
default: vue.withCtx(() => [
|
|
7638
|
+
item.component ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(item.component), {
|
|
7639
|
+
key: 0,
|
|
7640
|
+
values: _ctx.model[_ctx.name],
|
|
7641
|
+
onChange: change
|
|
7642
|
+
}, null, 40, ["values"])) : vue.createCommentVNode("", true)
|
|
7643
|
+
]),
|
|
7644
|
+
_: 2
|
|
7645
|
+
}, 1032, ["name"]);
|
|
7646
|
+
}), 64))
|
|
7647
|
+
]),
|
|
7648
|
+
_: 1
|
|
7649
|
+
}, 8, ["model-value"])
|
|
7650
|
+
]);
|
|
7651
|
+
};
|
|
7652
|
+
}
|
|
7653
|
+
});
|
|
7654
|
+
|
|
7655
|
+
const _hoisted_1$l = {
|
|
7656
|
+
key: 1,
|
|
7657
|
+
class: "m-fields-ui-select",
|
|
7658
|
+
style: { "display": "flex" }
|
|
7659
|
+
};
|
|
7660
|
+
const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
7661
|
+
...{
|
|
7662
|
+
name: "MFieldsUISelect"
|
|
7663
|
+
},
|
|
7664
|
+
__name: "UISelect",
|
|
7665
|
+
props: {
|
|
7666
|
+
config: {},
|
|
7667
|
+
model: {},
|
|
7668
|
+
initValues: {},
|
|
7669
|
+
values: {},
|
|
7670
|
+
name: {},
|
|
7671
|
+
prop: {},
|
|
7672
|
+
disabled: { type: Boolean },
|
|
7673
|
+
size: {},
|
|
7674
|
+
lastValues: {}
|
|
7675
|
+
},
|
|
7676
|
+
emits: ["change"],
|
|
7677
|
+
setup(__props, { emit: __emit }) {
|
|
7678
|
+
const props = __props;
|
|
7679
|
+
const emit = __emit;
|
|
7680
|
+
const services = vue.inject("services");
|
|
7681
|
+
const mForm = vue.inject("mForm");
|
|
7682
|
+
const val = vue.computed(() => props.model[props.name]);
|
|
7683
|
+
const uiSelectMode = vue.ref(false);
|
|
7684
|
+
const cancelHandler = () => {
|
|
7685
|
+
if (!services?.uiService) return;
|
|
7686
|
+
services.uiService.set("uiSelectMode", false);
|
|
7687
|
+
uiSelectMode.value = false;
|
|
7688
|
+
globalThis.document.removeEventListener(UI_SELECT_MODE_EVENT_NAME, clickHandler);
|
|
7689
|
+
};
|
|
7690
|
+
const clickHandler = ({ detail }) => {
|
|
7691
|
+
let { id } = detail;
|
|
7692
|
+
if (detail.nodeType) {
|
|
7693
|
+
id = utils.getIdFromEl()(detail) || id;
|
|
7694
|
+
}
|
|
7695
|
+
if (id) {
|
|
7696
|
+
props.model[props.name] = id;
|
|
7697
|
+
emit("change", id);
|
|
7698
|
+
mForm?.$emit("field-change", props.prop, id);
|
|
7699
|
+
}
|
|
7700
|
+
if (cancelHandler) {
|
|
7701
|
+
cancelHandler();
|
|
7702
|
+
}
|
|
7703
|
+
};
|
|
7704
|
+
const toName = vue.computed(() => {
|
|
7705
|
+
const config = services?.editorService.getNodeById(val.value);
|
|
7706
|
+
return config?.name || "";
|
|
7707
|
+
});
|
|
7708
|
+
const startSelect = () => {
|
|
7709
|
+
if (!services?.uiService) return;
|
|
7710
|
+
services.uiService.set("uiSelectMode", true);
|
|
7711
|
+
uiSelectMode.value = true;
|
|
7712
|
+
globalThis.document.addEventListener(UI_SELECT_MODE_EVENT_NAME, clickHandler);
|
|
7713
|
+
};
|
|
7714
|
+
const deleteHandler = () => {
|
|
6828
7715
|
if (props.model) {
|
|
6829
7716
|
props.model[props.name] = "";
|
|
6830
7717
|
emit("change", "");
|
|
@@ -6868,7 +7755,7 @@
|
|
|
6868
7755
|
])),
|
|
6869
7756
|
_: 1
|
|
6870
7757
|
}, 8, ["icon", "disabled", "size"])
|
|
6871
|
-
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
7758
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$l, [
|
|
6872
7759
|
val.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
6873
7760
|
vue.createVNode(vue.unref(designPlugin.TMagicTooltip), {
|
|
6874
7761
|
content: "清除",
|
|
@@ -6943,12 +7830,11 @@
|
|
|
6943
7830
|
emits: ["change"],
|
|
6944
7831
|
setup(__props, { emit: __emit }) {
|
|
6945
7832
|
const emit = __emit;
|
|
6946
|
-
const
|
|
6947
|
-
const { isDragging } = useGetSo(
|
|
7833
|
+
const targetEl = vue.useTemplateRef("target");
|
|
7834
|
+
const { isDragging } = useGetSo(targetEl, emit);
|
|
6948
7835
|
return (_ctx, _cache) => {
|
|
6949
7836
|
return vue.openBlock(), vue.createElementBlock("span", {
|
|
6950
|
-
|
|
6951
|
-
ref: target,
|
|
7837
|
+
ref: "target",
|
|
6952
7838
|
class: vue.normalizeClass(["m-editor-resizer", { "m-editor-resizer-dragging": vue.unref(isDragging) }])
|
|
6953
7839
|
}, [
|
|
6954
7840
|
vue.renderSlot(_ctx.$slots, "default")
|
|
@@ -6977,7 +7863,7 @@
|
|
|
6977
7863
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
6978
7864
|
const emit = __emit;
|
|
6979
7865
|
const props = __props;
|
|
6980
|
-
const el = vue.useTemplateRef("
|
|
7866
|
+
const el = vue.useTemplateRef("target");
|
|
6981
7867
|
const hasLeft = vue.computed(() => typeof props.left !== "undefined");
|
|
6982
7868
|
const hasRight = vue.computed(() => typeof props.right !== "undefined");
|
|
6983
7869
|
const center = vue.ref(0);
|
|
@@ -7083,8 +7969,7 @@
|
|
|
7083
7969
|
});
|
|
7084
7970
|
return (_ctx, _cache) => {
|
|
7085
7971
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
7086
|
-
|
|
7087
|
-
ref: el,
|
|
7972
|
+
ref: "target",
|
|
7088
7973
|
class: "m-editor-layout",
|
|
7089
7974
|
style: vue.normalizeStyle(`min-width: ${props.minCenter + props.minLeft + props.minRight}px`)
|
|
7090
7975
|
}, [
|
|
@@ -7117,11 +8002,11 @@
|
|
|
7117
8002
|
}
|
|
7118
8003
|
});
|
|
7119
8004
|
|
|
7120
|
-
const _hoisted_1$
|
|
8005
|
+
const _hoisted_1$k = {
|
|
7121
8006
|
key: 1,
|
|
7122
8007
|
class: "menu-item-text"
|
|
7123
8008
|
};
|
|
7124
|
-
const _hoisted_2$
|
|
8009
|
+
const _hoisted_2$9 = { class: "el-dropdown-link menubar-menu-button" };
|
|
7125
8010
|
const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
|
|
7126
8011
|
...{
|
|
7127
8012
|
name: "MEditorToolButton"
|
|
@@ -7193,7 +8078,7 @@
|
|
|
7193
8078
|
_ctx.data.type === "divider" ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicDivider), {
|
|
7194
8079
|
key: 0,
|
|
7195
8080
|
direction: _ctx.data.direction || "vertical"
|
|
7196
|
-
}, null, 8, ["direction"])) : _ctx.data.type === "text" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
8081
|
+
}, null, 8, ["direction"])) : _ctx.data.type === "text" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$k, vue.toDisplayString(_ctx.data.text), 1)) : _ctx.data.type === "button" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
7197
8082
|
_ctx.data.tooltip ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicTooltip), {
|
|
7198
8083
|
key: 0,
|
|
7199
8084
|
effect: "dark",
|
|
@@ -7207,7 +8092,7 @@
|
|
|
7207
8092
|
disabled: disabled.value
|
|
7208
8093
|
}, {
|
|
7209
8094
|
default: vue.withCtx(() => [
|
|
7210
|
-
_ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
8095
|
+
_ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$1s, {
|
|
7211
8096
|
key: 0,
|
|
7212
8097
|
icon: _ctx.data.icon
|
|
7213
8098
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
@@ -7225,7 +8110,7 @@
|
|
|
7225
8110
|
title: _ctx.data.text
|
|
7226
8111
|
}, {
|
|
7227
8112
|
default: vue.withCtx(() => [
|
|
7228
|
-
_ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
8113
|
+
_ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$1s, {
|
|
7229
8114
|
key: 0,
|
|
7230
8115
|
icon: _ctx.data.icon
|
|
7231
8116
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
@@ -7258,7 +8143,7 @@
|
|
|
7258
8143
|
})) : vue.createCommentVNode("", true)
|
|
7259
8144
|
]),
|
|
7260
8145
|
default: vue.withCtx(() => [
|
|
7261
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
8146
|
+
vue.createElementVNode("span", _hoisted_2$9, [
|
|
7262
8147
|
vue.createTextVNode(vue.toDisplayString(_ctx.data.text), 1),
|
|
7263
8148
|
vue.createVNode(vue.unref(designPlugin.TMagicIcon), { class: "el-icon--right" }, {
|
|
7264
8149
|
default: vue.withCtx(() => [
|
|
@@ -7275,12 +8160,12 @@
|
|
|
7275
8160
|
}
|
|
7276
8161
|
});
|
|
7277
8162
|
|
|
7278
|
-
const _hoisted_1$
|
|
8163
|
+
const _hoisted_1$j = {
|
|
7279
8164
|
key: 0,
|
|
7280
8165
|
id: "m-editor-page-bar-add-icon",
|
|
7281
8166
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon"
|
|
7282
8167
|
};
|
|
7283
|
-
const _hoisted_2$
|
|
8168
|
+
const _hoisted_2$8 = {
|
|
7284
8169
|
key: 1,
|
|
7285
8170
|
style: { "width": "21px" }
|
|
7286
8171
|
};
|
|
@@ -7306,10 +8191,10 @@
|
|
|
7306
8191
|
editorService.add(pageConfig);
|
|
7307
8192
|
};
|
|
7308
8193
|
return (_ctx, _cache) => {
|
|
7309
|
-
return showAddPageButton.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
8194
|
+
return showAddPageButton.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$j, [
|
|
7310
8195
|
vue.createVNode(vue.unref(designPlugin.TMagicPopover), { "popper-class": "data-source-list-panel-add-menu" }, {
|
|
7311
8196
|
reference: vue.withCtx(() => [
|
|
7312
|
-
vue.createVNode(_sfc_main$
|
|
8197
|
+
vue.createVNode(_sfc_main$1s, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
|
|
7313
8198
|
]),
|
|
7314
8199
|
default: vue.withCtx(() => [
|
|
7315
8200
|
vue.createVNode(_sfc_main$z, {
|
|
@@ -7333,11 +8218,20 @@
|
|
|
7333
8218
|
]),
|
|
7334
8219
|
_: 1
|
|
7335
8220
|
})
|
|
7336
|
-
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
8221
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$8));
|
|
7337
8222
|
};
|
|
7338
8223
|
}
|
|
7339
8224
|
});
|
|
7340
8225
|
|
|
8226
|
+
const _hoisted_1$i = {
|
|
8227
|
+
class: "m-editor-page-bar",
|
|
8228
|
+
ref: "pageBar"
|
|
8229
|
+
};
|
|
8230
|
+
const _hoisted_2$7 = {
|
|
8231
|
+
key: 0,
|
|
8232
|
+
class: "m-editor-page-bar-items",
|
|
8233
|
+
ref: "itemsContainer"
|
|
8234
|
+
};
|
|
7341
8235
|
const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
|
|
7342
8236
|
...{
|
|
7343
8237
|
name: "MEditorPageBarScrollContainer"
|
|
@@ -7352,33 +8246,33 @@
|
|
|
7352
8246
|
const services = vue.inject("services");
|
|
7353
8247
|
const editorService = services?.editorService;
|
|
7354
8248
|
const uiService = services?.uiService;
|
|
7355
|
-
const
|
|
8249
|
+
const itemsContainerEl = vue.useTemplateRef("itemsContainer");
|
|
7356
8250
|
const canScroll = vue.ref(false);
|
|
7357
8251
|
const showAddPageButton = vue.computed(() => uiService?.get("showAddPageButton"));
|
|
7358
8252
|
const showPageListButton = vue.computed(() => uiService?.get("showPageListButton"));
|
|
7359
8253
|
const itemsContainerWidth = vue.ref(0);
|
|
8254
|
+
const pageBarEl = vue.useTemplateRef("pageBar");
|
|
7360
8255
|
const setCanScroll = () => {
|
|
7361
|
-
itemsContainerWidth.value = (
|
|
8256
|
+
itemsContainerWidth.value = (pageBarEl.value?.clientWidth || 0) - 37 * 2 - 37 - (showAddPageButton.value ? 37 : 21) - (showPageListButton.value ? 37 : 0);
|
|
7362
8257
|
vue.nextTick(() => {
|
|
7363
|
-
if (
|
|
7364
|
-
canScroll.value =
|
|
8258
|
+
if (itemsContainerEl.value) {
|
|
8259
|
+
canScroll.value = itemsContainerEl.value.scrollWidth - itemsContainerWidth.value > 1;
|
|
7365
8260
|
}
|
|
7366
8261
|
});
|
|
7367
8262
|
};
|
|
7368
8263
|
const resizeObserver = new ResizeObserver(() => {
|
|
7369
8264
|
setCanScroll();
|
|
7370
8265
|
});
|
|
7371
|
-
const pageBar = vue.useTemplateRef("pageBar");
|
|
7372
8266
|
vue.onMounted(() => {
|
|
7373
|
-
|
|
8267
|
+
pageBarEl.value && resizeObserver.observe(pageBarEl.value);
|
|
7374
8268
|
});
|
|
7375
8269
|
vue.onBeforeUnmount(() => {
|
|
7376
8270
|
resizeObserver.disconnect();
|
|
7377
8271
|
});
|
|
7378
8272
|
let translateLeft = 0;
|
|
7379
8273
|
const scroll = (type) => {
|
|
7380
|
-
if (!
|
|
7381
|
-
const maxScrollLeft =
|
|
8274
|
+
if (!itemsContainerEl.value || !canScroll.value) return;
|
|
8275
|
+
const maxScrollLeft = itemsContainerEl.value.scrollWidth - itemsContainerWidth.value;
|
|
7382
8276
|
if (type === "left") {
|
|
7383
8277
|
scrollTo(translateLeft + 200);
|
|
7384
8278
|
} else if (type === "right") {
|
|
@@ -7390,8 +8284,8 @@
|
|
|
7390
8284
|
}
|
|
7391
8285
|
};
|
|
7392
8286
|
const scrollTo = (value) => {
|
|
7393
|
-
if (!
|
|
7394
|
-
const maxScrollLeft =
|
|
8287
|
+
if (!itemsContainerEl.value || !canScroll.value) return;
|
|
8288
|
+
const maxScrollLeft = itemsContainerEl.value.scrollWidth - itemsContainerWidth.value;
|
|
7395
8289
|
if (value >= 0) {
|
|
7396
8290
|
value = 0;
|
|
7397
8291
|
}
|
|
@@ -7399,7 +8293,7 @@
|
|
|
7399
8293
|
value = -maxScrollLeft;
|
|
7400
8294
|
}
|
|
7401
8295
|
translateLeft = value;
|
|
7402
|
-
|
|
8296
|
+
itemsContainerEl.value.style.transform = `translate(${translateLeft}px, 0px)`;
|
|
7403
8297
|
};
|
|
7404
8298
|
vue.watch(
|
|
7405
8299
|
() => props.length,
|
|
@@ -7458,18 +8352,9 @@
|
|
|
7458
8352
|
}
|
|
7459
8353
|
});
|
|
7460
8354
|
return (_ctx, _cache) => {
|
|
7461
|
-
return vue.openBlock(), vue.createElementBlock("div",
|
|
7462
|
-
class: "m-editor-page-bar",
|
|
7463
|
-
ref_key: "pageBar",
|
|
7464
|
-
ref: pageBar
|
|
7465
|
-
}, [
|
|
8355
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$i, [
|
|
7466
8356
|
vue.renderSlot(_ctx.$slots, "prepend"),
|
|
7467
|
-
_ctx.length ? (vue.openBlock(), vue.createElementBlock("div",
|
|
7468
|
-
key: 0,
|
|
7469
|
-
class: "m-editor-page-bar-items",
|
|
7470
|
-
ref_key: "itemsContainer",
|
|
7471
|
-
ref: itemsContainer
|
|
7472
|
-
}, [
|
|
8357
|
+
_ctx.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$7, [
|
|
7473
8358
|
vue.renderSlot(_ctx.$slots, "default")
|
|
7474
8359
|
], 512)) : vue.createCommentVNode("", true),
|
|
7475
8360
|
canScroll.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -7477,21 +8362,21 @@
|
|
|
7477
8362
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon m-editor-page-bar-item-left-icon",
|
|
7478
8363
|
onClick: _cache[0] || (_cache[0] = ($event) => scroll("left"))
|
|
7479
8364
|
}, [
|
|
7480
|
-
vue.createVNode(_sfc_main$
|
|
8365
|
+
vue.createVNode(_sfc_main$1s, { icon: vue.unref(iconsVue.ArrowLeftBold) }, null, 8, ["icon"])
|
|
7481
8366
|
])) : vue.createCommentVNode("", true),
|
|
7482
8367
|
canScroll.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
7483
8368
|
key: 2,
|
|
7484
8369
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon m-editor-page-bar-item-right-icon",
|
|
7485
8370
|
onClick: _cache[1] || (_cache[1] = ($event) => scroll("right"))
|
|
7486
8371
|
}, [
|
|
7487
|
-
vue.createVNode(_sfc_main$
|
|
8372
|
+
vue.createVNode(_sfc_main$1s, { icon: vue.unref(iconsVue.ArrowRightBold) }, null, 8, ["icon"])
|
|
7488
8373
|
])) : vue.createCommentVNode("", true)
|
|
7489
8374
|
], 512);
|
|
7490
8375
|
};
|
|
7491
8376
|
}
|
|
7492
8377
|
});
|
|
7493
8378
|
|
|
7494
|
-
const _hoisted_1$
|
|
8379
|
+
const _hoisted_1$h = {
|
|
7495
8380
|
key: 0,
|
|
7496
8381
|
id: "m-editor-page-bar-list-icon",
|
|
7497
8382
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon"
|
|
@@ -7514,7 +8399,7 @@
|
|
|
7514
8399
|
await editorService?.select(id);
|
|
7515
8400
|
};
|
|
7516
8401
|
return (_ctx, _cache) => {
|
|
7517
|
-
return showPageListButton.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
8402
|
+
return showPageListButton.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$h, [
|
|
7518
8403
|
vue.createVNode(vue.unref(designPlugin.TMagicPopover), {
|
|
7519
8404
|
"popper-class": "page-bar-popover",
|
|
7520
8405
|
placement: "top",
|
|
@@ -7554,7 +8439,7 @@
|
|
|
7554
8439
|
}
|
|
7555
8440
|
});
|
|
7556
8441
|
|
|
7557
|
-
const _hoisted_1$
|
|
8442
|
+
const _hoisted_1$g = { class: "m-editor-page-bar-item m-editor-page-bar-item-icon m-editor-page-bar-search" };
|
|
7558
8443
|
const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
7559
8444
|
__name: "Search",
|
|
7560
8445
|
props: {
|
|
@@ -7593,8 +8478,8 @@
|
|
|
7593
8478
|
emit("search", values);
|
|
7594
8479
|
};
|
|
7595
8480
|
return (_ctx, _cache) => {
|
|
7596
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
7597
|
-
vue.createVNode(_sfc_main$
|
|
8481
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [
|
|
8482
|
+
vue.createVNode(_sfc_main$1s, {
|
|
7598
8483
|
icon: vue.unref(iconsVue.Search),
|
|
7599
8484
|
onClick: _cache[0] || (_cache[0] = ($event) => visible.value = !visible.value),
|
|
7600
8485
|
class: vue.normalizeClass({ "icon-active": visible.value })
|
|
@@ -7618,7 +8503,7 @@
|
|
|
7618
8503
|
}
|
|
7619
8504
|
});
|
|
7620
8505
|
|
|
7621
|
-
const _hoisted_1$
|
|
8506
|
+
const _hoisted_1$f = { class: "m-editor-page-bar-tabs" };
|
|
7622
8507
|
const _hoisted_2$6 = ["data-page-id", "onClick"];
|
|
7623
8508
|
const _hoisted_3$2 = { class: "m-editor-page-bar-title" };
|
|
7624
8509
|
const _hoisted_4$2 = ["title"];
|
|
@@ -7670,38 +8555,37 @@
|
|
|
7670
8555
|
const remove = (node) => {
|
|
7671
8556
|
editorService?.remove(node);
|
|
7672
8557
|
};
|
|
7673
|
-
const
|
|
7674
|
-
const
|
|
8558
|
+
const pageBarScrollContainerRef = vue.useTemplateRef("pageBarScrollContainer");
|
|
8559
|
+
const pageBarItemEls = vue.useTemplateRef("pageBarItems");
|
|
7675
8560
|
vue.watch(page, (page2) => {
|
|
7676
|
-
if (!page2 || !
|
|
8561
|
+
if (!page2 || !pageBarScrollContainerRef.value?.itemsContainerWidth || !pageBarItemEls.value || pageBarItemEls.value.length < 2) {
|
|
7677
8562
|
return;
|
|
7678
8563
|
}
|
|
7679
|
-
const firstItem =
|
|
7680
|
-
const lastItem =
|
|
8564
|
+
const firstItem = pageBarItemEls.value[0];
|
|
8565
|
+
const lastItem = pageBarItemEls.value[pageBarItemEls.value.length - 1];
|
|
7681
8566
|
if (page2.id === firstItem.dataset.pageId) {
|
|
7682
|
-
|
|
8567
|
+
pageBarScrollContainerRef.value.scroll("start");
|
|
7683
8568
|
} else if (page2.id === lastItem.dataset.pageId) {
|
|
7684
|
-
|
|
8569
|
+
pageBarScrollContainerRef.value.scroll("end");
|
|
7685
8570
|
} else {
|
|
7686
|
-
const pageItem =
|
|
8571
|
+
const pageItem = pageBarItemEls.value.find((item) => item.dataset.pageId === page2.id);
|
|
7687
8572
|
if (!pageItem) {
|
|
7688
8573
|
return;
|
|
7689
8574
|
}
|
|
7690
8575
|
const pageItemRect = pageItem.getBoundingClientRect();
|
|
7691
8576
|
const offsetLeft = pageItemRect.left - firstItem.getBoundingClientRect().left;
|
|
7692
|
-
const { itemsContainerWidth } =
|
|
8577
|
+
const { itemsContainerWidth } = pageBarScrollContainerRef.value;
|
|
7693
8578
|
const left = itemsContainerWidth - offsetLeft - pageItemRect.width;
|
|
7694
|
-
const translateLeft =
|
|
8579
|
+
const translateLeft = pageBarScrollContainerRef.value.getTranslateLeft();
|
|
7695
8580
|
if (offsetLeft + translateLeft < 0 || offsetLeft + pageItemRect.width > itemsContainerWidth - translateLeft) {
|
|
7696
|
-
|
|
8581
|
+
pageBarScrollContainerRef.value.scrollTo(left);
|
|
7697
8582
|
}
|
|
7698
8583
|
}
|
|
7699
8584
|
});
|
|
7700
8585
|
return (_ctx, _cache) => {
|
|
7701
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
8586
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [
|
|
7702
8587
|
vue.createVNode(_sfc_main$x, {
|
|
7703
|
-
|
|
7704
|
-
ref: pageBarScrollContainer,
|
|
8588
|
+
ref: "pageBarScrollContainer",
|
|
7705
8589
|
"page-bar-sort-options": _ctx.pageBarSortOptions,
|
|
7706
8590
|
length: list.value.length
|
|
7707
8591
|
}, {
|
|
@@ -7725,8 +8609,7 @@
|
|
|
7725
8609
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
7726
8610
|
class: vue.normalizeClass(["m-editor-page-bar-item", { active: page.value?.id === item.id }]),
|
|
7727
8611
|
ref_for: true,
|
|
7728
|
-
|
|
7729
|
-
ref: pageBarItems,
|
|
8612
|
+
ref: "pageBarItems",
|
|
7730
8613
|
key: item.id,
|
|
7731
8614
|
"data-page-id": item.id,
|
|
7732
8615
|
onClick: ($event) => switchPage(item.id)
|
|
@@ -7787,7 +8670,7 @@
|
|
|
7787
8670
|
}
|
|
7788
8671
|
});
|
|
7789
8672
|
|
|
7790
|
-
const _hoisted_1$
|
|
8673
|
+
const _hoisted_1$e = { class: "m-editor-empty-panel" };
|
|
7791
8674
|
const _hoisted_2$5 = { class: "m-editor-empty-content" };
|
|
7792
8675
|
const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
7793
8676
|
...{
|
|
@@ -7811,14 +8694,14 @@
|
|
|
7811
8694
|
});
|
|
7812
8695
|
};
|
|
7813
8696
|
return (_ctx, _cache) => {
|
|
7814
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
8697
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [
|
|
7815
8698
|
vue.createElementVNode("div", _hoisted_2$5, [
|
|
7816
8699
|
vue.createElementVNode("div", {
|
|
7817
8700
|
class: "m-editor-empty-button",
|
|
7818
8701
|
onClick: _cache[0] || (_cache[0] = ($event) => clickHandler(vue.unref(core.NodeType).PAGE))
|
|
7819
8702
|
}, [
|
|
7820
8703
|
vue.createElementVNode("div", null, [
|
|
7821
|
-
vue.createVNode(_sfc_main$
|
|
8704
|
+
vue.createVNode(_sfc_main$1s, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
|
|
7822
8705
|
]),
|
|
7823
8706
|
_cache[2] || (_cache[2] = vue.createElementVNode("p", null, "新增页面", -1))
|
|
7824
8707
|
]),
|
|
@@ -7828,7 +8711,7 @@
|
|
|
7828
8711
|
onClick: _cache[1] || (_cache[1] = ($event) => clickHandler(vue.unref(core.NodeType).PAGE_FRAGMENT))
|
|
7829
8712
|
}, [
|
|
7830
8713
|
vue.createElementVNode("div", null, [
|
|
7831
|
-
vue.createVNode(_sfc_main$
|
|
8714
|
+
vue.createVNode(_sfc_main$1s, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
|
|
7832
8715
|
]),
|
|
7833
8716
|
_cache[3] || (_cache[3] = vue.createElementVNode("p", null, "新增页面片", -1))
|
|
7834
8717
|
])) : vue.createCommentVNode("", true)
|
|
@@ -7838,6 +8721,11 @@
|
|
|
7838
8721
|
}
|
|
7839
8722
|
});
|
|
7840
8723
|
|
|
8724
|
+
const _hoisted_1$d = {
|
|
8725
|
+
class: "m-editor",
|
|
8726
|
+
ref: "content",
|
|
8727
|
+
style: { "min-width": "180px" }
|
|
8728
|
+
};
|
|
7841
8729
|
const DEFAULT_LEFT_COLUMN_WIDTH = 310;
|
|
7842
8730
|
const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
|
|
7843
8731
|
const LEFT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorLeftColumnWidthData";
|
|
@@ -7855,8 +8743,8 @@
|
|
|
7855
8743
|
setup(__props) {
|
|
7856
8744
|
const codeOptions = vue.inject("codeOptions", {});
|
|
7857
8745
|
const { editorService, uiService } = vue.inject("services") || {};
|
|
7858
|
-
const
|
|
7859
|
-
const
|
|
8746
|
+
const contentEl = vue.useTemplateRef("content");
|
|
8747
|
+
const splitViewRef = vue.useTemplateRef("splitView");
|
|
7860
8748
|
const root = vue.computed(() => editorService?.get("root"));
|
|
7861
8749
|
const page = vue.computed(() => editorService?.get("page"));
|
|
7862
8750
|
const pageLength = vue.computed(() => editorService?.get("pageLength") || 0);
|
|
@@ -7869,7 +8757,7 @@
|
|
|
7869
8757
|
right: getRightColumnWidthCacheData()
|
|
7870
8758
|
});
|
|
7871
8759
|
vue.watch(pageLength, () => {
|
|
7872
|
-
|
|
8760
|
+
splitViewRef.value?.updateWidth();
|
|
7873
8761
|
});
|
|
7874
8762
|
vue.watch(
|
|
7875
8763
|
() => uiService?.get("hideSlideBar"),
|
|
@@ -7894,8 +8782,8 @@
|
|
|
7894
8782
|
});
|
|
7895
8783
|
});
|
|
7896
8784
|
vue.onMounted(() => {
|
|
7897
|
-
if (
|
|
7898
|
-
resizerObserver.observe(
|
|
8785
|
+
if (contentEl.value) {
|
|
8786
|
+
resizerObserver.observe(contentEl.value);
|
|
7899
8787
|
}
|
|
7900
8788
|
});
|
|
7901
8789
|
vue.onBeforeUnmount(() => {
|
|
@@ -7910,17 +8798,12 @@
|
|
|
7910
8798
|
}
|
|
7911
8799
|
};
|
|
7912
8800
|
return (_ctx, _cache) => {
|
|
7913
|
-
return vue.openBlock(), vue.createElementBlock("div",
|
|
7914
|
-
class: "m-editor",
|
|
7915
|
-
ref_key: "content",
|
|
7916
|
-
ref: content,
|
|
7917
|
-
style: { "min-width": "180px" }
|
|
7918
|
-
}, [
|
|
8801
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [
|
|
7919
8802
|
vue.renderSlot(_ctx.$slots, "header"),
|
|
7920
8803
|
vue.renderSlot(_ctx.$slots, "nav"),
|
|
7921
8804
|
vue.renderSlot(_ctx.$slots, "content-before"),
|
|
7922
8805
|
showSrc.value ? vue.renderSlot(_ctx.$slots, "src-code", { key: 0 }, () => [
|
|
7923
|
-
vue.createVNode(_sfc_main$
|
|
8806
|
+
vue.createVNode(_sfc_main$1r, {
|
|
7924
8807
|
class: "m-editor-content",
|
|
7925
8808
|
"init-values": root.value,
|
|
7926
8809
|
options: vue.unref(codeOptions),
|
|
@@ -7928,8 +8811,7 @@
|
|
|
7928
8811
|
}, null, 8, ["init-values", "options"])
|
|
7929
8812
|
]) : (vue.openBlock(), vue.createBlock(_sfc_main$A, {
|
|
7930
8813
|
key: 1,
|
|
7931
|
-
|
|
7932
|
-
ref: splitView,
|
|
8814
|
+
ref: "splitView",
|
|
7933
8815
|
class: "m-editor-content",
|
|
7934
8816
|
"left-class": "m-editor-framework-left",
|
|
7935
8817
|
"center-class": "m-editor-framework-center",
|
|
@@ -8140,8 +9022,9 @@
|
|
|
8140
9022
|
});
|
|
8141
9023
|
return data;
|
|
8142
9024
|
});
|
|
9025
|
+
const navMenuEl = vue.useTemplateRef("navMenu");
|
|
8143
9026
|
const resizeObserver = new ResizeObserver(() => {
|
|
8144
|
-
const rect =
|
|
9027
|
+
const rect = navMenuEl.value?.getBoundingClientRect();
|
|
8145
9028
|
if (rect) {
|
|
8146
9029
|
uiService?.set("navMenuRect", {
|
|
8147
9030
|
left: rect.left,
|
|
@@ -8151,9 +9034,8 @@
|
|
|
8151
9034
|
});
|
|
8152
9035
|
}
|
|
8153
9036
|
});
|
|
8154
|
-
const navMenu = vue.useTemplateRef("navMenu");
|
|
8155
9037
|
vue.onMounted(() => {
|
|
8156
|
-
|
|
9038
|
+
navMenuEl.value && resizeObserver.observe(navMenuEl.value);
|
|
8157
9039
|
});
|
|
8158
9040
|
vue.onBeforeUnmount(() => {
|
|
8159
9041
|
resizeObserver.disconnect();
|
|
@@ -8162,8 +9044,7 @@
|
|
|
8162
9044
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
8163
9045
|
class: "m-editor-nav-menu",
|
|
8164
9046
|
style: vue.normalizeStyle({ height: `${_ctx.height}px` }),
|
|
8165
|
-
|
|
8166
|
-
ref: navMenu
|
|
9047
|
+
ref: "navMenu"
|
|
8167
9048
|
}, [
|
|
8168
9049
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(keys), (key) => {
|
|
8169
9050
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -8184,7 +9065,7 @@
|
|
|
8184
9065
|
}
|
|
8185
9066
|
});
|
|
8186
9067
|
|
|
8187
|
-
const _hoisted_1$
|
|
9068
|
+
const _hoisted_1$c = { class: "m-editor-props-form-panel" };
|
|
8188
9069
|
const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
8189
9070
|
...{
|
|
8190
9071
|
name: "MEditorFormPanel"
|
|
@@ -8209,20 +9090,20 @@
|
|
|
8209
9090
|
const propsPanelSize = vue.computed(() => services?.uiService.get("propsPanelSize") || "small");
|
|
8210
9091
|
const { height: editorContentHeight } = useEditorContentHeight();
|
|
8211
9092
|
const stage = vue.computed(() => services?.editorService.get("stage"));
|
|
8212
|
-
const
|
|
9093
|
+
const configFormRef = vue.useTemplateRef("configForm");
|
|
8213
9094
|
vue.watchEffect(() => {
|
|
8214
|
-
if (
|
|
8215
|
-
|
|
8216
|
-
|
|
9095
|
+
if (configFormRef.value) {
|
|
9096
|
+
configFormRef.value.formState.stage = stage.value;
|
|
9097
|
+
configFormRef.value.formState.services = services;
|
|
8217
9098
|
}
|
|
8218
9099
|
});
|
|
8219
9100
|
const internalInstance = vue.getCurrentInstance();
|
|
8220
9101
|
vue.onMounted(() => {
|
|
8221
|
-
emit("mounted", internalInstance);
|
|
9102
|
+
emit("mounted", internalInstance?.proxy);
|
|
8222
9103
|
});
|
|
8223
9104
|
const submit = async (v, eventData) => {
|
|
8224
9105
|
try {
|
|
8225
|
-
const values = await
|
|
9106
|
+
const values = await configFormRef.value?.submitForm();
|
|
8226
9107
|
emit("submit", values, eventData);
|
|
8227
9108
|
} catch (e) {
|
|
8228
9109
|
emit("submit-error", e);
|
|
@@ -8234,15 +9115,14 @@
|
|
|
8234
9115
|
const saveCode = (values) => {
|
|
8235
9116
|
emit("submit", props.codeValueKey ? { [props.codeValueKey]: values } : values);
|
|
8236
9117
|
};
|
|
8237
|
-
__expose({ configForm, submit });
|
|
9118
|
+
__expose({ configForm: configFormRef, submit });
|
|
8238
9119
|
return (_ctx, _cache) => {
|
|
8239
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
9120
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [
|
|
8240
9121
|
vue.renderSlot(_ctx.$slots, "props-form-panel-header"),
|
|
8241
9122
|
vue.createVNode(vue.unref(designPlugin.TMagicScrollbar), null, {
|
|
8242
9123
|
default: vue.withCtx(() => [
|
|
8243
9124
|
vue.createVNode(vue.unref(formPlugin.MForm), {
|
|
8244
|
-
|
|
8245
|
-
ref: configForm,
|
|
9125
|
+
ref: "configForm",
|
|
8246
9126
|
class: vue.normalizeClass(propsPanelSize.value),
|
|
8247
9127
|
"popper-class": `m-editor-props-panel-popper ${propsPanelSize.value}`,
|
|
8248
9128
|
"label-width": _ctx.labelWidth,
|
|
@@ -8266,11 +9146,11 @@
|
|
|
8266
9146
|
onClick: _cache[0] || (_cache[0] = ($event) => showSrc.value = !showSrc.value)
|
|
8267
9147
|
}, {
|
|
8268
9148
|
default: vue.withCtx(() => [
|
|
8269
|
-
vue.createVNode(_sfc_main$
|
|
9149
|
+
vue.createVNode(_sfc_main$1s, { icon: vue.unref(iconsVue.Document) }, null, 8, ["icon"])
|
|
8270
9150
|
]),
|
|
8271
9151
|
_: 1
|
|
8272
9152
|
}, 8, ["type"])) : vue.createCommentVNode("", true),
|
|
8273
|
-
showSrc.value ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
9153
|
+
showSrc.value ? (vue.openBlock(), vue.createBlock(_sfc_main$1r, {
|
|
8274
9154
|
key: 1,
|
|
8275
9155
|
class: "m-editor-props-panel-src-code",
|
|
8276
9156
|
height: `${vue.unref(editorContentHeight)}px`,
|
|
@@ -8308,7 +9188,10 @@
|
|
|
8308
9188
|
};
|
|
8309
9189
|
};
|
|
8310
9190
|
|
|
8311
|
-
const _hoisted_1$
|
|
9191
|
+
const _hoisted_1$b = {
|
|
9192
|
+
ref: "propsPanel",
|
|
9193
|
+
class: "m-editor-props-panel"
|
|
9194
|
+
};
|
|
8312
9195
|
const _hoisted_2$4 = { class: "m-editor-props-style-panel-title" };
|
|
8313
9196
|
const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
8314
9197
|
...{
|
|
@@ -8352,7 +9235,18 @@
|
|
|
8352
9235
|
if (!v.id) {
|
|
8353
9236
|
v.id = values.value.id;
|
|
8354
9237
|
}
|
|
8355
|
-
|
|
9238
|
+
const newValue = {
|
|
9239
|
+
...v,
|
|
9240
|
+
style: {}
|
|
9241
|
+
};
|
|
9242
|
+
if (v.style) {
|
|
9243
|
+
Object.entries(v.style).forEach(([key, value]) => {
|
|
9244
|
+
if (value !== "" && newValue.style) {
|
|
9245
|
+
newValue.style[key] = value;
|
|
9246
|
+
}
|
|
9247
|
+
});
|
|
9248
|
+
}
|
|
9249
|
+
services?.editorService.update(newValue, { changeRecords: eventData?.changeRecords });
|
|
8356
9250
|
} catch (e) {
|
|
8357
9251
|
emit("submit-error", e);
|
|
8358
9252
|
}
|
|
@@ -8360,8 +9254,20 @@
|
|
|
8360
9254
|
const errorHandler = (e) => {
|
|
8361
9255
|
emit("form-error", e);
|
|
8362
9256
|
};
|
|
8363
|
-
const mountedHandler = (
|
|
8364
|
-
|
|
9257
|
+
const mountedHandler = () => {
|
|
9258
|
+
if (propertyFormPanelRef.value) {
|
|
9259
|
+
emit("mounted", propertyFormPanelRef.value);
|
|
9260
|
+
}
|
|
9261
|
+
};
|
|
9262
|
+
const propsPanelEl = vue.useTemplateRef("propsPanel");
|
|
9263
|
+
const widthChange = ({ deltaX }) => {
|
|
9264
|
+
if (!propsPanelEl.value) {
|
|
9265
|
+
return;
|
|
9266
|
+
}
|
|
9267
|
+
const width = globalThis.parseFloat(
|
|
9268
|
+
getComputedStyle(propsPanelEl.value).getPropertyValue("--props-style-panel-width")
|
|
9269
|
+
);
|
|
9270
|
+
propsPanelEl.value.style.setProperty("--props-style-panel-width", `${width - deltaX}px`);
|
|
8365
9271
|
};
|
|
8366
9272
|
const { showStylePanel, showStylePanelHandler, closeStylePanelHandler } = useStylePanel(services);
|
|
8367
9273
|
const propertyFormPanelRef = vue.useTemplateRef("propertyFormPanel");
|
|
@@ -8372,7 +9278,7 @@
|
|
|
8372
9278
|
submit
|
|
8373
9279
|
});
|
|
8374
9280
|
return (_ctx, _cache) => {
|
|
8375
|
-
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
9281
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [
|
|
8376
9282
|
vue.renderSlot(_ctx.$slots, "props-panel-header"),
|
|
8377
9283
|
vue.createVNode(_sfc_main$q, {
|
|
8378
9284
|
ref: "propertyFormPanel",
|
|
@@ -8386,8 +9292,12 @@
|
|
|
8386
9292
|
onFormError: errorHandler,
|
|
8387
9293
|
onMounted: mountedHandler
|
|
8388
9294
|
}, null, 8, ["class", "config", "values", "disabledShowSrc", "extendState"]),
|
|
8389
|
-
vue.unref(showStylePanel) ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
9295
|
+
vue.unref(showStylePanel) ? (vue.openBlock(), vue.createBlock(_sfc_main$B, {
|
|
8390
9296
|
key: 0,
|
|
9297
|
+
onChange: widthChange
|
|
9298
|
+
})) : vue.createCommentVNode("", true),
|
|
9299
|
+
vue.unref(showStylePanel) ? (vue.openBlock(), vue.createBlock(_sfc_main$q, {
|
|
9300
|
+
key: 1,
|
|
8391
9301
|
class: "m-editor-props-style-panel",
|
|
8392
9302
|
"label-position": "top",
|
|
8393
9303
|
"code-value-key": "style",
|
|
@@ -8409,7 +9319,7 @@
|
|
|
8409
9319
|
onClick: vue.unref(closeStylePanelHandler)
|
|
8410
9320
|
}, {
|
|
8411
9321
|
default: vue.withCtx(() => [
|
|
8412
|
-
vue.createVNode(_sfc_main$
|
|
9322
|
+
vue.createVNode(_sfc_main$1s, { icon: vue.unref(iconsVue.Close) }, null, 8, ["icon"])
|
|
8413
9323
|
]),
|
|
8414
9324
|
_: 1
|
|
8415
9325
|
}, 8, ["onClick"])
|
|
@@ -8419,14 +9329,14 @@
|
|
|
8419
9329
|
_: 1
|
|
8420
9330
|
}, 8, ["values", "disabledShowSrc", "extendState"])) : vue.createCommentVNode("", true),
|
|
8421
9331
|
!vue.unref(showStylePanel) ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicButton), {
|
|
8422
|
-
key:
|
|
9332
|
+
key: 2,
|
|
8423
9333
|
class: "m-editor-props-panel-style-icon",
|
|
8424
9334
|
circle: "",
|
|
8425
9335
|
type: vue.unref(showStylePanel) ? "primary" : "",
|
|
8426
9336
|
onClick: vue.unref(showStylePanelHandler)
|
|
8427
9337
|
}, {
|
|
8428
9338
|
default: vue.withCtx(() => [
|
|
8429
|
-
vue.createVNode(_sfc_main$
|
|
9339
|
+
vue.createVNode(_sfc_main$1s, { icon: vue.unref(iconsVue.Sugar) }, null, 8, ["icon"])
|
|
8430
9340
|
]),
|
|
8431
9341
|
_: 1
|
|
8432
9342
|
}, 8, ["type", "onClick"])) : vue.createCommentVNode("", true)
|
|
@@ -8452,9 +9362,9 @@
|
|
|
8452
9362
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
8453
9363
|
const props = __props;
|
|
8454
9364
|
const emit = __emit;
|
|
8455
|
-
const
|
|
8456
|
-
const
|
|
8457
|
-
const
|
|
9365
|
+
const menuEl = vue.useTemplateRef("menu");
|
|
9366
|
+
const buttonRefs = vue.useTemplateRef("buttons");
|
|
9367
|
+
const subMenuRef = vue.useTemplateRef("subMenu");
|
|
8458
9368
|
const visible = vue.ref(false);
|
|
8459
9369
|
const subMenuData = vue.ref([]);
|
|
8460
9370
|
const zIndex = designPlugin.useZIndex();
|
|
@@ -8468,11 +9378,11 @@
|
|
|
8468
9378
|
left: `${menuPosition.value.left + 2}px`,
|
|
8469
9379
|
zIndex: curZIndex.value
|
|
8470
9380
|
}));
|
|
8471
|
-
const contains = (el) =>
|
|
9381
|
+
const contains = (el) => menuEl.value?.contains(el) || subMenuRef.value?.contains(el);
|
|
8472
9382
|
const hide = () => {
|
|
8473
9383
|
if (!visible.value) return;
|
|
8474
9384
|
visible.value = false;
|
|
8475
|
-
|
|
9385
|
+
subMenuRef.value?.hide();
|
|
8476
9386
|
emit("hide");
|
|
8477
9387
|
};
|
|
8478
9388
|
const clickHandler = (event) => {
|
|
@@ -8493,7 +9403,7 @@
|
|
|
8493
9403
|
hide();
|
|
8494
9404
|
};
|
|
8495
9405
|
const setPosition = (e) => {
|
|
8496
|
-
const menuHeight =
|
|
9406
|
+
const menuHeight = menuEl.value?.clientHeight || 0;
|
|
8497
9407
|
let top = e.clientY;
|
|
8498
9408
|
if (menuHeight + e.clientY > document.body.clientHeight) {
|
|
8499
9409
|
top = document.body.clientHeight - menuHeight;
|
|
@@ -8521,14 +9431,14 @@
|
|
|
8521
9431
|
if (!visible.value) {
|
|
8522
9432
|
return;
|
|
8523
9433
|
}
|
|
8524
|
-
if (
|
|
8525
|
-
let y =
|
|
8526
|
-
if (
|
|
8527
|
-
const rect =
|
|
9434
|
+
if (menuEl.value) {
|
|
9435
|
+
let y = menuEl.value.offsetTop;
|
|
9436
|
+
if (buttonRefs.value?.[index].$el) {
|
|
9437
|
+
const rect = buttonRefs.value?.[index].$el.getBoundingClientRect();
|
|
8528
9438
|
y = rect.top;
|
|
8529
9439
|
}
|
|
8530
|
-
|
|
8531
|
-
clientX:
|
|
9440
|
+
subMenuRef.value?.show({
|
|
9441
|
+
clientX: menuEl.value.offsetLeft + menuEl.value.clientWidth - 2,
|
|
8532
9442
|
clientY: y
|
|
8533
9443
|
});
|
|
8534
9444
|
}
|
|
@@ -8546,7 +9456,7 @@
|
|
|
8546
9456
|
globalThis.removeEventListener("mousedown", outsideClickHideHandler, true);
|
|
8547
9457
|
});
|
|
8548
9458
|
__expose({
|
|
8549
|
-
menu,
|
|
9459
|
+
menu: menuEl,
|
|
8550
9460
|
menuPosition,
|
|
8551
9461
|
hide,
|
|
8552
9462
|
show,
|
|
@@ -8559,8 +9469,7 @@
|
|
|
8559
9469
|
default: vue.withCtx(() => [
|
|
8560
9470
|
vue.withDirectives(vue.createElementVNode("div", {
|
|
8561
9471
|
class: "magic-editor-content-menu",
|
|
8562
|
-
|
|
8563
|
-
ref: menu,
|
|
9472
|
+
ref: "menu",
|
|
8564
9473
|
style: vue.normalizeStyle(menuStyle.value),
|
|
8565
9474
|
onMouseenter: _cache[0] || (_cache[0] = ($event) => mouseenterHandler()),
|
|
8566
9475
|
onContextmenu: _cache[1] || (_cache[1] = vue.withModifiers(() => {
|
|
@@ -8572,8 +9481,7 @@
|
|
|
8572
9481
|
return vue.openBlock(), vue.createBlock(_sfc_main$z, {
|
|
8573
9482
|
"event-type": "mouseup",
|
|
8574
9483
|
ref_for: true,
|
|
8575
|
-
|
|
8576
|
-
ref: buttons,
|
|
9484
|
+
ref: "buttons",
|
|
8577
9485
|
class: vue.normalizeClass({ active: _ctx.active && item.id === _ctx.active }),
|
|
8578
9486
|
data: item,
|
|
8579
9487
|
key: index,
|
|
@@ -8586,8 +9494,7 @@
|
|
|
8586
9494
|
subMenuData.value.length ? (vue.openBlock(), vue.createBlock(_component_content_menu, {
|
|
8587
9495
|
key: 0,
|
|
8588
9496
|
class: "sub-menu",
|
|
8589
|
-
|
|
8590
|
-
ref: subMenu,
|
|
9497
|
+
ref: "subMenu",
|
|
8591
9498
|
active: _ctx.active,
|
|
8592
9499
|
"menu-data": subMenuData.value,
|
|
8593
9500
|
"is-sub-menu": true,
|
|
@@ -8645,7 +9552,7 @@
|
|
|
8645
9552
|
}
|
|
8646
9553
|
});
|
|
8647
9554
|
|
|
8648
|
-
const _hoisted_1$
|
|
9555
|
+
const _hoisted_1$a = ["draggable", "data-node-id", "data-parent-id", "data-parents-id", "data-is-container"];
|
|
8649
9556
|
const _hoisted_2$3 = { class: "tree-node-label" };
|
|
8650
9557
|
const _hoisted_3$1 = { class: "tree-node-tool" };
|
|
8651
9558
|
const _hoisted_4$1 = {
|
|
@@ -8726,7 +9633,7 @@
|
|
|
8726
9633
|
onContextmenu: nodeContentmenuHandler,
|
|
8727
9634
|
onMouseenter: mouseenterHandler
|
|
8728
9635
|
}, [
|
|
8729
|
-
vue.createVNode(_sfc_main$
|
|
9636
|
+
vue.createVNode(_sfc_main$1s, {
|
|
8730
9637
|
class: "expand-icon",
|
|
8731
9638
|
style: vue.normalizeStyle(hasChildren.value ? "" : "color: transparent; cursor: default"),
|
|
8732
9639
|
icon: expanded.value ? vue.unref(iconsVue.ArrowDown) : vue.unref(iconsVue.ArrowRight),
|
|
@@ -8771,14 +9678,14 @@
|
|
|
8771
9678
|
}, 1032, ["data", "parent", "parentsId", "node-status-map", "indent"]);
|
|
8772
9679
|
}), 128))
|
|
8773
9680
|
])) : vue.createCommentVNode("", true)
|
|
8774
|
-
], 40, _hoisted_1$
|
|
9681
|
+
], 40, _hoisted_1$a)), [
|
|
8775
9682
|
[vue.vShow, visible.value]
|
|
8776
9683
|
]);
|
|
8777
9684
|
};
|
|
8778
9685
|
}
|
|
8779
9686
|
});
|
|
8780
9687
|
|
|
8781
|
-
const _hoisted_1$
|
|
9688
|
+
const _hoisted_1$9 = {
|
|
8782
9689
|
key: 1,
|
|
8783
9690
|
class: "m-editor-tree-empty"
|
|
8784
9691
|
};
|
|
@@ -8825,7 +9732,7 @@
|
|
|
8825
9732
|
]),
|
|
8826
9733
|
_: 2
|
|
8827
9734
|
}, 1032, ["data", "indent", "next-level-indent-increment", "node-status-map"]);
|
|
8828
|
-
}), 128)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
9735
|
+
}), 128)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
|
|
8829
9736
|
vue.createElementVNode("p", null, vue.toDisplayString(_ctx.emptyText), 1)
|
|
8830
9737
|
]))
|
|
8831
9738
|
], 32);
|
|
@@ -8976,7 +9883,7 @@
|
|
|
8976
9883
|
placement: "bottom"
|
|
8977
9884
|
}, {
|
|
8978
9885
|
default: vue.withCtx(() => [
|
|
8979
|
-
vue.createVNode(_sfc_main$
|
|
9886
|
+
vue.createVNode(_sfc_main$1s, {
|
|
8980
9887
|
icon: editable.value ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
|
|
8981
9888
|
class: "edit-icon",
|
|
8982
9889
|
onClick: vue.withModifiers(($event) => editCode(`${data.key}`), ["stop"])
|
|
@@ -8991,7 +9898,7 @@
|
|
|
8991
9898
|
placement: "bottom"
|
|
8992
9899
|
}, {
|
|
8993
9900
|
default: vue.withCtx(() => [
|
|
8994
|
-
vue.createVNode(_sfc_main$
|
|
9901
|
+
vue.createVNode(_sfc_main$1s, {
|
|
8995
9902
|
icon: vue.unref(iconsVue.Close),
|
|
8996
9903
|
class: "edit-icon",
|
|
8997
9904
|
onClick: vue.withModifiers(($event) => deleteCode(`${data.key}`), ["stop"])
|
|
@@ -9076,7 +9983,7 @@
|
|
|
9076
9983
|
};
|
|
9077
9984
|
};
|
|
9078
9985
|
|
|
9079
|
-
const _hoisted_1$
|
|
9986
|
+
const _hoisted_1$8 = { class: "search-wrapper" };
|
|
9080
9987
|
const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
9081
9988
|
...{
|
|
9082
9989
|
name: "MEditorCodeBlockListPanel"
|
|
@@ -9094,9 +10001,9 @@
|
|
|
9094
10001
|
const { codeBlockService } = vue.inject("services") || {};
|
|
9095
10002
|
const editable = vue.computed(() => codeBlockService?.getEditStatus());
|
|
9096
10003
|
const { codeBlockEditor, codeConfig, editCode, deleteCode, createCodeBlock, submitCodeBlockHandler } = useCodeBlockEdit(codeBlockService);
|
|
9097
|
-
const
|
|
10004
|
+
const codeBlockListRef = vue.useTemplateRef("codeBlockList");
|
|
9098
10005
|
const filterTextChangeHandler = (val) => {
|
|
9099
|
-
|
|
10006
|
+
codeBlockListRef.value?.filter(val);
|
|
9100
10007
|
};
|
|
9101
10008
|
eventBus?.on("edit-code", (id) => {
|
|
9102
10009
|
editCode(id);
|
|
@@ -9106,7 +10013,7 @@
|
|
|
9106
10013
|
menuData: contentMenuData,
|
|
9107
10014
|
contentMenuHideHandler
|
|
9108
10015
|
} = useContentMenu$1((id) => {
|
|
9109
|
-
|
|
10016
|
+
codeBlockListRef.value?.deleteCode(id);
|
|
9110
10017
|
});
|
|
9111
10018
|
const menuData = vue.computed(() => props.customContentMenu(contentMenuData, "code-block"));
|
|
9112
10019
|
return (_ctx, _cache) => {
|
|
@@ -9114,7 +10021,7 @@
|
|
|
9114
10021
|
vue.createVNode(vue.unref(designPlugin.TMagicScrollbar), { class: "m-editor-code-block-list m-editor-layer-panel" }, {
|
|
9115
10022
|
default: vue.withCtx(() => [
|
|
9116
10023
|
vue.renderSlot(_ctx.$slots, "code-block-panel-header", {}, () => [
|
|
9117
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
10024
|
+
vue.createElementVNode("div", _hoisted_1$8, [
|
|
9118
10025
|
vue.createVNode(_sfc_main$n, { onSearch: filterTextChangeHandler }),
|
|
9119
10026
|
editable.value ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicButton), {
|
|
9120
10027
|
key: 0,
|
|
@@ -9132,8 +10039,7 @@
|
|
|
9132
10039
|
])
|
|
9133
10040
|
]),
|
|
9134
10041
|
vue.createVNode(_sfc_main$k, {
|
|
9135
|
-
|
|
9136
|
-
ref: codeBlockList,
|
|
10042
|
+
ref: "codeBlockList",
|
|
9137
10043
|
"custom-error": _ctx.customError,
|
|
9138
10044
|
indent: _ctx.indent,
|
|
9139
10045
|
"next-level-indent-increment": _ctx.nextLevelIndentIncrement,
|
|
@@ -9152,7 +10058,7 @@
|
|
|
9152
10058
|
]),
|
|
9153
10059
|
_: 3
|
|
9154
10060
|
}),
|
|
9155
|
-
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
10061
|
+
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$1f, {
|
|
9156
10062
|
key: 0,
|
|
9157
10063
|
ref_key: "codeBlockEditor",
|
|
9158
10064
|
ref: codeBlockEditor,
|
|
@@ -9252,7 +10158,7 @@
|
|
|
9252
10158
|
}
|
|
9253
10159
|
});
|
|
9254
10160
|
return (_ctx, _cache) => {
|
|
9255
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
10161
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$1k, {
|
|
9256
10162
|
visible: boxVisible.value,
|
|
9257
10163
|
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => boxVisible.value = $event),
|
|
9258
10164
|
width: width.value,
|
|
@@ -9416,7 +10322,7 @@
|
|
|
9416
10322
|
placement: "bottom"
|
|
9417
10323
|
}, {
|
|
9418
10324
|
default: vue.withCtx(() => [
|
|
9419
|
-
vue.createVNode(_sfc_main$
|
|
10325
|
+
vue.createVNode(_sfc_main$1s, {
|
|
9420
10326
|
icon: editable.value ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
|
|
9421
10327
|
class: "edit-icon",
|
|
9422
10328
|
onClick: vue.withModifiers(($event) => editHandler(`${data.key}`), ["stop"])
|
|
@@ -9431,7 +10337,7 @@
|
|
|
9431
10337
|
placement: "bottom"
|
|
9432
10338
|
}, {
|
|
9433
10339
|
default: vue.withCtx(() => [
|
|
9434
|
-
vue.createVNode(_sfc_main$
|
|
10340
|
+
vue.createVNode(_sfc_main$1s, {
|
|
9435
10341
|
icon: vue.unref(iconsVue.Close),
|
|
9436
10342
|
class: "edit-icon",
|
|
9437
10343
|
onClick: vue.withModifiers(($event) => removeHandler(`${data.key}`), ["stop"])
|
|
@@ -9512,7 +10418,7 @@
|
|
|
9512
10418
|
};
|
|
9513
10419
|
};
|
|
9514
10420
|
|
|
9515
|
-
const _hoisted_1$
|
|
10421
|
+
const _hoisted_1$7 = { class: "search-wrapper" };
|
|
9516
10422
|
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
9517
10423
|
...{
|
|
9518
10424
|
name: "MEditorDataSourceListPanel"
|
|
@@ -9575,7 +10481,7 @@
|
|
|
9575
10481
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
9576
10482
|
vue.createVNode(vue.unref(designPlugin.TMagicScrollbar), { class: "data-source-list-panel m-editor-layer-panel" }, {
|
|
9577
10483
|
default: vue.withCtx(() => [
|
|
9578
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
10484
|
+
vue.createElementVNode("div", _hoisted_1$7, [
|
|
9579
10485
|
vue.createVNode(_sfc_main$n, { onSearch: filterTextChangeHandler }),
|
|
9580
10486
|
vue.unref(editable) ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicPopover), {
|
|
9581
10487
|
key: 0,
|
|
@@ -9647,7 +10553,7 @@
|
|
|
9647
10553
|
}
|
|
9648
10554
|
});
|
|
9649
10555
|
|
|
9650
|
-
const _hoisted_1$
|
|
10556
|
+
const _hoisted_1$6 = {
|
|
9651
10557
|
width: "1em",
|
|
9652
10558
|
height: "1em",
|
|
9653
10559
|
viewBox: "0 0 16 16",
|
|
@@ -9662,7 +10568,7 @@
|
|
|
9662
10568
|
__name: "FolderMinusIcon",
|
|
9663
10569
|
setup(__props) {
|
|
9664
10570
|
return (_ctx, _cache) => {
|
|
9665
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
10571
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$6, _cache[0] || (_cache[0] = [
|
|
9666
10572
|
vue.createElementVNode("path", {
|
|
9667
10573
|
"fill-rule": "evenodd",
|
|
9668
10574
|
d: "M9.828 4H2.19a1 1 0 0 0-.996 1.09l.637 7a1 1 0 0 0 .995.91H9v1H2.826a2 2 0 0 1-1.991-1.819l-.637-7a1.99 1.99 0 0 1 .342-1.31L.5 3a2 2 0 0 1 2-2h3.672a2 2 0 0 1 1.414.586l.828.828A2 2 0 0 0 9.828 3h3.982a2 2 0 0 1 1.992 2.181L15.546 8H14.54l.265-2.91A1 1 0 0 0 13.81 4H9.828zm-2.95-1.707L7.587 3H2.19c-.24 0-.47.042-.684.12L1.5 2.98a1 1 0 0 1 1-.98h3.672a1 1 0 0 1 .707.293z"
|
|
@@ -9760,7 +10666,7 @@
|
|
|
9760
10666
|
const props = __props;
|
|
9761
10667
|
const emit = __emit;
|
|
9762
10668
|
const services = vue.inject("services");
|
|
9763
|
-
const
|
|
10669
|
+
const menuRef = vue.useTemplateRef("menu");
|
|
9764
10670
|
const node = vue.computed(() => services?.editorService.get("node"));
|
|
9765
10671
|
const nodes = vue.computed(() => services?.editorService.get("nodes"));
|
|
9766
10672
|
const componentList = vue.computed(() => services?.componentListService.getList() || []);
|
|
@@ -9836,7 +10742,7 @@
|
|
|
9836
10742
|
)
|
|
9837
10743
|
);
|
|
9838
10744
|
const show = (e) => {
|
|
9839
|
-
|
|
10745
|
+
menuRef.value?.show(e);
|
|
9840
10746
|
};
|
|
9841
10747
|
__expose({
|
|
9842
10748
|
show
|
|
@@ -9844,8 +10750,7 @@
|
|
|
9844
10750
|
return (_ctx, _cache) => {
|
|
9845
10751
|
return vue.openBlock(), vue.createBlock(_sfc_main$o, {
|
|
9846
10752
|
"menu-data": menuData.value,
|
|
9847
|
-
|
|
9848
|
-
ref: menu,
|
|
10753
|
+
ref: "menu",
|
|
9849
10754
|
style: { "overflow": "initial" }
|
|
9850
10755
|
}, null, 8, ["menu-data"]);
|
|
9851
10756
|
};
|
|
@@ -9870,12 +10775,12 @@
|
|
|
9870
10775
|
};
|
|
9871
10776
|
return (_ctx, _cache) => {
|
|
9872
10777
|
return _ctx.data.type !== "page" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
9873
|
-
_ctx.data.visible === false ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
10778
|
+
_ctx.data.visible === false ? (vue.openBlock(), vue.createBlock(_sfc_main$1s, {
|
|
9874
10779
|
key: 0,
|
|
9875
10780
|
icon: vue.unref(iconsVue.Hide),
|
|
9876
10781
|
onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => setNodeVisible(true), ["stop"])),
|
|
9877
10782
|
title: "点击显示"
|
|
9878
|
-
}, null, 8, ["icon"])) : (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
10783
|
+
}, null, 8, ["icon"])) : (vue.openBlock(), vue.createBlock(_sfc_main$1s, {
|
|
9879
10784
|
key: 1,
|
|
9880
10785
|
icon: vue.unref(iconsVue.View),
|
|
9881
10786
|
onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => setNodeVisible(false), ["stop"])),
|
|
@@ -9887,7 +10792,7 @@
|
|
|
9887
10792
|
}
|
|
9888
10793
|
});
|
|
9889
10794
|
|
|
9890
|
-
const useClick = (services, isCtrlKeyDown, nodeStatusMap) => {
|
|
10795
|
+
const useClick = (services, isCtrlKeyDown, nodeStatusMap, menuRef) => {
|
|
9891
10796
|
const isMultiSelect = vue.computed(() => isCtrlKeyDown.value && !services?.editorService.get("disabledMultiSelect"));
|
|
9892
10797
|
const select = async (data) => {
|
|
9893
10798
|
if (!data.id) {
|
|
@@ -9952,9 +10857,8 @@
|
|
|
9952
10857
|
select(data);
|
|
9953
10858
|
});
|
|
9954
10859
|
};
|
|
9955
|
-
const menu = vue.useTemplateRef("menu");
|
|
9956
10860
|
return {
|
|
9957
|
-
|
|
10861
|
+
menuRef,
|
|
9958
10862
|
nodeClickHandler,
|
|
9959
10863
|
nodeContentMenuHandler(event, data) {
|
|
9960
10864
|
event.preventDefault();
|
|
@@ -9962,7 +10866,7 @@
|
|
|
9962
10866
|
if (nodes.length < 2 || !nodes.includes(data)) {
|
|
9963
10867
|
nodeClickHandler(event, data);
|
|
9964
10868
|
}
|
|
9965
|
-
|
|
10869
|
+
menuRef.value?.show(event);
|
|
9966
10870
|
},
|
|
9967
10871
|
highlightHandler
|
|
9968
10872
|
};
|
|
@@ -10363,11 +11267,11 @@
|
|
|
10363
11267
|
setup(__props) {
|
|
10364
11268
|
const services = vue.inject("services");
|
|
10365
11269
|
const editorService = services?.editorService;
|
|
10366
|
-
const
|
|
11270
|
+
const treeRef = vue.useTemplateRef("tree");
|
|
10367
11271
|
const page = vue.computed(() => editorService?.get("page"));
|
|
10368
11272
|
const nodeData = vue.computed(() => !page.value ? [] : [page.value]);
|
|
10369
11273
|
const { nodeStatusMap } = useNodeStatus(services);
|
|
10370
|
-
const { isCtrlKeyDown } = useKeybinding(services,
|
|
11274
|
+
const { isCtrlKeyDown } = useKeybinding(services, treeRef);
|
|
10371
11275
|
const filterNodeMethod = (v, data) => {
|
|
10372
11276
|
let name = "";
|
|
10373
11277
|
if (data.name) {
|
|
@@ -10389,12 +11293,12 @@
|
|
|
10389
11293
|
}
|
|
10390
11294
|
};
|
|
10391
11295
|
const { handleDragStart, handleDragEnd, handleDragLeave, handleDragOver } = useDrag(services);
|
|
11296
|
+
const menuRef = vue.useTemplateRef("menu");
|
|
10392
11297
|
const {
|
|
10393
|
-
menu,
|
|
10394
11298
|
nodeClickHandler,
|
|
10395
11299
|
nodeContentMenuHandler,
|
|
10396
11300
|
highlightHandler: mouseenterHandler
|
|
10397
|
-
} = useClick(services, isCtrlKeyDown, nodeStatusMap);
|
|
11301
|
+
} = useClick(services, isCtrlKeyDown, nodeStatusMap, menuRef);
|
|
10398
11302
|
return (_ctx, _cache) => {
|
|
10399
11303
|
return vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicScrollbar), { class: "m-editor-layer-panel" }, {
|
|
10400
11304
|
default: vue.withCtx(() => [
|
|
@@ -10403,8 +11307,7 @@
|
|
|
10403
11307
|
page.value && vue.unref(nodeStatusMap) ? (vue.openBlock(), vue.createBlock(_sfc_main$l, {
|
|
10404
11308
|
key: 0,
|
|
10405
11309
|
tabindex: "-1",
|
|
10406
|
-
|
|
10407
|
-
ref: tree,
|
|
11310
|
+
ref: "tree",
|
|
10408
11311
|
data: nodeData.value,
|
|
10409
11312
|
"node-status-map": vue.unref(nodeStatusMap),
|
|
10410
11313
|
indent: _ctx.indent,
|
|
@@ -10432,8 +11335,7 @@
|
|
|
10432
11335
|
}, 8, ["data", "node-status-map", "indent", "next-level-indent-increment", "onNodeDragover", "onNodeDragstart", "onNodeDragleave", "onNodeDragend", "onNodeContextmenu", "onNodeMouseenter", "onNodeClick"])) : vue.createCommentVNode("", true),
|
|
10433
11336
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
10434
11337
|
vue.createVNode(_sfc_main$e, {
|
|
10435
|
-
|
|
10436
|
-
ref: menu,
|
|
11338
|
+
ref: "menu",
|
|
10437
11339
|
"layer-content-menu": _ctx.layerContentMenu,
|
|
10438
11340
|
"custom-content-menu": _ctx.customContentMenu,
|
|
10439
11341
|
onCollapseAll: collapseAllHandler
|
|
@@ -10446,7 +11348,7 @@
|
|
|
10446
11348
|
}
|
|
10447
11349
|
});
|
|
10448
11350
|
|
|
10449
|
-
const _hoisted_1$
|
|
11351
|
+
const _hoisted_1$5 = ["onClick", "onDragstart"];
|
|
10450
11352
|
const _hoisted_2$2 = ["title"];
|
|
10451
11353
|
const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
10452
11354
|
...{
|
|
@@ -10536,7 +11438,7 @@
|
|
|
10536
11438
|
name: `${index}`
|
|
10537
11439
|
}, {
|
|
10538
11440
|
title: vue.withCtx(() => [
|
|
10539
|
-
vue.createVNode(_sfc_main$
|
|
11441
|
+
vue.createVNode(_sfc_main$1s, { icon: vue.unref(iconsVue.Grid) }, null, 8, ["icon"]),
|
|
10540
11442
|
vue.createTextVNode(vue.toDisplayString(group.title), 1)
|
|
10541
11443
|
]),
|
|
10542
11444
|
default: vue.withCtx(() => [
|
|
@@ -10557,7 +11459,7 @@
|
|
|
10557
11459
|
content: item.desc
|
|
10558
11460
|
}, {
|
|
10559
11461
|
default: vue.withCtx(() => [
|
|
10560
|
-
vue.createVNode(_sfc_main$
|
|
11462
|
+
vue.createVNode(_sfc_main$1s, {
|
|
10561
11463
|
icon: item.icon
|
|
10562
11464
|
}, null, 8, ["icon"])
|
|
10563
11465
|
]),
|
|
@@ -10567,7 +11469,7 @@
|
|
|
10567
11469
|
title: item.text
|
|
10568
11470
|
}, vue.toDisplayString(item.text), 9, _hoisted_2$2)
|
|
10569
11471
|
])
|
|
10570
|
-
], 40, _hoisted_1$
|
|
11472
|
+
], 40, _hoisted_1$5);
|
|
10571
11473
|
}), 128))
|
|
10572
11474
|
]),
|
|
10573
11475
|
_: 2
|
|
@@ -10585,7 +11487,7 @@
|
|
|
10585
11487
|
}
|
|
10586
11488
|
});
|
|
10587
11489
|
|
|
10588
|
-
const _hoisted_1$
|
|
11490
|
+
const _hoisted_1$4 = {
|
|
10589
11491
|
key: 0,
|
|
10590
11492
|
class: "m-editor-sidebar"
|
|
10591
11493
|
};
|
|
@@ -10735,7 +11637,7 @@
|
|
|
10735
11637
|
});
|
|
10736
11638
|
return (_ctx, _cache) => {
|
|
10737
11639
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
10738
|
-
_ctx.data.type === "tabs" && _ctx.data.items.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
11640
|
+
_ctx.data.type === "tabs" && _ctx.data.items.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [
|
|
10739
11641
|
vue.createElementVNode("div", _hoisted_2$1, [
|
|
10740
11642
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(sideBarItems.value, (config, index) => {
|
|
10741
11643
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -10748,7 +11650,7 @@
|
|
|
10748
11650
|
(...args) => vue.unref(dragstartHandler) && vue.unref(dragstartHandler)(...args)),
|
|
10749
11651
|
onDragend: ($event) => vue.unref(dragendHandler)(config.$key, $event)
|
|
10750
11652
|
}, [
|
|
10751
|
-
config.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
11653
|
+
config.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$1s, {
|
|
10752
11654
|
key: 0,
|
|
10753
11655
|
icon: config.icon
|
|
10754
11656
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
@@ -10894,7 +11796,7 @@
|
|
|
10894
11796
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
10895
11797
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(sideBarItems.value, (config, index) => {
|
|
10896
11798
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
10897
|
-
vue.unref(floatBoxStates)[config.$key]?.status ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
11799
|
+
vue.unref(floatBoxStates)[config.$key]?.status ? (vue.openBlock(), vue.createBlock(_sfc_main$1k, {
|
|
10898
11800
|
key: config.$key ?? index,
|
|
10899
11801
|
visible: vue.unref(floatBoxStates)[config.$key].status,
|
|
10900
11802
|
"onUpdate:visible": ($event) => vue.unref(floatBoxStates)[config.$key].status = $event,
|
|
@@ -10940,8 +11842,8 @@
|
|
|
10940
11842
|
setup(__props, { emit: __emit }) {
|
|
10941
11843
|
const props = __props;
|
|
10942
11844
|
const emit = __emit;
|
|
10943
|
-
const
|
|
10944
|
-
const
|
|
11845
|
+
const barEl = vue.useTemplateRef("bar");
|
|
11846
|
+
const thumbEl = vue.useTemplateRef("thumb");
|
|
10945
11847
|
const thumbSize = vue.computed(() => props.size * (props.size / props.scrollSize));
|
|
10946
11848
|
const thumbPos = vue.computed(() => props.pos / props.scrollSize * props.size);
|
|
10947
11849
|
const thumbStyle = vue.computed(() => ({
|
|
@@ -10950,9 +11852,8 @@
|
|
|
10950
11852
|
}));
|
|
10951
11853
|
let gesto;
|
|
10952
11854
|
vue.onMounted(() => {
|
|
10953
|
-
if (!
|
|
10954
|
-
|
|
10955
|
-
gesto = new Gesto(thumbEl, {
|
|
11855
|
+
if (!thumbEl.value) return;
|
|
11856
|
+
gesto = new Gesto(thumbEl.value, {
|
|
10956
11857
|
container: window
|
|
10957
11858
|
});
|
|
10958
11859
|
gesto.on("dragStart", (e) => {
|
|
@@ -10961,11 +11862,11 @@
|
|
|
10961
11862
|
}).on("drag", (e) => {
|
|
10962
11863
|
scrollBy(getDelta(e));
|
|
10963
11864
|
});
|
|
10964
|
-
|
|
11865
|
+
barEl.value?.addEventListener("wheel", wheelHandler, false);
|
|
10965
11866
|
});
|
|
10966
11867
|
vue.onBeforeUnmount(() => {
|
|
10967
11868
|
if (gesto) gesto.off();
|
|
10968
|
-
|
|
11869
|
+
barEl.value?.removeEventListener("wheel", wheelHandler, false);
|
|
10969
11870
|
});
|
|
10970
11871
|
const wheelHandler = (e) => {
|
|
10971
11872
|
const delta = props.isHorizontal ? e.deltaX : e.deltaY;
|
|
@@ -10996,13 +11897,11 @@
|
|
|
10996
11897
|
};
|
|
10997
11898
|
return (_ctx, _cache) => {
|
|
10998
11899
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
10999
|
-
|
|
11000
|
-
ref: bar,
|
|
11900
|
+
ref: "bar",
|
|
11001
11901
|
class: vue.normalizeClass(["m-editor-scroll-bar", _ctx.isHorizontal ? "horizontal" : "vertical"])
|
|
11002
11902
|
}, [
|
|
11003
11903
|
vue.createElementVNode("div", {
|
|
11004
|
-
|
|
11005
|
-
ref: thumb,
|
|
11904
|
+
ref: "thumb",
|
|
11006
11905
|
class: "m-editor-scroll-bar-thumb",
|
|
11007
11906
|
style: vue.normalizeStyle(thumbStyle.value)
|
|
11008
11907
|
}, null, 4)
|
|
@@ -11011,6 +11910,10 @@
|
|
|
11011
11910
|
}
|
|
11012
11911
|
});
|
|
11013
11912
|
|
|
11913
|
+
const _hoisted_1$3 = {
|
|
11914
|
+
class: "m-editor-scroll-viewer-container",
|
|
11915
|
+
ref: "container"
|
|
11916
|
+
};
|
|
11014
11917
|
const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
11015
11918
|
...{
|
|
11016
11919
|
name: "MEditorScrollViewer"
|
|
@@ -11029,8 +11932,8 @@
|
|
|
11029
11932
|
},
|
|
11030
11933
|
setup(__props, { expose: __expose }) {
|
|
11031
11934
|
const props = __props;
|
|
11032
|
-
const
|
|
11033
|
-
const el = vue.useTemplateRef("
|
|
11935
|
+
const containerEl = vue.useTemplateRef("container");
|
|
11936
|
+
const el = vue.useTemplateRef("target");
|
|
11034
11937
|
const style = vue.computed(
|
|
11035
11938
|
() => `
|
|
11036
11939
|
width: ${utils.isNumber(`${props.width}`) ? `${props.width}px` : props.width};
|
|
@@ -11043,9 +11946,9 @@
|
|
|
11043
11946
|
const scrollHeight = vue.ref(0);
|
|
11044
11947
|
let scrollViewer;
|
|
11045
11948
|
vue.onMounted(() => {
|
|
11046
|
-
if (!
|
|
11949
|
+
if (!containerEl.value || !el.value) return;
|
|
11047
11950
|
scrollViewer = new ScrollViewer({
|
|
11048
|
-
container:
|
|
11951
|
+
container: containerEl.value,
|
|
11049
11952
|
target: el.value,
|
|
11050
11953
|
zoom: props.zoom,
|
|
11051
11954
|
correctionScrollSize: props.correctionScrollSize
|
|
@@ -11081,17 +11984,12 @@
|
|
|
11081
11984
|
});
|
|
11082
11985
|
};
|
|
11083
11986
|
__expose({
|
|
11084
|
-
container
|
|
11987
|
+
container: containerEl
|
|
11085
11988
|
});
|
|
11086
11989
|
return (_ctx, _cache) => {
|
|
11087
|
-
return vue.openBlock(), vue.createElementBlock("div",
|
|
11088
|
-
class: "m-editor-scroll-viewer-container",
|
|
11089
|
-
ref_key: "container",
|
|
11090
|
-
ref: container
|
|
11091
|
-
}, [
|
|
11990
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
|
|
11092
11991
|
vue.createElementVNode("div", {
|
|
11093
|
-
|
|
11094
|
-
ref: el,
|
|
11992
|
+
ref: "target",
|
|
11095
11993
|
style: vue.normalizeStyle(style.value)
|
|
11096
11994
|
}, [
|
|
11097
11995
|
vue.renderSlot(_ctx.$slots, "default")
|
|
@@ -11124,8 +12022,8 @@
|
|
|
11124
12022
|
const editorService = services?.editorService;
|
|
11125
12023
|
const visible = vue.ref(false);
|
|
11126
12024
|
const buttonVisible = vue.ref(false);
|
|
11127
|
-
const
|
|
11128
|
-
const
|
|
12025
|
+
const buttonEl = vue.useTemplateRef("button");
|
|
12026
|
+
const boxRef = vue.useTemplateRef("box");
|
|
11129
12027
|
const stage = vue.computed(() => editorService?.get("stage"));
|
|
11130
12028
|
const page = vue.computed(() => editorService?.get("page"));
|
|
11131
12029
|
const nodes = vue.computed(() => editorService?.get("nodes") || []);
|
|
@@ -11170,12 +12068,12 @@
|
|
|
11170
12068
|
top: 0
|
|
11171
12069
|
});
|
|
11172
12070
|
vue.watch(visible, async (visible2) => {
|
|
11173
|
-
if (!
|
|
12071
|
+
if (!buttonEl.value || !visible2) {
|
|
11174
12072
|
return;
|
|
11175
12073
|
}
|
|
11176
12074
|
await vue.nextTick();
|
|
11177
|
-
const rect =
|
|
11178
|
-
const height =
|
|
12075
|
+
const rect = buttonEl.value.getBoundingClientRect();
|
|
12076
|
+
const height = boxRef.value?.target?.clientHeight || 0;
|
|
11179
12077
|
menuPosition.value = {
|
|
11180
12078
|
left: rect.left + rect.width + 5,
|
|
11181
12079
|
top: rect.top - height / 2 + rect.height / 2
|
|
@@ -11189,18 +12087,16 @@
|
|
|
11189
12087
|
}, {
|
|
11190
12088
|
default: vue.withCtx(() => [
|
|
11191
12089
|
vue.createElementVNode("div", {
|
|
11192
|
-
|
|
11193
|
-
ref: button,
|
|
12090
|
+
ref: "button",
|
|
11194
12091
|
class: "m-editor-stage-float-button",
|
|
11195
12092
|
onClick: _cache[0] || (_cache[0] = ($event) => visible.value = true)
|
|
11196
12093
|
}, "可选组件", 512)
|
|
11197
12094
|
]),
|
|
11198
12095
|
_: 1
|
|
11199
12096
|
})) : vue.createCommentVNode("", true),
|
|
11200
|
-
page.value && vue.unref(nodeStatusMap) && buttonVisible.value ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
12097
|
+
page.value && vue.unref(nodeStatusMap) && buttonVisible.value ? (vue.openBlock(), vue.createBlock(_sfc_main$1k, {
|
|
11201
12098
|
key: 1,
|
|
11202
|
-
|
|
11203
|
-
ref: box,
|
|
12099
|
+
ref: "box",
|
|
11204
12100
|
visible: visible.value,
|
|
11205
12101
|
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => visible.value = $event),
|
|
11206
12102
|
title: "当前位置下的组件",
|
|
@@ -11226,7 +12122,7 @@
|
|
|
11226
12122
|
setup(__props) {
|
|
11227
12123
|
const services = vue.inject("services");
|
|
11228
12124
|
const stageOptions = vue.inject("stageOptions");
|
|
11229
|
-
const
|
|
12125
|
+
const stageOverlayEl = vue.useTemplateRef("stageOverlay");
|
|
11230
12126
|
const stageOverlayVisible = vue.computed(() => services?.stageOverlayService.get("stageOverlayVisible"));
|
|
11231
12127
|
const wrapWidth = vue.computed(() => services?.stageOverlayService.get("wrapWidth") || 0);
|
|
11232
12128
|
const wrapHeight = vue.computed(() => services?.stageOverlayService.get("wrapHeight") || 0);
|
|
@@ -11245,12 +12141,12 @@
|
|
|
11245
12141
|
services?.stageOverlayService.closeOverlay();
|
|
11246
12142
|
}
|
|
11247
12143
|
});
|
|
11248
|
-
vue.watch(
|
|
12144
|
+
vue.watch(stageOverlayEl, (stageOverlay) => {
|
|
11249
12145
|
if (!services) return;
|
|
11250
12146
|
const subStage = services.stageOverlayService.createStage(stageOptions);
|
|
11251
12147
|
services?.stageOverlayService.set("stage", subStage);
|
|
11252
|
-
if (
|
|
11253
|
-
subStage.mount(
|
|
12148
|
+
if (stageOverlay && subStage) {
|
|
12149
|
+
subStage.mount(stageOverlay);
|
|
11254
12150
|
const { mask, renderer } = subStage;
|
|
11255
12151
|
const { contentWindow } = renderer;
|
|
11256
12152
|
mask?.showRule(false);
|
|
@@ -11282,8 +12178,7 @@
|
|
|
11282
12178
|
_: 1
|
|
11283
12179
|
}),
|
|
11284
12180
|
vue.createElementVNode("div", {
|
|
11285
|
-
|
|
11286
|
-
ref: stageOverlay,
|
|
12181
|
+
ref: "stageOverlay",
|
|
11287
12182
|
class: "m-editor-stage-overlay-container",
|
|
11288
12183
|
style: vue.normalizeStyle(style.value),
|
|
11289
12184
|
onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
@@ -11347,7 +12242,7 @@
|
|
|
11347
12242
|
const props = __props;
|
|
11348
12243
|
const services = vue.inject("services");
|
|
11349
12244
|
const editorService = services?.editorService;
|
|
11350
|
-
const
|
|
12245
|
+
const menuRef = vue.useTemplateRef("menu");
|
|
11351
12246
|
const canCenter = vue.ref(false);
|
|
11352
12247
|
const node = vue.computed(() => editorService?.get("node"));
|
|
11353
12248
|
const nodes = vue.computed(() => editorService?.get("nodes"));
|
|
@@ -11366,7 +12261,7 @@
|
|
|
11366
12261
|
}
|
|
11367
12262
|
},
|
|
11368
12263
|
useCopyMenu(),
|
|
11369
|
-
usePasteMenu(
|
|
12264
|
+
usePasteMenu(menuRef),
|
|
11370
12265
|
{
|
|
11371
12266
|
type: "divider",
|
|
11372
12267
|
direction: "horizontal",
|
|
@@ -11448,14 +12343,13 @@
|
|
|
11448
12343
|
{ immediate: true }
|
|
11449
12344
|
);
|
|
11450
12345
|
const show = (e) => {
|
|
11451
|
-
|
|
12346
|
+
menuRef.value?.show(e);
|
|
11452
12347
|
};
|
|
11453
12348
|
__expose({ show });
|
|
11454
12349
|
return (_ctx, _cache) => {
|
|
11455
12350
|
return vue.openBlock(), vue.createBlock(_sfc_main$o, {
|
|
11456
12351
|
"menu-data": menuData.value,
|
|
11457
|
-
|
|
11458
|
-
ref: menu
|
|
12352
|
+
ref: "menu"
|
|
11459
12353
|
}, null, 8, ["menu-data"]);
|
|
11460
12354
|
};
|
|
11461
12355
|
}
|
|
@@ -11478,9 +12372,9 @@
|
|
|
11478
12372
|
let runtime = null;
|
|
11479
12373
|
const services = vue.inject("services");
|
|
11480
12374
|
const stageLoading = vue.computed(() => services?.editorService.get("stageLoading") || false);
|
|
11481
|
-
const
|
|
11482
|
-
const
|
|
11483
|
-
const
|
|
12375
|
+
const stageWrapRef = vue.useTemplateRef("stageWrap");
|
|
12376
|
+
const stageContainerEl = vue.useTemplateRef("stageContainer");
|
|
12377
|
+
const menuRef = vue.useTemplateRef("menu");
|
|
11484
12378
|
const nodes = vue.computed(() => services?.editorService.get("nodes") || []);
|
|
11485
12379
|
const isMultiSelect = vue.computed(() => nodes.value.length > 1);
|
|
11486
12380
|
const stageRect = vue.computed(() => services?.uiService.get("stageRect"));
|
|
@@ -11491,14 +12385,14 @@
|
|
|
11491
12385
|
const node = vue.computed(() => services?.editorService.get("node"));
|
|
11492
12386
|
vue.watchEffect(() => {
|
|
11493
12387
|
if (stage || !page.value) return;
|
|
11494
|
-
if (!
|
|
12388
|
+
if (!stageContainerEl.value) return;
|
|
11495
12389
|
if (!(props.stageOptions?.runtimeUrl || props.stageOptions?.render) || !root.value) return;
|
|
11496
12390
|
stage = useStage(props.stageOptions);
|
|
11497
12391
|
stage.on("select", () => {
|
|
11498
|
-
|
|
12392
|
+
stageWrapRef.value?.container?.focus();
|
|
11499
12393
|
});
|
|
11500
12394
|
services?.editorService.set("stage", vue.markRaw(stage));
|
|
11501
|
-
stage.mount(
|
|
12395
|
+
stage.mount(stageContainerEl.value);
|
|
11502
12396
|
if (!node.value?.id) {
|
|
11503
12397
|
return;
|
|
11504
12398
|
}
|
|
@@ -11551,9 +12445,9 @@
|
|
|
11551
12445
|
}
|
|
11552
12446
|
});
|
|
11553
12447
|
vue.onMounted(() => {
|
|
11554
|
-
if (
|
|
11555
|
-
resizeObserver.observe(
|
|
11556
|
-
services?.keybindingService.registerEl(KeyBindingContainerKey.STAGE,
|
|
12448
|
+
if (stageWrapRef.value?.container) {
|
|
12449
|
+
resizeObserver.observe(stageWrapRef.value.container);
|
|
12450
|
+
services?.keybindingService.registerEl(KeyBindingContainerKey.STAGE, stageWrapRef.value.container);
|
|
11557
12451
|
}
|
|
11558
12452
|
});
|
|
11559
12453
|
vue.onBeforeUnmount(() => {
|
|
@@ -11566,7 +12460,7 @@
|
|
|
11566
12460
|
const parseDSL = getEditorConfig("parseDSL");
|
|
11567
12461
|
const contextmenuHandler = (e) => {
|
|
11568
12462
|
e.preventDefault();
|
|
11569
|
-
|
|
12463
|
+
menuRef.value?.show(e);
|
|
11570
12464
|
};
|
|
11571
12465
|
const dragoverHandler = (e) => {
|
|
11572
12466
|
if (!e.dataTransfer) return;
|
|
@@ -11589,9 +12483,9 @@
|
|
|
11589
12483
|
if (parentId) {
|
|
11590
12484
|
parent = services?.editorService.getNodeById(parentId, false);
|
|
11591
12485
|
}
|
|
11592
|
-
if (parent &&
|
|
12486
|
+
if (parent && stageContainerEl.value && stage) {
|
|
11593
12487
|
const layout = await services?.editorService.getLayout(parent);
|
|
11594
|
-
const containerRect =
|
|
12488
|
+
const containerRect = stageContainerEl.value.getBoundingClientRect();
|
|
11595
12489
|
const { scrollTop, scrollLeft } = stage.mask;
|
|
11596
12490
|
const { style = {} } = config.data;
|
|
11597
12491
|
let top = 0;
|
|
@@ -11625,8 +12519,7 @@
|
|
|
11625
12519
|
const _directive_loading = vue.resolveDirective("loading");
|
|
11626
12520
|
return vue.withDirectives((vue.openBlock(), vue.createBlock(_sfc_main$8, {
|
|
11627
12521
|
class: "m-editor-stage",
|
|
11628
|
-
|
|
11629
|
-
ref: stageWrap,
|
|
12522
|
+
ref: "stageWrap",
|
|
11630
12523
|
tabindex: "-1",
|
|
11631
12524
|
"element-loading-text": "Runtime 加载中...",
|
|
11632
12525
|
width: stageRect.value?.width,
|
|
@@ -11638,14 +12531,13 @@
|
|
|
11638
12531
|
width: 60,
|
|
11639
12532
|
height: 50
|
|
11640
12533
|
},
|
|
11641
|
-
onClick: _cache[0] || (_cache[0] = ($event) => vue.unref(
|
|
12534
|
+
onClick: _cache[0] || (_cache[0] = ($event) => vue.unref(stageWrapRef)?.container?.focus())
|
|
11642
12535
|
}, {
|
|
11643
12536
|
content: vue.withCtx(() => [
|
|
11644
12537
|
!_ctx.disabledStageOverlay ? (vue.openBlock(), vue.createBlock(_sfc_main$6, { key: 0 })) : vue.createCommentVNode("", true),
|
|
11645
12538
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
11646
12539
|
vue.createVNode(_sfc_main$4, {
|
|
11647
|
-
|
|
11648
|
-
ref: menu,
|
|
12540
|
+
ref: "menu",
|
|
11649
12541
|
"is-multi-select": isMultiSelect.value,
|
|
11650
12542
|
"stage-content-menu": _ctx.stageContentMenu,
|
|
11651
12543
|
"custom-content-menu": _ctx.customContentMenu
|
|
@@ -11655,8 +12547,7 @@
|
|
|
11655
12547
|
default: vue.withCtx(() => [
|
|
11656
12548
|
vue.createElementVNode("div", {
|
|
11657
12549
|
class: "m-editor-stage-container",
|
|
11658
|
-
|
|
11659
|
-
ref: stageContainer,
|
|
12550
|
+
ref: "stageContainer",
|
|
11660
12551
|
style: vue.normalizeStyle(`transform: scale(${zoom.value});`),
|
|
11661
12552
|
onContextmenu: contextmenuHandler,
|
|
11662
12553
|
onDrop: dropHandler,
|
|
@@ -11997,7 +12888,7 @@
|
|
|
11997
12888
|
const codeBlockService = new CodeBlock();
|
|
11998
12889
|
|
|
11999
12890
|
class ComponentList extends BaseService {
|
|
12000
|
-
state = vue.
|
|
12891
|
+
state = vue.shallowReactive({
|
|
12001
12892
|
list: []
|
|
12002
12893
|
});
|
|
12003
12894
|
constructor() {
|
|
@@ -12178,7 +13069,7 @@
|
|
|
12178
13069
|
|
|
12179
13070
|
const idleTask = new IdleTask();
|
|
12180
13071
|
class Dep extends BaseService {
|
|
12181
|
-
state = vue.
|
|
13072
|
+
state = vue.shallowReactive({
|
|
12182
13073
|
collecting: false
|
|
12183
13074
|
});
|
|
12184
13075
|
watcher = new core.Watcher({ initialTargets: vue.reactive({}) });
|
|
@@ -12220,6 +13111,7 @@
|
|
|
12220
13111
|
});
|
|
12221
13112
|
this.set("collecting", false);
|
|
12222
13113
|
this.emit("collected", nodes, deep);
|
|
13114
|
+
this.emit("ds-collected", nodes, deep);
|
|
12223
13115
|
}
|
|
12224
13116
|
collectIdle(nodes, depExtendedData = {}, deep = false, type) {
|
|
12225
13117
|
this.set("collecting", true);
|
|
@@ -12240,6 +13132,9 @@
|
|
|
12240
13132
|
this.set("collecting", false);
|
|
12241
13133
|
resolve();
|
|
12242
13134
|
});
|
|
13135
|
+
idleTask.once("hight-level-finish", () => {
|
|
13136
|
+
this.emit("ds-collected", nodes, deep);
|
|
13137
|
+
});
|
|
12243
13138
|
});
|
|
12244
13139
|
}
|
|
12245
13140
|
collectNode(node, target, depExtendedData = {}, deep = false) {
|
|
@@ -12287,7 +13182,8 @@
|
|
|
12287
13182
|
node,
|
|
12288
13183
|
deep: false,
|
|
12289
13184
|
target
|
|
12290
|
-
}
|
|
13185
|
+
},
|
|
13186
|
+
target.type === core.DepTargetType.DATA_SOURCE
|
|
12291
13187
|
);
|
|
12292
13188
|
if (deep && Array.isArray(node.items) && node.items.length) {
|
|
12293
13189
|
node.items.forEach((item) => {
|
|
@@ -12534,7 +13430,7 @@
|
|
|
12534
13430
|
sync: ["openOverlay", "closeOverlay", "updateOverlay", "createStage"]
|
|
12535
13431
|
};
|
|
12536
13432
|
class StageOverlay extends BaseService {
|
|
12537
|
-
state = vue.
|
|
13433
|
+
state = vue.shallowReactive({
|
|
12538
13434
|
wrapDiv: document.createElement("div"),
|
|
12539
13435
|
sourceEl: null,
|
|
12540
13436
|
contentEl: null,
|
|
@@ -12902,57 +13798,39 @@
|
|
|
12902
13798
|
stage2.on("rerender", () => {
|
|
12903
13799
|
const node = editorService.get("node");
|
|
12904
13800
|
if (!node) return;
|
|
12905
|
-
collectIdle([node], true)
|
|
12906
|
-
|
|
12907
|
-
});
|
|
13801
|
+
collectIdle([node], true);
|
|
13802
|
+
updateStage([node]);
|
|
12908
13803
|
});
|
|
12909
13804
|
});
|
|
12910
|
-
const getApp = () =>
|
|
12911
|
-
|
|
12912
|
-
|
|
12913
|
-
|
|
12914
|
-
if (root && app?.dsl) {
|
|
12915
|
-
app.dsl.dataSourceDeps = root.dataSourceDeps;
|
|
12916
|
-
app.dsl.dataSourceCondDeps = root.dataSourceCondDeps;
|
|
12917
|
-
app.dsl.dataSources = root.dataSources;
|
|
13805
|
+
const getApp = () => {
|
|
13806
|
+
const renderer = stage.value?.renderer;
|
|
13807
|
+
if (!renderer) {
|
|
13808
|
+
return void 0;
|
|
12918
13809
|
}
|
|
12919
|
-
if (
|
|
12920
|
-
getApp
|
|
13810
|
+
if (renderer.runtime) {
|
|
13811
|
+
return renderer.runtime.getApp?.();
|
|
12921
13812
|
}
|
|
12922
|
-
|
|
12923
|
-
|
|
12924
|
-
|
|
12925
|
-
|
|
12926
|
-
|
|
12927
|
-
|
|
12928
|
-
|
|
12929
|
-
|
|
12930
|
-
|
|
12931
|
-
});
|
|
12932
|
-
} else {
|
|
12933
|
-
allNodes.push(...nodes);
|
|
12934
|
-
}
|
|
12935
|
-
const deps = Object.values(root.dataSourceDeps || {});
|
|
12936
|
-
deps.forEach((dep) => {
|
|
12937
|
-
Object.keys(dep).forEach((id) => {
|
|
12938
|
-
const node = allNodes.find((node2) => node2.id === id);
|
|
12939
|
-
node && stage.value?.update({
|
|
12940
|
-
config: lodashEs.cloneDeep(node),
|
|
12941
|
-
parentId: editorService.getParentById(node.id)?.id,
|
|
12942
|
-
root: lodashEs.cloneDeep(root)
|
|
12943
|
-
});
|
|
13813
|
+
return new Promise((resolve) => {
|
|
13814
|
+
const timeout = globalThis.setTimeout(() => {
|
|
13815
|
+
resolve(void 0);
|
|
13816
|
+
}, 1e4);
|
|
13817
|
+
renderer.on("runtime-ready", () => {
|
|
13818
|
+
if (timeout) {
|
|
13819
|
+
globalThis.clearTimeout(timeout);
|
|
13820
|
+
}
|
|
13821
|
+
resolve(renderer.runtime?.getApp?.());
|
|
12944
13822
|
});
|
|
12945
13823
|
});
|
|
12946
13824
|
};
|
|
12947
|
-
const
|
|
13825
|
+
const updateDataSourceSchema = async () => {
|
|
12948
13826
|
const root = editorService.get("root");
|
|
12949
|
-
|
|
12950
|
-
|
|
12951
|
-
|
|
12952
|
-
|
|
12953
|
-
|
|
12954
|
-
|
|
12955
|
-
|
|
13827
|
+
const app = await getApp();
|
|
13828
|
+
if (root && app?.dsl) {
|
|
13829
|
+
app.dsl.dataSourceDeps = root.dataSourceDeps;
|
|
13830
|
+
app.dsl.dataSources = root.dataSources;
|
|
13831
|
+
}
|
|
13832
|
+
if (root?.dataSources) {
|
|
13833
|
+
app?.dataSourceManager?.updateSchema(root.dataSources);
|
|
12956
13834
|
}
|
|
12957
13835
|
};
|
|
12958
13836
|
const targetAddHandler = (target) => {
|
|
@@ -12981,17 +13859,58 @@
|
|
|
12981
13859
|
delete root.dataSourceCondDeps[id];
|
|
12982
13860
|
}
|
|
12983
13861
|
};
|
|
12984
|
-
const
|
|
13862
|
+
const updateStage = (nodes, inDeps = false) => {
|
|
13863
|
+
const root = editorService.get("root");
|
|
13864
|
+
if (!root) return;
|
|
13865
|
+
const update = (node) => stage.value?.update({
|
|
13866
|
+
config: lodashEs.cloneDeep(node),
|
|
13867
|
+
parentId: editorService.getParentById(node.id)?.id,
|
|
13868
|
+
root: lodashEs.cloneDeep(root)
|
|
13869
|
+
});
|
|
13870
|
+
nodes.forEach((node) => {
|
|
13871
|
+
const inDepsNodeId = [];
|
|
13872
|
+
const deps = Object.values(root.dataSourceDeps || {});
|
|
13873
|
+
deps.forEach((dep) => {
|
|
13874
|
+
Object.keys(dep).forEach((id) => {
|
|
13875
|
+
inDepsNodeId.push(id);
|
|
13876
|
+
});
|
|
13877
|
+
});
|
|
13878
|
+
if (inDeps) {
|
|
13879
|
+
if (inDepsNodeId.includes(node.id)) {
|
|
13880
|
+
update(node);
|
|
13881
|
+
}
|
|
13882
|
+
} else {
|
|
13883
|
+
if (!inDepsNodeId.includes(node.id)) {
|
|
13884
|
+
update(node);
|
|
13885
|
+
}
|
|
13886
|
+
}
|
|
13887
|
+
});
|
|
13888
|
+
};
|
|
13889
|
+
const dsDepCollectedHandler = async (nodes, deep) => {
|
|
12985
13890
|
const root = editorService.get("root");
|
|
12986
13891
|
if (!root) return;
|
|
12987
|
-
const app = getApp();
|
|
13892
|
+
const app = await getApp();
|
|
12988
13893
|
if (app?.dsl) {
|
|
12989
13894
|
app.dsl.dataSourceDeps = root.dataSourceDeps;
|
|
12990
13895
|
}
|
|
13896
|
+
if (deep) {
|
|
13897
|
+
nodes.forEach((node) => {
|
|
13898
|
+
utils.traverseNode(
|
|
13899
|
+
node,
|
|
13900
|
+
(node2) => {
|
|
13901
|
+
updateStage([node2], true);
|
|
13902
|
+
},
|
|
13903
|
+
[],
|
|
13904
|
+
true
|
|
13905
|
+
);
|
|
13906
|
+
});
|
|
13907
|
+
} else {
|
|
13908
|
+
updateStage(nodes, true);
|
|
13909
|
+
}
|
|
12991
13910
|
};
|
|
12992
13911
|
depService.on("add-target", targetAddHandler);
|
|
12993
13912
|
depService.on("remove-target", targetRemoveHandler);
|
|
12994
|
-
depService.on("collected",
|
|
13913
|
+
depService.on("ds-collected", dsDepCollectedHandler);
|
|
12995
13914
|
const initDataSourceDepTarget = (ds) => {
|
|
12996
13915
|
depService.addTarget(core.createDataSourceTarget(ds, vue.reactive({})));
|
|
12997
13916
|
depService.addTarget(core.createDataSourceMethodTarget(ds, vue.reactive({})));
|
|
@@ -13010,9 +13929,8 @@
|
|
|
13010
13929
|
})
|
|
13011
13930
|
);
|
|
13012
13931
|
const nodeAddHandler = (nodes) => {
|
|
13013
|
-
collectIdle(nodes, true)
|
|
13014
|
-
|
|
13015
|
-
});
|
|
13932
|
+
collectIdle(nodes, true);
|
|
13933
|
+
updateStage(nodes);
|
|
13016
13934
|
};
|
|
13017
13935
|
const nodeUpdateHandler = (data) => {
|
|
13018
13936
|
const needRecollectNodes = [];
|
|
@@ -13033,11 +13951,10 @@
|
|
|
13033
13951
|
}
|
|
13034
13952
|
});
|
|
13035
13953
|
if (needRecollectNodes.length) {
|
|
13036
|
-
collectIdle(needRecollectNodes, true)
|
|
13037
|
-
|
|
13038
|
-
});
|
|
13954
|
+
collectIdle(needRecollectNodes, true);
|
|
13955
|
+
updateStage(needRecollectNodes);
|
|
13039
13956
|
} else if (normalNodes.length) {
|
|
13040
|
-
|
|
13957
|
+
updateStage(normalNodes);
|
|
13041
13958
|
}
|
|
13042
13959
|
};
|
|
13043
13960
|
const nodeRemoveHandler = (nodes) => {
|
|
@@ -13045,7 +13962,7 @@
|
|
|
13045
13962
|
};
|
|
13046
13963
|
const historyChangeHandler = (page) => {
|
|
13047
13964
|
collectIdle([page], true).then(() => {
|
|
13048
|
-
updateDataSourceSchema(
|
|
13965
|
+
updateDataSourceSchema();
|
|
13049
13966
|
});
|
|
13050
13967
|
};
|
|
13051
13968
|
editorService.on("history-change", historyChangeHandler);
|
|
@@ -13065,11 +13982,12 @@
|
|
|
13065
13982
|
};
|
|
13066
13983
|
codeBlockService.on("addOrUpdate", codeBlockAddOrUpdateHandler);
|
|
13067
13984
|
codeBlockService.on("remove", codeBlockRemoveHandler);
|
|
13068
|
-
const dataSourceAddHandler = (config) => {
|
|
13985
|
+
const dataSourceAddHandler = async (config) => {
|
|
13069
13986
|
initDataSourceDepTarget(config);
|
|
13070
|
-
getApp()
|
|
13987
|
+
const app = await getApp();
|
|
13988
|
+
app?.dataSourceManager?.addDataSource(config);
|
|
13071
13989
|
};
|
|
13072
|
-
const dataSourceUpdateHandler = (config, { changeRecords }) => {
|
|
13990
|
+
const dataSourceUpdateHandler = async (config, { changeRecords }) => {
|
|
13073
13991
|
let needRecollectDep = false;
|
|
13074
13992
|
for (const changeRecord of changeRecords) {
|
|
13075
13993
|
if (!changeRecord.propPath) {
|
|
@@ -13087,11 +14005,12 @@
|
|
|
13087
14005
|
removeDataSourceTarget(config.id);
|
|
13088
14006
|
initDataSourceDepTarget(config);
|
|
13089
14007
|
collectIdle(root.items, true).then(() => {
|
|
13090
|
-
updateDataSourceSchema(
|
|
14008
|
+
updateDataSourceSchema();
|
|
13091
14009
|
});
|
|
13092
14010
|
}
|
|
13093
14011
|
} else if (root?.dataSources) {
|
|
13094
|
-
getApp()
|
|
14012
|
+
const app = await getApp();
|
|
14013
|
+
app?.dataSourceManager?.updateSchema(root.dataSources);
|
|
13095
14014
|
}
|
|
13096
14015
|
};
|
|
13097
14016
|
const removeDataSourceTarget = (id) => {
|
|
@@ -13104,7 +14023,7 @@
|
|
|
13104
14023
|
const nodeIds = Object.keys(root?.dataSourceDeps?.[id] || {});
|
|
13105
14024
|
const nodes = utils.getNodes(nodeIds, root?.items);
|
|
13106
14025
|
collectIdle(nodes, false).then(() => {
|
|
13107
|
-
updateDataSourceSchema(
|
|
14026
|
+
updateDataSourceSchema();
|
|
13108
14027
|
});
|
|
13109
14028
|
removeDataSourceTarget(id);
|
|
13110
14029
|
};
|
|
@@ -13114,7 +14033,7 @@
|
|
|
13114
14033
|
vue.onBeforeUnmount(() => {
|
|
13115
14034
|
depService.off("add-target", targetAddHandler);
|
|
13116
14035
|
depService.off("remove-target", targetRemoveHandler);
|
|
13117
|
-
depService.off("collected",
|
|
14036
|
+
depService.off("ds-collected", dsDepCollectedHandler);
|
|
13118
14037
|
editorService.off("history-change", historyChangeHandler);
|
|
13119
14038
|
editorService.off("root-change", rootChangeHandler);
|
|
13120
14039
|
editorService.off("add", nodeAddHandler);
|
|
@@ -13375,24 +14294,25 @@
|
|
|
13375
14294
|
app.config.globalProperties.$TMAGIC_EDITOR = option;
|
|
13376
14295
|
setEditorConfig(option);
|
|
13377
14296
|
app.component(`${_sfc_main.name || "MEditor"}`, _sfc_main);
|
|
13378
|
-
app.component("magic-code-editor", _sfc_main$
|
|
14297
|
+
app.component("magic-code-editor", _sfc_main$1r);
|
|
13379
14298
|
app.component("m-fields-ui-select", _sfc_main$C);
|
|
13380
|
-
app.component("m-fields-code-link", _sfc_main$
|
|
13381
|
-
app.component("m-fields-vs-code", _sfc_main$
|
|
13382
|
-
app.component("m-fields-code-select", _sfc_main$
|
|
13383
|
-
app.component("m-fields-code-select-col", _sfc_main$
|
|
13384
|
-
app.component("m-fields-event-select", _sfc_main$
|
|
13385
|
-
app.component("m-fields-data-source-fields", _sfc_main$
|
|
13386
|
-
app.component("m-fields-data-source-mocks", _sfc_main$
|
|
13387
|
-
app.component("m-fields-key-value", _sfc_main$
|
|
13388
|
-
app.component("m-fields-data-source-input", _sfc_main$
|
|
13389
|
-
app.component("m-fields-data-source-select", _sfc_main$
|
|
13390
|
-
app.component("m-fields-data-source-methods", _sfc_main$
|
|
13391
|
-
app.component("m-fields-data-source-method-select", _sfc_main$
|
|
13392
|
-
app.component("m-fields-data-source-field-select", _sfc_main$
|
|
13393
|
-
app.component("m-fields-page-fragment-select", _sfc_main$
|
|
13394
|
-
app.component("m-fields-display-conds", _sfc_main$
|
|
13395
|
-
app.component("m-fields-cond-op-select", _sfc_main$
|
|
14299
|
+
app.component("m-fields-code-link", _sfc_main$1p);
|
|
14300
|
+
app.component("m-fields-vs-code", _sfc_main$1q);
|
|
14301
|
+
app.component("m-fields-code-select", _sfc_main$1o);
|
|
14302
|
+
app.component("m-fields-code-select-col", _sfc_main$1m);
|
|
14303
|
+
app.component("m-fields-event-select", _sfc_main$19);
|
|
14304
|
+
app.component("m-fields-data-source-fields", _sfc_main$1j);
|
|
14305
|
+
app.component("m-fields-data-source-mocks", _sfc_main$1c);
|
|
14306
|
+
app.component("m-fields-key-value", _sfc_main$17);
|
|
14307
|
+
app.component("m-fields-data-source-input", _sfc_main$1g);
|
|
14308
|
+
app.component("m-fields-data-source-select", _sfc_main$1b);
|
|
14309
|
+
app.component("m-fields-data-source-methods", _sfc_main$1e);
|
|
14310
|
+
app.component("m-fields-data-source-method-select", _sfc_main$1d);
|
|
14311
|
+
app.component("m-fields-data-source-field-select", _sfc_main$1h);
|
|
14312
|
+
app.component("m-fields-page-fragment-select", _sfc_main$16);
|
|
14313
|
+
app.component("m-fields-display-conds", _sfc_main$1a);
|
|
14314
|
+
app.component("m-fields-cond-op-select", _sfc_main$1l);
|
|
14315
|
+
app.component("m-form-style-setter", _sfc_main$D);
|
|
13396
14316
|
}
|
|
13397
14317
|
};
|
|
13398
14318
|
|
|
@@ -13408,47 +14328,48 @@
|
|
|
13408
14328
|
exports.COPY_CODE_STORAGE_KEY = COPY_CODE_STORAGE_KEY;
|
|
13409
14329
|
exports.COPY_DS_STORAGE_KEY = COPY_DS_STORAGE_KEY;
|
|
13410
14330
|
exports.COPY_STORAGE_KEY = COPY_STORAGE_KEY;
|
|
13411
|
-
exports.CodeBlockEditor = _sfc_main$
|
|
14331
|
+
exports.CodeBlockEditor = _sfc_main$1f;
|
|
13412
14332
|
exports.CodeBlockList = _sfc_main$k;
|
|
13413
14333
|
exports.CodeBlockListPanel = _sfc_main$j;
|
|
13414
14334
|
exports.CodeDeleteErrorType = CodeDeleteErrorType;
|
|
13415
|
-
exports.CodeSelect = _sfc_main$
|
|
13416
|
-
exports.CodeSelectCol = _sfc_main$
|
|
14335
|
+
exports.CodeSelect = _sfc_main$1o;
|
|
14336
|
+
exports.CodeSelectCol = _sfc_main$1m;
|
|
13417
14337
|
exports.ColumnLayout = ColumnLayout;
|
|
13418
14338
|
exports.ComponentListPanel = _sfc_main$b;
|
|
13419
|
-
exports.CondOpSelect = _sfc_main$
|
|
14339
|
+
exports.CondOpSelect = _sfc_main$1l;
|
|
13420
14340
|
exports.ContentMenu = _sfc_main$o;
|
|
13421
14341
|
exports.DataSourceConfigPanel = _sfc_main$i;
|
|
13422
|
-
exports.DataSourceFieldSelect = _sfc_main$
|
|
13423
|
-
exports.DataSourceFields = _sfc_main$
|
|
13424
|
-
exports.DataSourceInput = _sfc_main$
|
|
13425
|
-
exports.DataSourceMethodSelect = _sfc_main$
|
|
13426
|
-
exports.DataSourceMethods = _sfc_main$
|
|
13427
|
-
exports.DataSourceMocks = _sfc_main$
|
|
13428
|
-
exports.DataSourceSelect = _sfc_main$
|
|
13429
|
-
exports.DisplayConds = _sfc_main$
|
|
14342
|
+
exports.DataSourceFieldSelect = _sfc_main$1h;
|
|
14343
|
+
exports.DataSourceFields = _sfc_main$1j;
|
|
14344
|
+
exports.DataSourceInput = _sfc_main$1g;
|
|
14345
|
+
exports.DataSourceMethodSelect = _sfc_main$1d;
|
|
14346
|
+
exports.DataSourceMethods = _sfc_main$1e;
|
|
14347
|
+
exports.DataSourceMocks = _sfc_main$1c;
|
|
14348
|
+
exports.DataSourceSelect = _sfc_main$1b;
|
|
14349
|
+
exports.DisplayConds = _sfc_main$1a;
|
|
13430
14350
|
exports.DragType = DragType;
|
|
13431
|
-
exports.EventSelect = _sfc_main$
|
|
14351
|
+
exports.EventSelect = _sfc_main$19;
|
|
13432
14352
|
exports.Fixed2Other = Fixed2Other;
|
|
13433
|
-
exports.FloatingBox = _sfc_main$
|
|
14353
|
+
exports.FloatingBox = _sfc_main$1k;
|
|
13434
14354
|
exports.H_GUIDE_LINE_STORAGE_KEY = H_GUIDE_LINE_STORAGE_KEY;
|
|
13435
|
-
exports.Icon = _sfc_main$
|
|
14355
|
+
exports.Icon = _sfc_main$1s;
|
|
13436
14356
|
exports.IdleTask = IdleTask;
|
|
13437
14357
|
exports.KeyBindingCommand = KeyBindingCommand;
|
|
13438
|
-
exports.KeyValue = _sfc_main$
|
|
14358
|
+
exports.KeyValue = _sfc_main$17;
|
|
13439
14359
|
exports.Keys = Keys;
|
|
13440
14360
|
exports.LayerOffset = LayerOffset;
|
|
13441
14361
|
exports.LayerPanel = _sfc_main$c;
|
|
13442
14362
|
exports.Layout = Layout;
|
|
13443
14363
|
exports.LayoutContainer = _sfc_main$A;
|
|
13444
|
-
exports.PageFragmentSelect = _sfc_main$
|
|
14364
|
+
exports.PageFragmentSelect = _sfc_main$16;
|
|
13445
14365
|
exports.PropsFormPanel = _sfc_main$q;
|
|
13446
14366
|
exports.PropsPanel = _sfc_main$p;
|
|
13447
14367
|
exports.Resizer = _sfc_main$B;
|
|
13448
14368
|
exports.ScrollViewer = ScrollViewer;
|
|
13449
14369
|
exports.SideItemKey = SideItemKey;
|
|
13450
14370
|
exports.SplitView = _sfc_main$A;
|
|
13451
|
-
exports.
|
|
14371
|
+
exports.StyleSetter = _sfc_main$D;
|
|
14372
|
+
exports.TMagicCodeEditor = _sfc_main$1r;
|
|
13452
14373
|
exports.TMagicEditor = _sfc_main;
|
|
13453
14374
|
exports.ToolButton = _sfc_main$z;
|
|
13454
14375
|
exports.Tree = _sfc_main$l;
|