@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
package/dist/tmagic-editor.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import designPlugin__default, { TMagicIcon, TMagicButton, TMagicCard, tMagicMessage, getDesignConfig, TMagicSelect, useZIndex, tMagicMessageBox, TMagicCascader, TMagicTooltip, TMagicTag, TMagicDialog, TMagicSwitch, TMagicInput, TMagicDivider, TMagicDropdown, TMagicDropdownMenu, TMagicDropdownItem, TMagicPopover, TMagicScrollbar
|
|
1
|
+
import designPlugin__default, { TMagicIcon, TMagicButton, TMagicCard, tMagicMessage, getDesignConfig, TMagicSelect, useZIndex, tMagicMessageBox, TMagicCascader, TMagicTooltip, TMagicTag, TMagicDialog, TMagicSwitch, TMagicInput, TMagicCollapse, TMagicCollapseItem, TMagicDivider, TMagicDropdown, TMagicDropdownMenu, TMagicDropdownItem, TMagicPopover, TMagicScrollbar } from '@tmagic/design';
|
|
2
2
|
export * from '@tmagic/design';
|
|
3
3
|
export { default as designPlugin } from '@tmagic/design';
|
|
4
4
|
import formPlugin__default, { MContainer, MForm, filterFunction, createValues, MFormBox, MSelect, MGroupList, MPanel, createForm } from '@tmagic/form';
|
|
@@ -7,8 +7,8 @@ export { default as formPlugin } from '@tmagic/form';
|
|
|
7
7
|
import tablePlugin__default, { MagicTable } from '@tmagic/table';
|
|
8
8
|
export * from '@tmagic/table';
|
|
9
9
|
export { default as tablePlugin } from '@tmagic/table';
|
|
10
|
-
import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, createElementBlock, normalizeClass, resolveDynamicComponent, toRaw, ref, useTemplateRef, watch, onMounted, onBeforeUnmount, Teleport, normalizeStyle, computed, reactive, resolveComponent, inject, createCommentVNode, Fragment, renderList, mergeProps, mergeModels, useModel, nextTick, provide, renderSlot, toDisplayString, createTextVNode, isRef, createStaticVNode, watchEffect,
|
|
11
|
-
import { Edit, FullScreen, View, Close, Coin, Delete, Plus, ArrowDown, ArrowLeftBold, ArrowRightBold, Files, Search, CaretBottom, DocumentCopy,
|
|
10
|
+
import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, createElementBlock, normalizeClass, resolveDynamicComponent, toRaw, ref, useTemplateRef, watch, onMounted, onBeforeUnmount, Teleport, normalizeStyle, computed, reactive, resolveComponent, inject, createCommentVNode, Fragment, renderList, mergeProps, mergeModels, useModel, nextTick, provide, renderSlot, toDisplayString, shallowReactive, createTextVNode, isRef, createStaticVNode, watchEffect, markRaw, withDirectives, vModelText, vShow, shallowRef, withModifiers, toHandlers, createSlots, getCurrentInstance, Transition, resolveDirective, mergeDefaults } from 'vue';
|
|
11
|
+
import { Edit, FullScreen, View, Close, Coin, Delete, Plus, Grid, ArrowDown, ArrowLeftBold, ArrowRightBold, Files, Search, CaretBottom, DocumentCopy, Memo, ScaleToOriginal, ZoomOut, ZoomIn, Right, Back, Document, Sugar, ArrowRight, CopyDocument, Hide, Goods, List, EditPen, CloseBold, Top, Bottom } from '@element-plus/icons-vue';
|
|
12
12
|
import { throttle, isEmpty, isObject, cloneDeep, mergeWith, uniq, get, map, has, pick, keys } from 'lodash-es';
|
|
13
13
|
import serialize from 'serialize-javascript';
|
|
14
14
|
import { emmetHTML, emmetCSS } from 'emmet-monaco-es';
|
|
@@ -27,8 +27,8 @@ import { detailedDiff } from 'deep-object-diff';
|
|
|
27
27
|
import Sortable from 'sortablejs';
|
|
28
28
|
import KeyController from 'keycon';
|
|
29
29
|
|
|
30
|
-
const _hoisted_1$
|
|
31
|
-
const _sfc_main$
|
|
30
|
+
const _hoisted_1$10 = ["src"];
|
|
31
|
+
const _sfc_main$1s = /* @__PURE__ */ defineComponent({
|
|
32
32
|
...{
|
|
33
33
|
name: "MEditorIcon"
|
|
34
34
|
},
|
|
@@ -52,7 +52,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
52
52
|
class: "magic-editor-icon"
|
|
53
53
|
}, {
|
|
54
54
|
default: withCtx(() => [
|
|
55
|
-
createElementVNode("img", { src: _ctx.icon }, null, 8, _hoisted_1$
|
|
55
|
+
createElementVNode("img", { src: _ctx.icon }, null, 8, _hoisted_1$10)
|
|
56
56
|
]),
|
|
57
57
|
_: 1
|
|
58
58
|
})) : typeof _ctx.icon === "string" ? (openBlock(), createElementBlock("i", {
|
|
@@ -80,10 +80,14 @@ const getEditorConfig = (key) => $TMAGIC_EDITOR[key];
|
|
|
80
80
|
emmetHTML(monaco);
|
|
81
81
|
emmetCSS(monaco, ["css", "scss"]);
|
|
82
82
|
|
|
83
|
-
const _hoisted_1
|
|
83
|
+
const _hoisted_1$$ = {
|
|
84
84
|
class: /* @__PURE__ */ normalizeClass(`magic-code-editor`)
|
|
85
85
|
};
|
|
86
|
-
const
|
|
86
|
+
const _hoisted_2$o = {
|
|
87
|
+
ref: "codeEditor",
|
|
88
|
+
class: "magic-code-editor-content"
|
|
89
|
+
};
|
|
90
|
+
const _sfc_main$1r = /* @__PURE__ */ defineComponent({
|
|
87
91
|
...{
|
|
88
92
|
name: "MEditorCodeEditor"
|
|
89
93
|
},
|
|
@@ -136,7 +140,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
136
140
|
let vsDiffEditor = null;
|
|
137
141
|
const values = ref("");
|
|
138
142
|
const loading = ref(false);
|
|
139
|
-
const
|
|
143
|
+
const codeEditorEl = useTemplateRef("codeEditor");
|
|
140
144
|
const resizeObserver = new globalThis.ResizeObserver(
|
|
141
145
|
throttle(() => {
|
|
142
146
|
vsEditor?.layout();
|
|
@@ -157,7 +161,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
157
161
|
};
|
|
158
162
|
const getEditorValue = () => (props.type === "diff" ? vsDiffEditor?.getModifiedEditor().getValue() : vsEditor?.getValue()) || "";
|
|
159
163
|
const init = async () => {
|
|
160
|
-
if (!
|
|
164
|
+
if (!codeEditorEl.value) return;
|
|
161
165
|
const options = {
|
|
162
166
|
value: values.value,
|
|
163
167
|
language: props.language,
|
|
@@ -165,14 +169,14 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
165
169
|
...props.options
|
|
166
170
|
};
|
|
167
171
|
if (props.type === "diff") {
|
|
168
|
-
vsDiffEditor = monaco.editor.createDiffEditor(
|
|
172
|
+
vsDiffEditor = monaco.editor.createDiffEditor(codeEditorEl.value, options);
|
|
169
173
|
} else {
|
|
170
|
-
vsEditor = monaco.editor.create(
|
|
174
|
+
vsEditor = monaco.editor.create(codeEditorEl.value, options);
|
|
171
175
|
}
|
|
172
176
|
setEditorValue(props.initValues, props.modifiedValues);
|
|
173
177
|
loading.value = false;
|
|
174
178
|
emit("initd", vsEditor);
|
|
175
|
-
|
|
179
|
+
codeEditorEl.value.addEventListener("keydown", (e) => {
|
|
176
180
|
if (e.keyCode === 83 && (navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey)) {
|
|
177
181
|
e.preventDefault();
|
|
178
182
|
e.stopPropagation();
|
|
@@ -190,7 +194,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
190
194
|
}
|
|
191
195
|
});
|
|
192
196
|
}
|
|
193
|
-
resizeObserver.observe(
|
|
197
|
+
resizeObserver.observe(codeEditorEl.value);
|
|
194
198
|
};
|
|
195
199
|
watch(
|
|
196
200
|
() => props.initValues,
|
|
@@ -240,7 +244,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
240
244
|
}
|
|
241
245
|
});
|
|
242
246
|
return (_ctx, _cache) => {
|
|
243
|
-
return openBlock(), createElementBlock("div", _hoisted_1
|
|
247
|
+
return openBlock(), createElementBlock("div", _hoisted_1$$, [
|
|
244
248
|
(openBlock(), createBlock(Teleport, {
|
|
245
249
|
to: "body",
|
|
246
250
|
disabled: !fullScreen.value
|
|
@@ -256,15 +260,11 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
256
260
|
onClick: fullScreenHandler
|
|
257
261
|
}, {
|
|
258
262
|
default: withCtx(() => [
|
|
259
|
-
createVNode(_sfc_main$
|
|
263
|
+
createVNode(_sfc_main$1s, { icon: unref(FullScreen) }, null, 8, ["icon"])
|
|
260
264
|
]),
|
|
261
265
|
_: 1
|
|
262
266
|
}),
|
|
263
|
-
createElementVNode("div",
|
|
264
|
-
ref_key: "codeEditor",
|
|
265
|
-
ref: codeEditor,
|
|
266
|
-
class: "magic-code-editor-content"
|
|
267
|
-
}, null, 512)
|
|
267
|
+
createElementVNode("div", _hoisted_2$o, null, 512)
|
|
268
268
|
], 6)
|
|
269
269
|
], 8, ["disabled"]))
|
|
270
270
|
]);
|
|
@@ -272,7 +272,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
272
272
|
}
|
|
273
273
|
});
|
|
274
274
|
|
|
275
|
-
const _sfc_main$
|
|
275
|
+
const _sfc_main$1q = /* @__PURE__ */ defineComponent({
|
|
276
276
|
...{
|
|
277
277
|
name: "MFieldsVsCode"
|
|
278
278
|
},
|
|
@@ -295,7 +295,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
295
295
|
emit("change", v);
|
|
296
296
|
};
|
|
297
297
|
return (_ctx, _cache) => {
|
|
298
|
-
return openBlock(), createBlock(_sfc_main$
|
|
298
|
+
return openBlock(), createBlock(_sfc_main$1r, {
|
|
299
299
|
height: _ctx.config.height,
|
|
300
300
|
"init-values": _ctx.model[_ctx.name],
|
|
301
301
|
language: _ctx.config.language,
|
|
@@ -310,7 +310,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
310
310
|
}
|
|
311
311
|
});
|
|
312
312
|
|
|
313
|
-
const _sfc_main$
|
|
313
|
+
const _sfc_main$1p = /* @__PURE__ */ defineComponent({
|
|
314
314
|
...{
|
|
315
315
|
name: "MFieldsCodeLink"
|
|
316
316
|
},
|
|
@@ -389,7 +389,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
389
389
|
}
|
|
390
390
|
});
|
|
391
391
|
|
|
392
|
-
const _sfc_main$
|
|
392
|
+
const _sfc_main$1o = /* @__PURE__ */ defineComponent({
|
|
393
393
|
...{
|
|
394
394
|
name: "MFieldsCodeSelect"
|
|
395
395
|
},
|
|
@@ -532,303 +532,60 @@ const styleTabConfig = {
|
|
|
532
532
|
items: [
|
|
533
533
|
{
|
|
534
534
|
name: "style",
|
|
535
|
+
labelWidth: "100px",
|
|
536
|
+
type: "style-setter",
|
|
535
537
|
items: [
|
|
536
538
|
{
|
|
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
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
name: "bottom",
|
|
588
|
-
text: "bottom",
|
|
589
|
-
checkStrictly: false,
|
|
590
|
-
dataSourceFieldType: ["string", "number"],
|
|
591
|
-
fieldConfig: {
|
|
592
|
-
type: "text"
|
|
593
|
-
},
|
|
594
|
-
disabled: (_vm, { model }) => model.position === "fixed" && model._magic_position === "fixedTop"
|
|
595
|
-
}
|
|
596
|
-
]
|
|
597
|
-
},
|
|
598
|
-
{
|
|
599
|
-
type: "fieldset",
|
|
600
|
-
legend: "盒子",
|
|
601
|
-
items: [
|
|
602
|
-
{
|
|
603
|
-
type: "data-source-field-select",
|
|
604
|
-
name: "display",
|
|
605
|
-
text: "display",
|
|
606
|
-
checkStrictly: false,
|
|
607
|
-
dataSourceFieldType: ["string"],
|
|
608
|
-
fieldConfig: {
|
|
609
|
-
type: "select",
|
|
610
|
-
clearable: true,
|
|
611
|
-
allowCreate: true,
|
|
612
|
-
options: [
|
|
613
|
-
{ text: "block", value: "block" },
|
|
614
|
-
{ text: "flex", value: "flex" },
|
|
615
|
-
{ text: "none", value: "none" },
|
|
616
|
-
{ text: "inline-block", value: "inline-block" },
|
|
617
|
-
{ text: "grid", value: "grid" },
|
|
618
|
-
{ text: "inline", value: "inline" },
|
|
619
|
-
{ text: "initial", value: "initial" }
|
|
620
|
-
]
|
|
621
|
-
}
|
|
622
|
-
},
|
|
623
|
-
{
|
|
624
|
-
type: "data-source-field-select",
|
|
625
|
-
name: "width",
|
|
626
|
-
text: "宽度",
|
|
627
|
-
checkStrictly: false,
|
|
628
|
-
dataSourceFieldType: ["string", "number"],
|
|
629
|
-
fieldConfig: {
|
|
630
|
-
type: "text"
|
|
631
|
-
}
|
|
632
|
-
},
|
|
633
|
-
{
|
|
634
|
-
type: "data-source-field-select",
|
|
635
|
-
name: "height",
|
|
636
|
-
text: "高度",
|
|
637
|
-
checkStrictly: false,
|
|
638
|
-
dataSourceFieldType: ["string", "number"],
|
|
639
|
-
fieldConfig: {
|
|
640
|
-
type: "text"
|
|
641
|
-
}
|
|
642
|
-
},
|
|
643
|
-
{
|
|
644
|
-
type: "data-source-field-select",
|
|
645
|
-
text: "overflow",
|
|
646
|
-
name: "overflow",
|
|
647
|
-
checkStrictly: false,
|
|
648
|
-
dataSourceFieldType: ["string"],
|
|
649
|
-
fieldConfig: {
|
|
650
|
-
type: "select",
|
|
651
|
-
clearable: true,
|
|
652
|
-
allowCreate: true,
|
|
653
|
-
options: [
|
|
654
|
-
{ text: "visible", value: "visible" },
|
|
655
|
-
{ text: "hidden", value: "hidden" },
|
|
656
|
-
{ text: "clip", value: "clip" },
|
|
657
|
-
{ text: "scroll", value: "scroll" },
|
|
658
|
-
{ text: "auto", value: "auto" },
|
|
659
|
-
{ text: "overlay", value: "overlay" },
|
|
660
|
-
{ text: "initial", value: "initial" }
|
|
661
|
-
]
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
]
|
|
665
|
-
},
|
|
666
|
-
{
|
|
667
|
-
type: "fieldset",
|
|
668
|
-
legend: "边框",
|
|
669
|
-
items: [
|
|
670
|
-
{
|
|
671
|
-
type: "data-source-field-select",
|
|
672
|
-
name: "borderWidth",
|
|
673
|
-
text: "宽度",
|
|
674
|
-
defaultValue: "0",
|
|
675
|
-
checkStrictly: false,
|
|
676
|
-
dataSourceFieldType: ["string", "number"],
|
|
677
|
-
fieldConfig: {
|
|
678
|
-
type: "text"
|
|
679
|
-
}
|
|
680
|
-
},
|
|
681
|
-
{
|
|
682
|
-
type: "data-source-field-select",
|
|
683
|
-
name: "borderColor",
|
|
684
|
-
text: "颜色",
|
|
685
|
-
checkStrictly: false,
|
|
686
|
-
dataSourceFieldType: ["string"],
|
|
687
|
-
fieldConfig: {
|
|
688
|
-
type: "text"
|
|
689
|
-
}
|
|
690
|
-
},
|
|
691
|
-
{
|
|
692
|
-
type: "data-source-field-select",
|
|
693
|
-
name: "borderStyle",
|
|
694
|
-
text: "样式",
|
|
695
|
-
defaultValue: "none",
|
|
696
|
-
checkStrictly: false,
|
|
697
|
-
dataSourceFieldType: ["string"],
|
|
698
|
-
fieldConfig: {
|
|
699
|
-
type: "select",
|
|
700
|
-
options: [
|
|
701
|
-
{ text: "none", value: "none" },
|
|
702
|
-
{ text: "hidden", value: "hidden" },
|
|
703
|
-
{ text: "dotted", value: "dotted" },
|
|
704
|
-
{ text: "dashed", value: "dashed" },
|
|
705
|
-
{ text: "solid", value: "solid" },
|
|
706
|
-
{ text: "double", value: "double" },
|
|
707
|
-
{ text: "groove", value: "groove" },
|
|
708
|
-
{ text: "ridge", value: "ridge" },
|
|
709
|
-
{ text: "inset", value: "inset" },
|
|
710
|
-
{ text: "outset", value: "outset" }
|
|
711
|
-
]
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
]
|
|
715
|
-
},
|
|
716
|
-
{
|
|
717
|
-
type: "fieldset",
|
|
718
|
-
legend: "背景",
|
|
719
|
-
items: [
|
|
720
|
-
{
|
|
721
|
-
type: "data-source-field-select",
|
|
722
|
-
name: "backgroundImage",
|
|
723
|
-
text: "背景图",
|
|
724
|
-
checkStrictly: false,
|
|
725
|
-
dataSourceFieldType: ["string"],
|
|
726
|
-
fieldConfig: {
|
|
727
|
-
type: "img-upload"
|
|
728
|
-
}
|
|
729
|
-
},
|
|
730
|
-
{
|
|
731
|
-
type: "data-source-field-select",
|
|
732
|
-
name: "backgroundColor",
|
|
733
|
-
text: "背景颜色",
|
|
734
|
-
checkStrictly: false,
|
|
735
|
-
dataSourceFieldType: ["string"],
|
|
736
|
-
fieldConfig: {
|
|
737
|
-
type: "colorPicker"
|
|
738
|
-
}
|
|
739
|
-
},
|
|
740
|
-
{
|
|
741
|
-
type: "data-source-field-select",
|
|
742
|
-
name: "backgroundRepeat",
|
|
743
|
-
text: "背景图重复",
|
|
744
|
-
defaultValue: "no-repeat",
|
|
745
|
-
checkStrictly: false,
|
|
746
|
-
dataSourceFieldType: ["string"],
|
|
747
|
-
fieldConfig: {
|
|
748
|
-
type: "select",
|
|
749
|
-
options: [
|
|
750
|
-
{ text: "repeat", value: "repeat" },
|
|
751
|
-
{ text: "repeat-x", value: "repeat-x" },
|
|
752
|
-
{ text: "repeat-y", value: "repeat-y" },
|
|
753
|
-
{ text: "no-repeat", value: "no-repeat" },
|
|
754
|
-
{ text: "inherit", value: "inherit" }
|
|
755
|
-
]
|
|
756
|
-
}
|
|
757
|
-
},
|
|
758
|
-
{
|
|
759
|
-
type: "data-source-field-select",
|
|
760
|
-
name: "backgroundSize",
|
|
761
|
-
text: "背景图大小",
|
|
762
|
-
defaultValue: "100% 100%",
|
|
763
|
-
checkStrictly: false,
|
|
764
|
-
dataSourceFieldType: ["string"],
|
|
765
|
-
fieldConfig: {
|
|
766
|
-
type: "text"
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
]
|
|
770
|
-
},
|
|
771
|
-
{
|
|
772
|
-
type: "fieldset",
|
|
773
|
-
legend: "字体",
|
|
774
|
-
items: [
|
|
775
|
-
{
|
|
776
|
-
type: "data-source-field-select",
|
|
777
|
-
name: "color",
|
|
778
|
-
text: "颜色",
|
|
779
|
-
checkStrictly: false,
|
|
780
|
-
dataSourceFieldType: ["string"],
|
|
781
|
-
fieldConfig: {
|
|
782
|
-
type: "colorPicker"
|
|
783
|
-
}
|
|
784
|
-
},
|
|
785
|
-
{
|
|
786
|
-
type: "data-source-field-select",
|
|
787
|
-
name: "fontSize",
|
|
788
|
-
text: "大小",
|
|
789
|
-
checkStrictly: false,
|
|
790
|
-
dataSourceFieldType: ["string", "number"],
|
|
791
|
-
fieldConfig: {
|
|
792
|
-
type: "text"
|
|
793
|
-
}
|
|
794
|
-
},
|
|
795
|
-
{
|
|
796
|
-
type: "data-source-field-select",
|
|
797
|
-
name: "fontWeight",
|
|
798
|
-
text: "粗细",
|
|
799
|
-
checkStrictly: false,
|
|
800
|
-
dataSourceFieldType: ["string", "number"],
|
|
801
|
-
fieldConfig: {
|
|
802
|
-
type: "text"
|
|
803
|
-
}
|
|
804
|
-
}
|
|
805
|
-
]
|
|
806
|
-
},
|
|
807
|
-
{
|
|
808
|
-
type: "fieldset",
|
|
809
|
-
legend: "变形",
|
|
810
|
-
name: "transform",
|
|
811
|
-
items: [
|
|
812
|
-
{
|
|
813
|
-
type: "data-source-field-select",
|
|
814
|
-
name: "rotate",
|
|
815
|
-
text: "旋转角度",
|
|
816
|
-
checkStrictly: false,
|
|
817
|
-
dataSourceFieldType: ["string"],
|
|
818
|
-
fieldConfig: {
|
|
819
|
-
type: "text"
|
|
820
|
-
}
|
|
821
|
-
},
|
|
822
|
-
{
|
|
823
|
-
type: "data-source-field-select",
|
|
824
|
-
name: "scale",
|
|
825
|
-
text: "缩放",
|
|
826
|
-
checkStrictly: false,
|
|
827
|
-
dataSourceFieldType: ["number", "string"],
|
|
828
|
-
fieldConfig: {
|
|
829
|
-
type: "text"
|
|
830
|
-
}
|
|
831
|
-
}
|
|
539
|
+
names: [
|
|
540
|
+
"display",
|
|
541
|
+
"flexDirection",
|
|
542
|
+
"justifyContent",
|
|
543
|
+
"alignItems",
|
|
544
|
+
"flexWrap",
|
|
545
|
+
"marginTop",
|
|
546
|
+
"marginRight",
|
|
547
|
+
"marginBottom",
|
|
548
|
+
"marginLeft",
|
|
549
|
+
"paddingTop",
|
|
550
|
+
"paddingRight",
|
|
551
|
+
"paddingBottom",
|
|
552
|
+
"paddingLeft",
|
|
553
|
+
"width",
|
|
554
|
+
"height",
|
|
555
|
+
"overflow",
|
|
556
|
+
"fontSize",
|
|
557
|
+
"lineHeight",
|
|
558
|
+
"fontWeight",
|
|
559
|
+
"color",
|
|
560
|
+
"textAlign",
|
|
561
|
+
"backgroundColor",
|
|
562
|
+
"backgroundImage",
|
|
563
|
+
"backgroundSize",
|
|
564
|
+
"backgroundPosition",
|
|
565
|
+
"backgroundRepeat",
|
|
566
|
+
"position",
|
|
567
|
+
"zIndex",
|
|
568
|
+
"top",
|
|
569
|
+
"right",
|
|
570
|
+
"bottom",
|
|
571
|
+
"left",
|
|
572
|
+
"borderRadius",
|
|
573
|
+
"borderTopWidth",
|
|
574
|
+
"borderTopStyle",
|
|
575
|
+
"borderTopColor",
|
|
576
|
+
"borderRightColor",
|
|
577
|
+
"borderRightWidth",
|
|
578
|
+
"borderRightStyle",
|
|
579
|
+
"borderRightColor",
|
|
580
|
+
"borderBottomWidth",
|
|
581
|
+
"borderBottomStyle",
|
|
582
|
+
"borderBottomColor",
|
|
583
|
+
"borderLeftStyle",
|
|
584
|
+
"borderLeftWidth",
|
|
585
|
+
"borderLeftColor",
|
|
586
|
+
"borderWidth",
|
|
587
|
+
"borderStyle",
|
|
588
|
+
"borderColor"
|
|
832
589
|
]
|
|
833
590
|
}
|
|
834
591
|
]
|
|
@@ -2213,8 +1970,8 @@ class Editor extends BaseService {
|
|
|
2213
1970
|
if (!info.node) throw new Error(`获取不到id为${config.id}的节点`);
|
|
2214
1971
|
const node = toRaw(info.node);
|
|
2215
1972
|
let newConfig = await this.toggleFixedPosition(toRaw(config), node, root);
|
|
2216
|
-
newConfig = mergeWith(cloneDeep(node), newConfig, (objValue, srcValue, key) => {
|
|
2217
|
-
if (typeof srcValue === "undefined" && Object.hasOwn(
|
|
1973
|
+
newConfig = mergeWith(cloneDeep(node), newConfig, (objValue, srcValue, key, object, source) => {
|
|
1974
|
+
if (typeof srcValue === "undefined" && Object.hasOwn(source, key)) {
|
|
2218
1975
|
return "";
|
|
2219
1976
|
}
|
|
2220
1977
|
if (isObject(srcValue) && Array.isArray(objValue)) {
|
|
@@ -3077,13 +2834,14 @@ globalThis.requestIdleCallback = globalThis.requestIdleCallback || function(cb)
|
|
|
3077
2834
|
};
|
|
3078
2835
|
class IdleTask extends EventEmitter {
|
|
3079
2836
|
taskList = [];
|
|
2837
|
+
hightLevelTaskList = [];
|
|
3080
2838
|
taskHandle = null;
|
|
3081
2839
|
constructor() {
|
|
3082
2840
|
super();
|
|
3083
2841
|
this.setMaxListeners(1e3);
|
|
3084
2842
|
}
|
|
3085
|
-
enqueueTask(taskHandler, taskData) {
|
|
3086
|
-
this.taskList.push({
|
|
2843
|
+
enqueueTask(taskHandler, taskData, isHightLevel = false) {
|
|
2844
|
+
(isHightLevel ? this.hightLevelTaskList : this.taskList).push({
|
|
3087
2845
|
handler: taskHandler,
|
|
3088
2846
|
data: taskData
|
|
3089
2847
|
});
|
|
@@ -3092,6 +2850,10 @@ class IdleTask extends EventEmitter {
|
|
|
3092
2850
|
}
|
|
3093
2851
|
}
|
|
3094
2852
|
clearTasks() {
|
|
2853
|
+
if (this.taskHandle) {
|
|
2854
|
+
globalThis.cancelIdleCallback(this.taskHandle);
|
|
2855
|
+
}
|
|
2856
|
+
this.hightLevelTaskList = [];
|
|
3095
2857
|
this.taskList = [];
|
|
3096
2858
|
}
|
|
3097
2859
|
on(eventName, listener) {
|
|
@@ -3104,7 +2866,8 @@ class IdleTask extends EventEmitter {
|
|
|
3104
2866
|
return super.emit(eventName, ...args);
|
|
3105
2867
|
}
|
|
3106
2868
|
runTaskQueue(deadline) {
|
|
3107
|
-
|
|
2869
|
+
const { hightLevelTaskList, taskList } = this;
|
|
2870
|
+
while (deadline.timeRemaining() > 0 && taskList.length) {
|
|
3108
2871
|
const timeRemaining = deadline.timeRemaining();
|
|
3109
2872
|
let times = 0;
|
|
3110
2873
|
if (timeRemaining <= 5) {
|
|
@@ -3117,16 +2880,19 @@ class IdleTask extends EventEmitter {
|
|
|
3117
2880
|
times = 600;
|
|
3118
2881
|
}
|
|
3119
2882
|
for (let i = 0; i < times; i++) {
|
|
3120
|
-
const task =
|
|
2883
|
+
const task = hightLevelTaskList.length > 0 ? hightLevelTaskList.shift() : taskList.shift();
|
|
3121
2884
|
if (task) {
|
|
3122
2885
|
task.handler(task.data);
|
|
3123
2886
|
}
|
|
3124
|
-
if (
|
|
2887
|
+
if (hightLevelTaskList.length === 0 && taskList.length === 0) {
|
|
3125
2888
|
break;
|
|
3126
2889
|
}
|
|
3127
2890
|
}
|
|
3128
2891
|
}
|
|
3129
|
-
if (
|
|
2892
|
+
if (!hightLevelTaskList.length) {
|
|
2893
|
+
this.emit("hight-level-finish");
|
|
2894
|
+
}
|
|
2895
|
+
if (hightLevelTaskList.length || taskList.length) {
|
|
3130
2896
|
this.taskHandle = globalThis.requestIdleCallback(this.runTaskQueue.bind(this), { timeout: 300 });
|
|
3131
2897
|
} else {
|
|
3132
2898
|
this.taskHandle = 0;
|
|
@@ -3272,7 +3038,7 @@ const updateStatus = (nodeStatusMap, id, status) => {
|
|
|
3272
3038
|
});
|
|
3273
3039
|
};
|
|
3274
3040
|
|
|
3275
|
-
const _sfc_main$
|
|
3041
|
+
const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
3276
3042
|
...{
|
|
3277
3043
|
name: "MEditorCodeParams"
|
|
3278
3044
|
},
|
|
@@ -3288,7 +3054,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
3288
3054
|
setup(__props, { emit: __emit }) {
|
|
3289
3055
|
const props = __props;
|
|
3290
3056
|
const emit = __emit;
|
|
3291
|
-
const
|
|
3057
|
+
const formRef = useTemplateRef("form");
|
|
3292
3058
|
const getFormConfig = (items = []) => [
|
|
3293
3059
|
{
|
|
3294
3060
|
type: "fieldset",
|
|
@@ -3311,7 +3077,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
3311
3077
|
);
|
|
3312
3078
|
const onParamsChangeHandler = async (v, eventData) => {
|
|
3313
3079
|
try {
|
|
3314
|
-
const value = await
|
|
3080
|
+
const value = await formRef.value?.submitForm(true);
|
|
3315
3081
|
emit("change", value, eventData);
|
|
3316
3082
|
} catch (e) {
|
|
3317
3083
|
error(e);
|
|
@@ -3319,8 +3085,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
3319
3085
|
};
|
|
3320
3086
|
return (_ctx, _cache) => {
|
|
3321
3087
|
return openBlock(), createBlock(unref(MForm), {
|
|
3322
|
-
|
|
3323
|
-
ref: form,
|
|
3088
|
+
ref: "form",
|
|
3324
3089
|
config: codeParamsConfig.value,
|
|
3325
3090
|
"init-values": _ctx.model,
|
|
3326
3091
|
disabled: _ctx.disabled,
|
|
@@ -3332,9 +3097,9 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
3332
3097
|
}
|
|
3333
3098
|
});
|
|
3334
3099
|
|
|
3335
|
-
const _hoisted_1$
|
|
3336
|
-
const _hoisted_2$
|
|
3337
|
-
const _sfc_main$
|
|
3100
|
+
const _hoisted_1$_ = { class: "m-fields-code-select-col" };
|
|
3101
|
+
const _hoisted_2$n = { class: "code-select-container" };
|
|
3102
|
+
const _sfc_main$1m = /* @__PURE__ */ defineComponent({
|
|
3338
3103
|
...{
|
|
3339
3104
|
name: "MFieldsCodeSelectCol"
|
|
3340
3105
|
},
|
|
@@ -3430,8 +3195,8 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
3430
3195
|
eventBus?.emit("edit-code", id);
|
|
3431
3196
|
};
|
|
3432
3197
|
return (_ctx, _cache) => {
|
|
3433
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3434
|
-
createElementVNode("div", _hoisted_2$
|
|
3198
|
+
return openBlock(), createElementBlock("div", _hoisted_1$_, [
|
|
3199
|
+
createElementVNode("div", _hoisted_2$n, [
|
|
3435
3200
|
createVNode(unref(MContainer), {
|
|
3436
3201
|
class: "select",
|
|
3437
3202
|
config: selectConfig,
|
|
@@ -3446,14 +3211,14 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
3446
3211
|
onClick: _cache[0] || (_cache[0] = ($event) => editCode(_ctx.model[_ctx.name]))
|
|
3447
3212
|
}, {
|
|
3448
3213
|
default: withCtx(() => [
|
|
3449
|
-
createVNode(_sfc_main$
|
|
3214
|
+
createVNode(_sfc_main$1s, {
|
|
3450
3215
|
icon: !notEditable.value ? unref(Edit) : unref(View)
|
|
3451
3216
|
}, null, 8, ["icon"])
|
|
3452
3217
|
]),
|
|
3453
3218
|
_: 1
|
|
3454
3219
|
}, 8, ["size"])) : createCommentVNode("", true)
|
|
3455
3220
|
]),
|
|
3456
|
-
paramsConfig.value.length ? (openBlock(), createBlock(_sfc_main$
|
|
3221
|
+
paramsConfig.value.length ? (openBlock(), createBlock(_sfc_main$1n, {
|
|
3457
3222
|
name: "params",
|
|
3458
3223
|
key: _ctx.model[_ctx.name],
|
|
3459
3224
|
model: _ctx.model,
|
|
@@ -3466,7 +3231,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
3466
3231
|
}
|
|
3467
3232
|
});
|
|
3468
3233
|
|
|
3469
|
-
const _sfc_main$
|
|
3234
|
+
const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
3470
3235
|
...{
|
|
3471
3236
|
name: "MFieldsCondOpSelect"
|
|
3472
3237
|
},
|
|
@@ -3552,7 +3317,11 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
3552
3317
|
}
|
|
3553
3318
|
});
|
|
3554
3319
|
|
|
3555
|
-
const
|
|
3320
|
+
const _hoisted_1$Z = {
|
|
3321
|
+
ref: "title",
|
|
3322
|
+
class: "m-editor-float-box-title"
|
|
3323
|
+
};
|
|
3324
|
+
const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
3556
3325
|
__name: "FloatingBox",
|
|
3557
3326
|
props: /* @__PURE__ */ mergeModels({
|
|
3558
3327
|
position: { default: () => ({ left: 0, top: 0 }) },
|
|
@@ -3572,8 +3341,8 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
3572
3341
|
const height = useModel(__props, "height");
|
|
3573
3342
|
const visible = useModel(__props, "visible");
|
|
3574
3343
|
const props = __props;
|
|
3575
|
-
const
|
|
3576
|
-
const titleEl = useTemplateRef("
|
|
3344
|
+
const targetEl = useTemplateRef("target");
|
|
3345
|
+
const titleEl = useTemplateRef("title");
|
|
3577
3346
|
const zIndex = useZIndex();
|
|
3578
3347
|
const curZIndex = ref(0);
|
|
3579
3348
|
const titleHeight = ref(0);
|
|
@@ -3581,8 +3350,8 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
3581
3350
|
if (height.value) {
|
|
3582
3351
|
return height.value - titleHeight.value;
|
|
3583
3352
|
}
|
|
3584
|
-
if (
|
|
3585
|
-
return
|
|
3353
|
+
if (targetEl.value) {
|
|
3354
|
+
return targetEl.value.clientHeight - titleHeight.value;
|
|
3586
3355
|
}
|
|
3587
3356
|
return "auto";
|
|
3588
3357
|
});
|
|
@@ -3604,7 +3373,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
3604
3373
|
const initMoveable = () => {
|
|
3605
3374
|
moveable = new VanillaMoveable(globalThis.document.body, {
|
|
3606
3375
|
className: "m-editor-floating-box-moveable",
|
|
3607
|
-
target:
|
|
3376
|
+
target: targetEl.value,
|
|
3608
3377
|
draggable: true,
|
|
3609
3378
|
resizable: true,
|
|
3610
3379
|
edge: true,
|
|
@@ -3638,7 +3407,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
3638
3407
|
if (visible2) {
|
|
3639
3408
|
await nextTick();
|
|
3640
3409
|
curZIndex.value = zIndex.nextZIndex();
|
|
3641
|
-
const targetRect =
|
|
3410
|
+
const targetRect = targetEl.value?.getBoundingClientRect();
|
|
3642
3411
|
if (targetRect) {
|
|
3643
3412
|
width.value = targetRect.width;
|
|
3644
3413
|
height.value = targetRect.height;
|
|
@@ -3674,10 +3443,10 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
3674
3443
|
const nextZIndex = () => {
|
|
3675
3444
|
curZIndex.value = zIndex.nextZIndex();
|
|
3676
3445
|
};
|
|
3677
|
-
provide("parentFloating",
|
|
3446
|
+
provide("parentFloating", targetEl);
|
|
3678
3447
|
__expose({
|
|
3679
3448
|
bodyHeight,
|
|
3680
|
-
target,
|
|
3449
|
+
target: targetEl,
|
|
3681
3450
|
titleEl
|
|
3682
3451
|
});
|
|
3683
3452
|
return (_ctx, _cache) => {
|
|
@@ -3686,17 +3455,12 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
3686
3455
|
to: "body"
|
|
3687
3456
|
}, [
|
|
3688
3457
|
createElementVNode("div", {
|
|
3689
|
-
|
|
3690
|
-
ref: target,
|
|
3458
|
+
ref: "target",
|
|
3691
3459
|
class: "m-editor-float-box",
|
|
3692
3460
|
style: normalizeStyle({ ...style.value, zIndex: curZIndex.value }),
|
|
3693
3461
|
onMousedown: nextZIndex
|
|
3694
3462
|
}, [
|
|
3695
|
-
createElementVNode("div",
|
|
3696
|
-
ref_key: "titleEl",
|
|
3697
|
-
ref: titleEl,
|
|
3698
|
-
class: "m-editor-float-box-title"
|
|
3699
|
-
}, [
|
|
3463
|
+
createElementVNode("div", _hoisted_1$Z, [
|
|
3700
3464
|
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
3701
3465
|
createElementVNode("span", null, toDisplayString(_ctx.title), 1)
|
|
3702
3466
|
]),
|
|
@@ -3707,7 +3471,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
3707
3471
|
onClick: closeHandler
|
|
3708
3472
|
}, {
|
|
3709
3473
|
default: withCtx(() => [
|
|
3710
|
-
createVNode(_sfc_main$
|
|
3474
|
+
createVNode(_sfc_main$1s, { icon: unref(Close) }, null, 8, ["icon"])
|
|
3711
3475
|
]),
|
|
3712
3476
|
_: 1
|
|
3713
3477
|
})
|
|
@@ -3728,7 +3492,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
3728
3492
|
const useCodeBlockEdit = (codeBlockService) => {
|
|
3729
3493
|
const codeConfig = ref();
|
|
3730
3494
|
const codeId = ref();
|
|
3731
|
-
const
|
|
3495
|
+
const codeBlockEditorRef = useTemplateRef("codeBlockEditor");
|
|
3732
3496
|
const createCodeBlock = async () => {
|
|
3733
3497
|
if (!codeBlockService) {
|
|
3734
3498
|
tMagicMessage.error("新增代码块失败");
|
|
@@ -3743,7 +3507,7 @@ const useCodeBlockEdit = (codeBlockService) => {
|
|
|
3743
3507
|
};
|
|
3744
3508
|
codeId.value = await codeBlockService.getUniqueId();
|
|
3745
3509
|
await nextTick();
|
|
3746
|
-
|
|
3510
|
+
codeBlockEditorRef.value?.show();
|
|
3747
3511
|
};
|
|
3748
3512
|
const editCode = async (id) => {
|
|
3749
3513
|
const codeBlock = await codeBlockService?.getCodeContentById(id);
|
|
@@ -3761,7 +3525,7 @@ const useCodeBlockEdit = (codeBlockService) => {
|
|
|
3761
3525
|
};
|
|
3762
3526
|
codeId.value = id;
|
|
3763
3527
|
await nextTick();
|
|
3764
|
-
|
|
3528
|
+
codeBlockEditorRef.value?.show();
|
|
3765
3529
|
};
|
|
3766
3530
|
const deleteCode = async (key) => {
|
|
3767
3531
|
codeBlockService?.deleteCodeDslByIds([key]);
|
|
@@ -3769,12 +3533,12 @@ const useCodeBlockEdit = (codeBlockService) => {
|
|
|
3769
3533
|
const submitCodeBlockHandler = async (values) => {
|
|
3770
3534
|
if (!codeId.value) return;
|
|
3771
3535
|
await codeBlockService?.setCodeDslById(codeId.value, values);
|
|
3772
|
-
|
|
3536
|
+
codeBlockEditorRef.value?.hide();
|
|
3773
3537
|
};
|
|
3774
3538
|
return {
|
|
3775
3539
|
codeId,
|
|
3776
3540
|
codeConfig,
|
|
3777
|
-
codeBlockEditor,
|
|
3541
|
+
codeBlockEditor: codeBlockEditorRef,
|
|
3778
3542
|
createCodeBlock,
|
|
3779
3543
|
editCode,
|
|
3780
3544
|
deleteCode,
|
|
@@ -3782,7 +3546,7 @@ const useCodeBlockEdit = (codeBlockService) => {
|
|
|
3782
3546
|
};
|
|
3783
3547
|
};
|
|
3784
3548
|
|
|
3785
|
-
const state =
|
|
3549
|
+
const state = shallowReactive({
|
|
3786
3550
|
uiSelectMode: false,
|
|
3787
3551
|
showSrc: false,
|
|
3788
3552
|
showStylePanel: true,
|
|
@@ -4230,9 +3994,9 @@ const useNodeStatus$1 = (nodeData) => {
|
|
|
4230
3994
|
};
|
|
4231
3995
|
};
|
|
4232
3996
|
|
|
4233
|
-
const _hoisted_1$
|
|
4234
|
-
const _hoisted_2$
|
|
4235
|
-
const _sfc_main$
|
|
3997
|
+
const _hoisted_1$Y = { class: "m-editor-data-source-fields" };
|
|
3998
|
+
const _hoisted_2$m = { class: "m-editor-data-source-fields-footer" };
|
|
3999
|
+
const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
4236
4000
|
...{
|
|
4237
4001
|
name: "MFieldsDataSourceFields"
|
|
4238
4002
|
},
|
|
@@ -4496,12 +4260,12 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
4496
4260
|
const parentFloating = inject("parentFloating", ref(null));
|
|
4497
4261
|
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
|
|
4498
4262
|
return (_ctx, _cache) => {
|
|
4499
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
4263
|
+
return openBlock(), createElementBlock("div", _hoisted_1$Y, [
|
|
4500
4264
|
createVNode(unref(MagicTable), {
|
|
4501
4265
|
data: _ctx.model[_ctx.name],
|
|
4502
4266
|
columns: fieldColumns
|
|
4503
4267
|
}, null, 8, ["data"]),
|
|
4504
|
-
createElementVNode("div", _hoisted_2$
|
|
4268
|
+
createElementVNode("div", _hoisted_2$m, [
|
|
4505
4269
|
createVNode(unref(TMagicButton), {
|
|
4506
4270
|
size: "small",
|
|
4507
4271
|
disabled: _ctx.disabled,
|
|
@@ -4526,7 +4290,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
4526
4290
|
_: 1
|
|
4527
4291
|
}, 8, ["disabled"])
|
|
4528
4292
|
]),
|
|
4529
|
-
createVNode(_sfc_main$
|
|
4293
|
+
createVNode(_sfc_main$1k, {
|
|
4530
4294
|
visible: addDialogVisible.value,
|
|
4531
4295
|
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => addDialogVisible.value = $event),
|
|
4532
4296
|
width: width.value,
|
|
@@ -4549,7 +4313,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
4549
4313
|
]),
|
|
4550
4314
|
_: 1
|
|
4551
4315
|
}, 8, ["visible", "width", "height", "title", "position"]),
|
|
4552
|
-
createVNode(_sfc_main$
|
|
4316
|
+
createVNode(_sfc_main$1k, {
|
|
4553
4317
|
visible: addFromJsonDialogVisible.value,
|
|
4554
4318
|
"onUpdate:visible": _cache[5] || (_cache[5] = ($event) => addFromJsonDialogVisible.value = $event),
|
|
4555
4319
|
width: width.value,
|
|
@@ -4574,8 +4338,8 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
4574
4338
|
}
|
|
4575
4339
|
});
|
|
4576
4340
|
|
|
4577
|
-
const _hoisted_1$
|
|
4578
|
-
const _sfc_main$
|
|
4341
|
+
const _hoisted_1$X = { class: "m-editor-data-source-field-select" };
|
|
4342
|
+
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
4579
4343
|
__name: "FieldSelect",
|
|
4580
4344
|
props: /* @__PURE__ */ mergeModels({
|
|
4581
4345
|
value: {},
|
|
@@ -4656,7 +4420,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
4656
4420
|
eventBus?.emit("edit-data-source", removeDataSourceFieldPrefix(id));
|
|
4657
4421
|
};
|
|
4658
4422
|
return (_ctx, _cache) => {
|
|
4659
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
4423
|
+
return openBlock(), createElementBlock("div", _hoisted_1$X, [
|
|
4660
4424
|
_ctx.checkStrictly ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4661
4425
|
createVNode(unref(TMagicSelect), {
|
|
4662
4426
|
"model-value": selectDataSourceId.value,
|
|
@@ -4724,7 +4488,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
4724
4488
|
onClick: _cache[0] || (_cache[0] = ($event) => editHandler(selectDataSourceId.value))
|
|
4725
4489
|
}, {
|
|
4726
4490
|
default: withCtx(() => [
|
|
4727
|
-
createVNode(_sfc_main$
|
|
4491
|
+
createVNode(_sfc_main$1s, {
|
|
4728
4492
|
icon: !notEditable.value ? unref(Edit) : unref(View)
|
|
4729
4493
|
}, null, 8, ["icon"])
|
|
4730
4494
|
]),
|
|
@@ -4738,8 +4502,8 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
4738
4502
|
}
|
|
4739
4503
|
});
|
|
4740
4504
|
|
|
4741
|
-
const _hoisted_1$
|
|
4742
|
-
const _sfc_main$
|
|
4505
|
+
const _hoisted_1$W = { class: "m-fields-data-source-field-select" };
|
|
4506
|
+
const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
4743
4507
|
...{
|
|
4744
4508
|
name: "MFieldsDataSourceFieldSelect"
|
|
4745
4509
|
},
|
|
@@ -4840,8 +4604,8 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
4840
4604
|
}
|
|
4841
4605
|
};
|
|
4842
4606
|
return (_ctx, _cache) => {
|
|
4843
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
4844
|
-
showDataSourceFieldSelect.value || !_ctx.config.fieldConfig ? (openBlock(), createBlock(_sfc_main$
|
|
4607
|
+
return openBlock(), createElementBlock("div", _hoisted_1$W, [
|
|
4608
|
+
showDataSourceFieldSelect.value || !_ctx.config.fieldConfig ? (openBlock(), createBlock(_sfc_main$1i, {
|
|
4845
4609
|
key: 0,
|
|
4846
4610
|
"model-value": _ctx.model[_ctx.name],
|
|
4847
4611
|
disabled: _ctx.disabled,
|
|
@@ -4876,7 +4640,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
4876
4640
|
onClick: _cache[0] || (_cache[0] = ($event) => showDataSourceFieldSelect.value = !showDataSourceFieldSelect.value)
|
|
4877
4641
|
}, {
|
|
4878
4642
|
default: withCtx(() => [
|
|
4879
|
-
createVNode(_sfc_main$
|
|
4643
|
+
createVNode(_sfc_main$1s, { icon: unref(Coin) }, null, 8, ["icon"])
|
|
4880
4644
|
]),
|
|
4881
4645
|
_: 1
|
|
4882
4646
|
}, 8, ["type", "size"])
|
|
@@ -4888,10 +4652,10 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
4888
4652
|
}
|
|
4889
4653
|
});
|
|
4890
4654
|
|
|
4891
|
-
const _hoisted_1$
|
|
4892
|
-
const _hoisted_2$
|
|
4893
|
-
const _hoisted_3$
|
|
4894
|
-
const _sfc_main$
|
|
4655
|
+
const _hoisted_1$V = { style: { "display": "flex", "flex-direction": "column", "line-height": "1.2em" } };
|
|
4656
|
+
const _hoisted_2$l = { style: { "font-size": "10px", "color": "rgba(0, 0, 0, 0.6)" } };
|
|
4657
|
+
const _hoisted_3$8 = { class: "el-input__inner t-input__inner" };
|
|
4658
|
+
const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
4895
4659
|
...{
|
|
4896
4660
|
name: "MFieldsDataSourceInput"
|
|
4897
4661
|
},
|
|
@@ -4912,11 +4676,11 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
4912
4676
|
const props = __props;
|
|
4913
4677
|
const emit = __emit;
|
|
4914
4678
|
const { dataSourceService } = inject("services") || {};
|
|
4915
|
-
const
|
|
4679
|
+
const autocompleteRef = useTemplateRef("autocomplete");
|
|
4916
4680
|
const isFocused = ref(false);
|
|
4917
4681
|
const state = ref("");
|
|
4918
4682
|
const displayState = ref([]);
|
|
4919
|
-
const input = computed(() =>
|
|
4683
|
+
const input = computed(() => autocompleteRef.value?.inputRef?.input);
|
|
4920
4684
|
const dataSources = computed(() => dataSourceService?.get("dataSources") || []);
|
|
4921
4685
|
const setDisplayState = () => {
|
|
4922
4686
|
displayState.value = getDisplayField(dataSources.value, state.value);
|
|
@@ -4935,7 +4699,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
4935
4699
|
const focusOffset = selection?.focusOffset || 0;
|
|
4936
4700
|
isFocused.value = true;
|
|
4937
4701
|
await nextTick();
|
|
4938
|
-
|
|
4702
|
+
autocompleteRef.value?.focus();
|
|
4939
4703
|
if (focusOffset && input.value) {
|
|
4940
4704
|
input.value.setSelectionRange(anchorOffset, focusOffset);
|
|
4941
4705
|
}
|
|
@@ -5071,8 +4835,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
5071
4835
|
{
|
|
5072
4836
|
key: 0,
|
|
5073
4837
|
class: "tmagic-design-auto-complete",
|
|
5074
|
-
|
|
5075
|
-
ref: autocomplete,
|
|
4838
|
+
ref: "autocomplete",
|
|
5076
4839
|
modelValue: state.value,
|
|
5077
4840
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.value = $event)
|
|
5078
4841
|
},
|
|
@@ -5091,12 +4854,12 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
5091
4854
|
}
|
|
5092
4855
|
), {
|
|
5093
4856
|
suffix: withCtx(() => [
|
|
5094
|
-
createVNode(_sfc_main$
|
|
4857
|
+
createVNode(_sfc_main$1s, { icon: unref(Coin) }, null, 8, ["icon"])
|
|
5095
4858
|
]),
|
|
5096
4859
|
default: withCtx(({ item }) => [
|
|
5097
|
-
createElementVNode("div", _hoisted_1$
|
|
4860
|
+
createElementVNode("div", _hoisted_1$V, [
|
|
5098
4861
|
createElementVNode("div", null, toDisplayString(item.text), 1),
|
|
5099
|
-
createElementVNode("span", _hoisted_2$
|
|
4862
|
+
createElementVNode("span", _hoisted_2$l, toDisplayString(item.value), 1)
|
|
5100
4863
|
])
|
|
5101
4864
|
]),
|
|
5102
4865
|
_: 1
|
|
@@ -5108,7 +4871,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
5108
4871
|
createElementVNode("div", {
|
|
5109
4872
|
class: normalizeClass(`tmagic-data-source-input-text-wrapper el-input__wrapper ${isFocused.value ? " is-focus" : ""}`)
|
|
5110
4873
|
}, [
|
|
5111
|
-
createElementVNode("div", _hoisted_3$
|
|
4874
|
+
createElementVNode("div", _hoisted_3$8, [
|
|
5112
4875
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayState.value, (item, index) => {
|
|
5113
4876
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
5114
4877
|
item.type === "text" ? (openBlock(), createElementBlock("span", {
|
|
@@ -5126,7 +4889,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
5126
4889
|
}, 1032, ["size"])) : createCommentVNode("", true)
|
|
5127
4890
|
], 64);
|
|
5128
4891
|
}), 256)),
|
|
5129
|
-
createVNode(_sfc_main$
|
|
4892
|
+
createVNode(_sfc_main$1s, {
|
|
5130
4893
|
class: "tmagic-data-source-input-icon",
|
|
5131
4894
|
icon: unref(Coin)
|
|
5132
4895
|
}, null, 8, ["icon"])
|
|
@@ -5137,11 +4900,11 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
5137
4900
|
}
|
|
5138
4901
|
});
|
|
5139
4902
|
|
|
5140
|
-
const _hoisted_1$
|
|
5141
|
-
const _hoisted_2$
|
|
5142
|
-
const _hoisted_3$
|
|
5143
|
-
const _hoisted_4$
|
|
5144
|
-
const _sfc_main$
|
|
4903
|
+
const _hoisted_1$U = { style: { "display": "flex", "margin-bottom": "10px" } };
|
|
4904
|
+
const _hoisted_2$k = { style: { "flex": "1" } };
|
|
4905
|
+
const _hoisted_3$7 = { style: { "flex": "1" } };
|
|
4906
|
+
const _hoisted_4$5 = { class: "dialog-footer" };
|
|
4907
|
+
const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
5145
4908
|
...{
|
|
5146
4909
|
name: "MEditorCodeBlockEditor"
|
|
5147
4910
|
},
|
|
@@ -5167,12 +4930,12 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
5167
4930
|
const { height: codeBlockEditorHeight } = useEditorContentHeight();
|
|
5168
4931
|
const difVisible = ref(false);
|
|
5169
4932
|
const { rect: windowRect } = useWindowRect();
|
|
5170
|
-
const
|
|
4933
|
+
const magicVsEditorRef = useTemplateRef("magicVsEditor");
|
|
5171
4934
|
const diffChange = () => {
|
|
5172
|
-
if (!
|
|
4935
|
+
if (!magicVsEditorRef.value || !formBox.value?.form) {
|
|
5173
4936
|
return;
|
|
5174
4937
|
}
|
|
5175
|
-
formBox.value.form.values.content =
|
|
4938
|
+
formBox.value.form.values.content = magicVsEditorRef.value.getEditorValue();
|
|
5176
4939
|
difVisible.value = false;
|
|
5177
4940
|
};
|
|
5178
4941
|
const defaultParamColConfig = {
|
|
@@ -5314,7 +5077,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
5314
5077
|
});
|
|
5315
5078
|
return (_ctx, _cache) => {
|
|
5316
5079
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
5317
|
-
createVNode(_sfc_main$
|
|
5080
|
+
createVNode(_sfc_main$1k, {
|
|
5318
5081
|
visible: boxVisible.value,
|
|
5319
5082
|
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => boxVisible.value = $event),
|
|
5320
5083
|
width: width.value,
|
|
@@ -5368,7 +5131,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
5368
5131
|
fullscreen: ""
|
|
5369
5132
|
}, {
|
|
5370
5133
|
footer: withCtx(() => [
|
|
5371
|
-
createElementVNode("span", _hoisted_4$
|
|
5134
|
+
createElementVNode("span", _hoisted_4$5, [
|
|
5372
5135
|
createVNode(unref(TMagicButton), {
|
|
5373
5136
|
size: "small",
|
|
5374
5137
|
onClick: _cache[4] || (_cache[4] = ($event) => difVisible.value = false)
|
|
@@ -5391,8 +5154,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
5391
5154
|
])
|
|
5392
5155
|
]),
|
|
5393
5156
|
default: withCtx(() => [
|
|
5394
|
-
createElementVNode("div", _hoisted_1$
|
|
5395
|
-
createElementVNode("div", _hoisted_2$
|
|
5157
|
+
createElementVNode("div", _hoisted_1$U, [
|
|
5158
|
+
createElementVNode("div", _hoisted_2$k, [
|
|
5396
5159
|
createVNode(unref(TMagicTag), {
|
|
5397
5160
|
size: "small",
|
|
5398
5161
|
type: "info"
|
|
@@ -5403,7 +5166,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
5403
5166
|
_: 1
|
|
5404
5167
|
})
|
|
5405
5168
|
]),
|
|
5406
|
-
createElementVNode("div", _hoisted_3$
|
|
5169
|
+
createElementVNode("div", _hoisted_3$7, [
|
|
5407
5170
|
createVNode(unref(TMagicTag), {
|
|
5408
5171
|
size: "small",
|
|
5409
5172
|
type: "success"
|
|
@@ -5415,10 +5178,9 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
5415
5178
|
})
|
|
5416
5179
|
])
|
|
5417
5180
|
]),
|
|
5418
|
-
difVisible.value ? (openBlock(), createBlock(_sfc_main$
|
|
5181
|
+
difVisible.value ? (openBlock(), createBlock(_sfc_main$1r, {
|
|
5419
5182
|
key: 0,
|
|
5420
|
-
|
|
5421
|
-
ref: magicVsEditor,
|
|
5183
|
+
ref: "magicVsEditor",
|
|
5422
5184
|
type: "diff",
|
|
5423
5185
|
language: "json",
|
|
5424
5186
|
initValues: _ctx.content.content,
|
|
@@ -5434,9 +5196,9 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
5434
5196
|
}
|
|
5435
5197
|
});
|
|
5436
5198
|
|
|
5437
|
-
const _hoisted_1$
|
|
5438
|
-
const _hoisted_2$
|
|
5439
|
-
const _sfc_main$
|
|
5199
|
+
const _hoisted_1$T = { class: "m-editor-data-source-methods" };
|
|
5200
|
+
const _hoisted_2$j = { class: "m-editor-data-source-methods-footer" };
|
|
5201
|
+
const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
5440
5202
|
...{
|
|
5441
5203
|
name: "MFieldsDataSourceMethods"
|
|
5442
5204
|
},
|
|
@@ -5457,7 +5219,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
5457
5219
|
const props = __props;
|
|
5458
5220
|
const emit = __emit;
|
|
5459
5221
|
const codeConfig = ref();
|
|
5460
|
-
const
|
|
5222
|
+
const codeBlockEditorRef = useTemplateRef("codeBlockEditor");
|
|
5461
5223
|
let editIndex = -1;
|
|
5462
5224
|
const methodColumns = [
|
|
5463
5225
|
{
|
|
@@ -5496,7 +5258,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
5496
5258
|
};
|
|
5497
5259
|
editIndex = index;
|
|
5498
5260
|
nextTick(() => {
|
|
5499
|
-
|
|
5261
|
+
codeBlockEditorRef.value?.show();
|
|
5500
5262
|
});
|
|
5501
5263
|
}
|
|
5502
5264
|
},
|
|
@@ -5522,7 +5284,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
5522
5284
|
};
|
|
5523
5285
|
editIndex = -1;
|
|
5524
5286
|
nextTick(() => {
|
|
5525
|
-
|
|
5287
|
+
codeBlockEditorRef.value?.show();
|
|
5526
5288
|
});
|
|
5527
5289
|
};
|
|
5528
5290
|
const submitCodeHandler = (value, data) => {
|
|
@@ -5554,15 +5316,15 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
5554
5316
|
}
|
|
5555
5317
|
editIndex = -1;
|
|
5556
5318
|
codeConfig.value = void 0;
|
|
5557
|
-
|
|
5319
|
+
codeBlockEditorRef.value?.hide();
|
|
5558
5320
|
};
|
|
5559
5321
|
return (_ctx, _cache) => {
|
|
5560
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
5322
|
+
return openBlock(), createElementBlock("div", _hoisted_1$T, [
|
|
5561
5323
|
createVNode(unref(MagicTable), {
|
|
5562
5324
|
data: _ctx.model[_ctx.name],
|
|
5563
5325
|
columns: methodColumns
|
|
5564
5326
|
}, null, 8, ["data"]),
|
|
5565
|
-
createElementVNode("div", _hoisted_2$
|
|
5327
|
+
createElementVNode("div", _hoisted_2$j, [
|
|
5566
5328
|
createVNode(unref(TMagicButton), {
|
|
5567
5329
|
size: "small",
|
|
5568
5330
|
type: "primary",
|
|
@@ -5576,10 +5338,9 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
5576
5338
|
_: 1
|
|
5577
5339
|
}, 8, ["disabled"])
|
|
5578
5340
|
]),
|
|
5579
|
-
codeConfig.value ? (openBlock(), createBlock(_sfc_main$
|
|
5341
|
+
codeConfig.value ? (openBlock(), createBlock(_sfc_main$1f, {
|
|
5580
5342
|
key: 0,
|
|
5581
|
-
|
|
5582
|
-
ref: codeBlockEditor,
|
|
5343
|
+
ref: "codeBlockEditor",
|
|
5583
5344
|
disabled: _ctx.disabled,
|
|
5584
5345
|
content: codeConfig.value,
|
|
5585
5346
|
"is-data-source": true,
|
|
@@ -5591,9 +5352,9 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
5591
5352
|
}
|
|
5592
5353
|
});
|
|
5593
5354
|
|
|
5594
|
-
const _hoisted_1$
|
|
5595
|
-
const _hoisted_2$
|
|
5596
|
-
const _sfc_main$
|
|
5355
|
+
const _hoisted_1$S = { class: "m-fields-data-source-method-select" };
|
|
5356
|
+
const _hoisted_2$i = { class: "data-source-method-select-container" };
|
|
5357
|
+
const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
5597
5358
|
...{
|
|
5598
5359
|
name: "MFieldsDataSourceMethodSelect"
|
|
5599
5360
|
},
|
|
@@ -5679,8 +5440,8 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
5679
5440
|
eventBus?.emit("edit-data-source", id);
|
|
5680
5441
|
};
|
|
5681
5442
|
return (_ctx, _cache) => {
|
|
5682
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
5683
|
-
createElementVNode("div", _hoisted_2$
|
|
5443
|
+
return openBlock(), createElementBlock("div", _hoisted_1$S, [
|
|
5444
|
+
createElementVNode("div", _hoisted_2$i, [
|
|
5684
5445
|
createVNode(unref(MContainer), {
|
|
5685
5446
|
class: "select",
|
|
5686
5447
|
config: cascaderConfig.value,
|
|
@@ -5699,7 +5460,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
5699
5460
|
onClick: editCodeHandler
|
|
5700
5461
|
}, {
|
|
5701
5462
|
default: withCtx(() => [
|
|
5702
|
-
createVNode(_sfc_main$
|
|
5463
|
+
createVNode(_sfc_main$1s, {
|
|
5703
5464
|
icon: !notEditable.value ? unref(Edit) : unref(View)
|
|
5704
5465
|
}, null, 8, ["icon"])
|
|
5705
5466
|
]),
|
|
@@ -5709,7 +5470,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
5709
5470
|
_: 1
|
|
5710
5471
|
}, 8, ["content"])) : createCommentVNode("", true)
|
|
5711
5472
|
]),
|
|
5712
|
-
paramsConfig.value.length ? (openBlock(), createBlock(_sfc_main$
|
|
5473
|
+
paramsConfig.value.length ? (openBlock(), createBlock(_sfc_main$1n, {
|
|
5713
5474
|
key: 0,
|
|
5714
5475
|
name: "params",
|
|
5715
5476
|
model: _ctx.model,
|
|
@@ -5723,9 +5484,9 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
5723
5484
|
}
|
|
5724
5485
|
});
|
|
5725
5486
|
|
|
5726
|
-
const _hoisted_1$
|
|
5727
|
-
const _hoisted_2$
|
|
5728
|
-
const _sfc_main$
|
|
5487
|
+
const _hoisted_1$R = { class: "m-editor-data-source-fields" };
|
|
5488
|
+
const _hoisted_2$h = { class: "m-editor-data-source-fields-footer" };
|
|
5489
|
+
const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
5729
5490
|
...{
|
|
5730
5491
|
name: "MFieldsDataSourceMocks"
|
|
5731
5492
|
},
|
|
@@ -5814,7 +5575,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
5814
5575
|
const columns = [
|
|
5815
5576
|
{
|
|
5816
5577
|
type: "expand",
|
|
5817
|
-
component: _sfc_main$
|
|
5578
|
+
component: _sfc_main$1r,
|
|
5818
5579
|
props: (row) => ({
|
|
5819
5580
|
initValues: row.data,
|
|
5820
5581
|
language: "json",
|
|
@@ -5929,12 +5690,12 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
5929
5690
|
const parentFloating = inject("parentFloating", ref(null));
|
|
5930
5691
|
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
|
|
5931
5692
|
return (_ctx, _cache) => {
|
|
5932
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
5693
|
+
return openBlock(), createElementBlock("div", _hoisted_1$R, [
|
|
5933
5694
|
createVNode(unref(MagicTable), {
|
|
5934
5695
|
data: _ctx.model[_ctx.name],
|
|
5935
5696
|
columns
|
|
5936
5697
|
}, null, 8, ["data"]),
|
|
5937
|
-
createElementVNode("div", _hoisted_2$
|
|
5698
|
+
createElementVNode("div", _hoisted_2$h, [
|
|
5938
5699
|
createVNode(unref(TMagicButton), {
|
|
5939
5700
|
size: "small",
|
|
5940
5701
|
type: "primary",
|
|
@@ -5948,7 +5709,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
5948
5709
|
_: 1
|
|
5949
5710
|
}, 8, ["disabled"])
|
|
5950
5711
|
]),
|
|
5951
|
-
createVNode(_sfc_main$
|
|
5712
|
+
createVNode(_sfc_main$1k, {
|
|
5952
5713
|
visible: addDialogVisible.value,
|
|
5953
5714
|
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => addDialogVisible.value = $event),
|
|
5954
5715
|
width: width.value,
|
|
@@ -5975,8 +5736,8 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
5975
5736
|
}
|
|
5976
5737
|
});
|
|
5977
5738
|
|
|
5978
|
-
const _hoisted_1$
|
|
5979
|
-
const _sfc_main$
|
|
5739
|
+
const _hoisted_1$Q = { class: "m-fields-data-source-select" };
|
|
5740
|
+
const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
5980
5741
|
...{
|
|
5981
5742
|
name: "MFieldsDataSourceSelect"
|
|
5982
5743
|
},
|
|
@@ -6033,7 +5794,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
6033
5794
|
eventBus?.emit("edit-data-source", id);
|
|
6034
5795
|
};
|
|
6035
5796
|
return (_ctx, _cache) => {
|
|
6036
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
5797
|
+
return openBlock(), createElementBlock("div", _hoisted_1$Q, [
|
|
6037
5798
|
createVNode(unref(MSelect), {
|
|
6038
5799
|
model: _ctx.model,
|
|
6039
5800
|
name: _ctx.name,
|
|
@@ -6055,7 +5816,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
6055
5816
|
onClick: editHandler
|
|
6056
5817
|
}, {
|
|
6057
5818
|
default: withCtx(() => [
|
|
6058
|
-
createVNode(_sfc_main$
|
|
5819
|
+
createVNode(_sfc_main$1s, {
|
|
6059
5820
|
icon: !notEditable.value ? unref(Edit) : unref(View)
|
|
6060
5821
|
}, null, 8, ["icon"])
|
|
6061
5822
|
]),
|
|
@@ -6069,7 +5830,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
6069
5830
|
}
|
|
6070
5831
|
});
|
|
6071
5832
|
|
|
6072
|
-
const _sfc_main$
|
|
5833
|
+
const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
6073
5834
|
...{
|
|
6074
5835
|
name: "m-fields-display-conds"
|
|
6075
5836
|
},
|
|
@@ -6101,7 +5862,8 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
6101
5862
|
{
|
|
6102
5863
|
type: "table",
|
|
6103
5864
|
name: "cond",
|
|
6104
|
-
operateColWidth:
|
|
5865
|
+
operateColWidth: 100,
|
|
5866
|
+
enableToggleMode: false,
|
|
6105
5867
|
items: [
|
|
6106
5868
|
parentFields.value.length ? {
|
|
6107
5869
|
type: "cascader",
|
|
@@ -6200,12 +5962,12 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
6200
5962
|
}
|
|
6201
5963
|
});
|
|
6202
5964
|
|
|
6203
|
-
const _hoisted_1$
|
|
6204
|
-
const _hoisted_2$
|
|
5965
|
+
const _hoisted_1$P = { class: "m-fields-event-select" };
|
|
5966
|
+
const _hoisted_2$g = {
|
|
6205
5967
|
key: 1,
|
|
6206
5968
|
class: "fullWidth"
|
|
6207
5969
|
};
|
|
6208
|
-
const _sfc_main$
|
|
5970
|
+
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
6209
5971
|
...{
|
|
6210
5972
|
name: "MFieldsEventSelect"
|
|
6211
5973
|
},
|
|
@@ -6481,7 +6243,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
6481
6243
|
const onChangeHandler = (v, eventData) => emit("change", props.model[props.name], eventData);
|
|
6482
6244
|
return (_ctx, _cache) => {
|
|
6483
6245
|
const _component_m_form_table = resolveComponent("m-form-table");
|
|
6484
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
6246
|
+
return openBlock(), createElementBlock("div", _hoisted_1$P, [
|
|
6485
6247
|
isOldVersion.value ? (openBlock(), createBlock(_component_m_form_table, {
|
|
6486
6248
|
key: 0,
|
|
6487
6249
|
name: "events",
|
|
@@ -6490,7 +6252,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
6490
6252
|
model: _ctx.model,
|
|
6491
6253
|
config: tableConfig.value,
|
|
6492
6254
|
onChange: onChangeHandler
|
|
6493
|
-
}, null, 8, ["size", "disabled", "model", "config"])) : (openBlock(), createElementBlock("div", _hoisted_2$
|
|
6255
|
+
}, null, 8, ["size", "disabled", "model", "config"])) : (openBlock(), createElementBlock("div", _hoisted_2$g, [
|
|
6494
6256
|
createVNode(unref(TMagicButton), {
|
|
6495
6257
|
class: "create-button",
|
|
6496
6258
|
type: "primary",
|
|
@@ -6542,29 +6304,29 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
6542
6304
|
}
|
|
6543
6305
|
});
|
|
6544
6306
|
|
|
6545
|
-
const _hoisted_1$
|
|
6307
|
+
const _hoisted_1$O = {
|
|
6546
6308
|
viewBox: "0 0 32 32",
|
|
6547
6309
|
version: "1.1",
|
|
6548
6310
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6549
6311
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
6550
6312
|
};
|
|
6551
|
-
const _sfc_main$
|
|
6313
|
+
const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
6552
6314
|
...{
|
|
6553
6315
|
name: "MEditorCodeIcon"
|
|
6554
6316
|
},
|
|
6555
6317
|
__name: "CodeIcon",
|
|
6556
6318
|
setup(__props) {
|
|
6557
6319
|
return (_ctx, _cache) => {
|
|
6558
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
6320
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$O, _cache[0] || (_cache[0] = [
|
|
6559
6321
|
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)
|
|
6560
6322
|
]));
|
|
6561
6323
|
};
|
|
6562
6324
|
}
|
|
6563
6325
|
});
|
|
6564
6326
|
|
|
6565
|
-
const _hoisted_1$
|
|
6566
|
-
const _hoisted_2$
|
|
6567
|
-
const _sfc_main$
|
|
6327
|
+
const _hoisted_1$N = { class: "m-fields-key-value" };
|
|
6328
|
+
const _hoisted_2$f = { key: 0 };
|
|
6329
|
+
const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
6568
6330
|
...{
|
|
6569
6331
|
name: "MFieldsKeyValue"
|
|
6570
6332
|
},
|
|
@@ -6626,8 +6388,8 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
6626
6388
|
emit("change", v);
|
|
6627
6389
|
};
|
|
6628
6390
|
return (_ctx, _cache) => {
|
|
6629
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
6630
|
-
!showCode.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
6391
|
+
return openBlock(), createElementBlock("div", _hoisted_1$N, [
|
|
6392
|
+
!showCode.value ? (openBlock(), createElementBlock("div", _hoisted_2$f, [
|
|
6631
6393
|
(openBlock(true), createElementBlock(Fragment, null, renderList(records.value, (item, index) => {
|
|
6632
6394
|
return openBlock(), createElementBlock("div", {
|
|
6633
6395
|
class: "m-fields-key-value-item",
|
|
@@ -6676,7 +6438,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
6676
6438
|
_: 1
|
|
6677
6439
|
}, 8, ["size", "disabled", "icon"])
|
|
6678
6440
|
])) : createCommentVNode("", true),
|
|
6679
|
-
_ctx.config.advanced && showCode.value ? (openBlock(), createBlock(_sfc_main$
|
|
6441
|
+
_ctx.config.advanced && showCode.value ? (openBlock(), createBlock(_sfc_main$1r, {
|
|
6680
6442
|
key: 1,
|
|
6681
6443
|
height: "200px",
|
|
6682
6444
|
"init-values": _ctx.model[_ctx.name],
|
|
@@ -6692,7 +6454,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
6692
6454
|
size: "default",
|
|
6693
6455
|
disabled: _ctx.disabled,
|
|
6694
6456
|
link: "",
|
|
6695
|
-
icon: _sfc_main$
|
|
6457
|
+
icon: _sfc_main$18,
|
|
6696
6458
|
onClick: _cache[0] || (_cache[0] = ($event) => showCode.value = !showCode.value)
|
|
6697
6459
|
}, null, 8, ["disabled"])) : createCommentVNode("", true)
|
|
6698
6460
|
]);
|
|
@@ -6700,9 +6462,9 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
6700
6462
|
}
|
|
6701
6463
|
});
|
|
6702
6464
|
|
|
6703
|
-
const _hoisted_1$
|
|
6704
|
-
const _hoisted_2$
|
|
6705
|
-
const _sfc_main$
|
|
6465
|
+
const _hoisted_1$M = { class: "m-fields-page-fragment-select" };
|
|
6466
|
+
const _hoisted_2$e = { class: "page-fragment-select-container" };
|
|
6467
|
+
const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
6706
6468
|
...{
|
|
6707
6469
|
name: "MFieldsPageFragmentSelect"
|
|
6708
6470
|
},
|
|
@@ -6748,8 +6510,8 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
6748
6510
|
};
|
|
6749
6511
|
return (_ctx, _cache) => {
|
|
6750
6512
|
const _component_m_form_container = resolveComponent("m-form-container");
|
|
6751
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
6752
|
-
createElementVNode("div", _hoisted_2$
|
|
6513
|
+
return openBlock(), createElementBlock("div", _hoisted_1$M, [
|
|
6514
|
+
createElementVNode("div", _hoisted_2$e, [
|
|
6753
6515
|
createVNode(_component_m_form_container, {
|
|
6754
6516
|
class: "select",
|
|
6755
6517
|
config: selectConfig,
|
|
@@ -6757,7 +6519,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
6757
6519
|
size: _ctx.size,
|
|
6758
6520
|
onChange: changeHandler
|
|
6759
6521
|
}, null, 8, ["model", "size"]),
|
|
6760
|
-
_ctx.model[_ctx.name] ? (openBlock(), createBlock(_sfc_main$
|
|
6522
|
+
_ctx.model[_ctx.name] ? (openBlock(), createBlock(_sfc_main$1s, {
|
|
6761
6523
|
key: 0,
|
|
6762
6524
|
class: "icon",
|
|
6763
6525
|
icon: unref(Edit),
|
|
@@ -6769,16 +6531,11 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
6769
6531
|
}
|
|
6770
6532
|
});
|
|
6771
6533
|
|
|
6772
|
-
const _hoisted_1$
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
6778
|
-
...{
|
|
6779
|
-
name: "MFieldsUISelect"
|
|
6780
|
-
},
|
|
6781
|
-
__name: "UISelect",
|
|
6534
|
+
const _hoisted_1$L = { class: "background-position-container" };
|
|
6535
|
+
const _hoisted_2$d = { class: "presets-value-list" };
|
|
6536
|
+
const _hoisted_3$6 = { class: "custom-value" };
|
|
6537
|
+
const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
6538
|
+
__name: "BackgroundPosition",
|
|
6782
6539
|
props: {
|
|
6783
6540
|
config: {},
|
|
6784
6541
|
model: {},
|
|
@@ -6792,43 +6549,1173 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
6792
6549
|
},
|
|
6793
6550
|
emits: ["change"],
|
|
6794
6551
|
setup(__props, { emit: __emit }) {
|
|
6795
|
-
const props = __props;
|
|
6796
6552
|
const emit = __emit;
|
|
6797
|
-
const
|
|
6798
|
-
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
|
|
6806
|
-
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
if (detail.nodeType) {
|
|
6810
|
-
id = getIdFromEl()(detail) || id;
|
|
6811
|
-
}
|
|
6812
|
-
if (id) {
|
|
6813
|
-
props.model[props.name] = id;
|
|
6814
|
-
emit("change", id);
|
|
6815
|
-
mForm?.$emit("field-change", props.prop, id);
|
|
6553
|
+
const horizontalList = [
|
|
6554
|
+
{
|
|
6555
|
+
value: "left",
|
|
6556
|
+
text: "左"
|
|
6557
|
+
},
|
|
6558
|
+
{
|
|
6559
|
+
value: "center",
|
|
6560
|
+
text: "中"
|
|
6561
|
+
},
|
|
6562
|
+
{
|
|
6563
|
+
value: "right",
|
|
6564
|
+
text: "右"
|
|
6816
6565
|
}
|
|
6817
|
-
|
|
6818
|
-
|
|
6566
|
+
];
|
|
6567
|
+
const verticalList = [
|
|
6568
|
+
{
|
|
6569
|
+
value: "top",
|
|
6570
|
+
text: "上"
|
|
6571
|
+
},
|
|
6572
|
+
{
|
|
6573
|
+
value: "center",
|
|
6574
|
+
text: "中"
|
|
6575
|
+
},
|
|
6576
|
+
{
|
|
6577
|
+
value: "bottom",
|
|
6578
|
+
text: "下"
|
|
6819
6579
|
}
|
|
6580
|
+
];
|
|
6581
|
+
const list = verticalList.map(
|
|
6582
|
+
(vertical) => horizontalList.map((horizontal) => ({
|
|
6583
|
+
value: `${horizontal.value} ${vertical.value}`,
|
|
6584
|
+
tips: `${horizontal.text}${vertical.text}`,
|
|
6585
|
+
class: `${horizontal.value}-${vertical.value}`
|
|
6586
|
+
}))
|
|
6587
|
+
).flat();
|
|
6588
|
+
const changeHandler = (v) => {
|
|
6589
|
+
emit("change", v);
|
|
6820
6590
|
};
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6591
|
+
return (_ctx, _cache) => {
|
|
6592
|
+
return openBlock(), createElementBlock("div", _hoisted_1$L, [
|
|
6593
|
+
createElementVNode("div", _hoisted_2$d, [
|
|
6594
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(list), (item, index) => {
|
|
6595
|
+
return openBlock(), createBlock(unref(TMagicButton), {
|
|
6596
|
+
key: index,
|
|
6597
|
+
link: "",
|
|
6598
|
+
class: normalizeClass(_ctx.model[_ctx.name] === item.value && "btn-active"),
|
|
6599
|
+
onClick: ($event) => changeHandler(item.value)
|
|
6600
|
+
}, {
|
|
6601
|
+
default: withCtx(() => [
|
|
6602
|
+
createElementVNode("div", {
|
|
6603
|
+
class: normalizeClass(["position-icon", item.class, _ctx.model[_ctx.name] === item.value && "active"])
|
|
6604
|
+
}, null, 2)
|
|
6605
|
+
]),
|
|
6606
|
+
_: 2
|
|
6607
|
+
}, 1032, ["class", "onClick"]);
|
|
6608
|
+
}), 128))
|
|
6609
|
+
]),
|
|
6610
|
+
createElementVNode("div", _hoisted_3$6, [
|
|
6611
|
+
createVNode(unref(TMagicInput), {
|
|
6612
|
+
modelValue: _ctx.model[_ctx.name],
|
|
6613
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
6614
|
+
size: "small",
|
|
6615
|
+
placeholder: "自定义背景位置",
|
|
6616
|
+
clearable: "",
|
|
6617
|
+
onChange: changeHandler
|
|
6618
|
+
}, null, 8, ["modelValue"])
|
|
6619
|
+
])
|
|
6620
|
+
]);
|
|
6621
|
+
};
|
|
6622
|
+
}
|
|
6623
|
+
});
|
|
6624
|
+
|
|
6625
|
+
const _export_sfc = (sfc, props) => {
|
|
6626
|
+
const target = sfc.__vccOpts || sfc;
|
|
6627
|
+
for (const [key, val] of props) {
|
|
6628
|
+
target[key] = val;
|
|
6629
|
+
}
|
|
6630
|
+
return target;
|
|
6631
|
+
};
|
|
6632
|
+
|
|
6633
|
+
const _sfc_main$14 = {};
|
|
6634
|
+
|
|
6635
|
+
const _hoisted_1$K = {
|
|
6636
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6637
|
+
viewBox: "0 0 1024 1024"
|
|
6638
|
+
};
|
|
6639
|
+
|
|
6640
|
+
function _sfc_render$k(_ctx, _cache) {
|
|
6641
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$K, _cache[0] || (_cache[0] = [
|
|
6642
|
+
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)
|
|
6643
|
+
])))
|
|
6644
|
+
}
|
|
6645
|
+
const BackgroundRepeat = /*#__PURE__*/_export_sfc(_sfc_main$14, [['render',_sfc_render$k]]);
|
|
6646
|
+
|
|
6647
|
+
const _sfc_main$13 = {};
|
|
6648
|
+
|
|
6649
|
+
const _hoisted_1$J = {
|
|
6650
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6651
|
+
viewBox: "0 0 1024 1024"
|
|
6652
|
+
};
|
|
6653
|
+
|
|
6654
|
+
function _sfc_render$j(_ctx, _cache) {
|
|
6655
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$J, _cache[0] || (_cache[0] = [
|
|
6656
|
+
createElementVNode("path", {
|
|
6657
|
+
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",
|
|
6658
|
+
fill: "#333333"
|
|
6659
|
+
}, null, -1)
|
|
6660
|
+
])))
|
|
6661
|
+
}
|
|
6662
|
+
const BackgroundRepeatX = /*#__PURE__*/_export_sfc(_sfc_main$13, [['render',_sfc_render$j]]);
|
|
6663
|
+
|
|
6664
|
+
const _sfc_main$12 = {};
|
|
6665
|
+
|
|
6666
|
+
const _hoisted_1$I = {
|
|
6667
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6668
|
+
viewBox: "0 0 1024 1024"
|
|
6669
|
+
};
|
|
6670
|
+
|
|
6671
|
+
function _sfc_render$i(_ctx, _cache) {
|
|
6672
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$I, _cache[0] || (_cache[0] = [
|
|
6673
|
+
createElementVNode("path", {
|
|
6674
|
+
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",
|
|
6675
|
+
fill: "#333333"
|
|
6676
|
+
}, null, -1)
|
|
6677
|
+
])))
|
|
6678
|
+
}
|
|
6679
|
+
const BackgroundRepeatY = /*#__PURE__*/_export_sfc(_sfc_main$12, [['render',_sfc_render$i]]);
|
|
6680
|
+
|
|
6681
|
+
const _sfc_main$11 = {};
|
|
6682
|
+
|
|
6683
|
+
const _hoisted_1$H = {
|
|
6684
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6685
|
+
viewBox: "0 0 1024 1024"
|
|
6686
|
+
};
|
|
6687
|
+
|
|
6688
|
+
function _sfc_render$h(_ctx, _cache) {
|
|
6689
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$H, _cache[0] || (_cache[0] = [
|
|
6690
|
+
createElementVNode("path", {
|
|
6691
|
+
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",
|
|
6692
|
+
fill: "#5D5D5D"
|
|
6693
|
+
}, null, -1)
|
|
6694
|
+
])))
|
|
6695
|
+
}
|
|
6696
|
+
const BackgroundNoRepeat = /*#__PURE__*/_export_sfc(_sfc_main$11, [['render',_sfc_render$h]]);
|
|
6697
|
+
|
|
6698
|
+
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
6699
|
+
__name: "Background",
|
|
6700
|
+
props: {
|
|
6701
|
+
values: {}
|
|
6702
|
+
},
|
|
6703
|
+
emits: ["change"],
|
|
6704
|
+
setup(__props, { emit: __emit }) {
|
|
6705
|
+
const emit = __emit;
|
|
6706
|
+
const config = {
|
|
6707
|
+
items: [
|
|
6708
|
+
{
|
|
6709
|
+
name: "backgroundColor",
|
|
6710
|
+
text: "背景色",
|
|
6711
|
+
labelWidth: "68px",
|
|
6712
|
+
type: "data-source-field-select",
|
|
6713
|
+
fieldConfig: {
|
|
6714
|
+
type: "colorPicker"
|
|
6715
|
+
}
|
|
6716
|
+
},
|
|
6717
|
+
{
|
|
6718
|
+
name: "backgroundImage",
|
|
6719
|
+
text: "背景图",
|
|
6720
|
+
labelWidth: "68px",
|
|
6721
|
+
type: "data-source-field-select",
|
|
6722
|
+
fieldConfig: {
|
|
6723
|
+
type: "img-upload"
|
|
6724
|
+
}
|
|
6725
|
+
},
|
|
6726
|
+
{
|
|
6727
|
+
name: "backgroundSize",
|
|
6728
|
+
text: "背景尺寸",
|
|
6729
|
+
type: "radioGroup",
|
|
6730
|
+
childType: "button",
|
|
6731
|
+
labelWidth: "68px",
|
|
6732
|
+
options: [
|
|
6733
|
+
{ value: "auto", text: "默认", tooltip: "默认 auto" },
|
|
6734
|
+
{ value: "contain", text: "等比填充", tooltip: "等比填充 contain" },
|
|
6735
|
+
{ value: "cover", text: "等比覆盖", tooltip: "等比覆盖 cover" }
|
|
6736
|
+
]
|
|
6737
|
+
},
|
|
6738
|
+
{
|
|
6739
|
+
name: "backgroundRepeat",
|
|
6740
|
+
text: "重复显示",
|
|
6741
|
+
type: "radioGroup",
|
|
6742
|
+
childType: "button",
|
|
6743
|
+
labelWidth: "68px",
|
|
6744
|
+
options: [
|
|
6745
|
+
{ value: "repeat", icon: markRaw(BackgroundRepeat), tooltip: "垂直和水平方向重复 repeat" },
|
|
6746
|
+
{ value: "repeat-x", icon: markRaw(BackgroundRepeatX), tooltip: "水平方向重复 repeat-x" },
|
|
6747
|
+
{ value: "repeat-y", icon: markRaw(BackgroundRepeatY), tooltip: "垂直方向重复 repeat-y" },
|
|
6748
|
+
{ value: "no-repeat", icon: markRaw(BackgroundNoRepeat), tooltip: "不重复 no-repeat" }
|
|
6749
|
+
]
|
|
6750
|
+
},
|
|
6751
|
+
{
|
|
6752
|
+
name: "backgroundPosition",
|
|
6753
|
+
text: "背景定位",
|
|
6754
|
+
type: "component",
|
|
6755
|
+
component: _sfc_main$15,
|
|
6756
|
+
labelWidth: "68px"
|
|
6757
|
+
}
|
|
6758
|
+
]
|
|
6759
|
+
};
|
|
6760
|
+
const change = (value, eventData) => {
|
|
6761
|
+
emit("change", value, eventData);
|
|
6762
|
+
};
|
|
6763
|
+
return (_ctx, _cache) => {
|
|
6764
|
+
return openBlock(), createBlock(unref(MContainer), {
|
|
6765
|
+
config,
|
|
6766
|
+
model: _ctx.values,
|
|
6767
|
+
onChange: change
|
|
6768
|
+
}, null, 8, ["model"]);
|
|
6769
|
+
};
|
|
6770
|
+
}
|
|
6771
|
+
});
|
|
6772
|
+
|
|
6773
|
+
const _sfc_main$$ = {};
|
|
6774
|
+
|
|
6775
|
+
const _hoisted_1$G = {
|
|
6776
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6777
|
+
viewBox: "0 0 1024 1024"
|
|
6778
|
+
};
|
|
6779
|
+
|
|
6780
|
+
function _sfc_render$g(_ctx, _cache) {
|
|
6781
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$G, _cache[0] || (_cache[0] = [
|
|
6782
|
+
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)
|
|
6783
|
+
])))
|
|
6784
|
+
}
|
|
6785
|
+
const AlignLeft = /*#__PURE__*/_export_sfc(_sfc_main$$, [['render',_sfc_render$g]]);
|
|
6786
|
+
|
|
6787
|
+
const _sfc_main$_ = {};
|
|
6788
|
+
|
|
6789
|
+
const _hoisted_1$F = {
|
|
6790
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6791
|
+
viewBox: "0 0 1024 1024"
|
|
6792
|
+
};
|
|
6793
|
+
|
|
6794
|
+
function _sfc_render$f(_ctx, _cache) {
|
|
6795
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$F, _cache[0] || (_cache[0] = [
|
|
6796
|
+
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)
|
|
6797
|
+
])))
|
|
6798
|
+
}
|
|
6799
|
+
const AlignCenter = /*#__PURE__*/_export_sfc(_sfc_main$_, [['render',_sfc_render$f]]);
|
|
6800
|
+
|
|
6801
|
+
const _sfc_main$Z = {};
|
|
6802
|
+
|
|
6803
|
+
const _hoisted_1$E = {
|
|
6804
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6805
|
+
viewBox: "0 0 1024 1024"
|
|
6806
|
+
};
|
|
6807
|
+
|
|
6808
|
+
function _sfc_render$e(_ctx, _cache) {
|
|
6809
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$E, _cache[0] || (_cache[0] = [
|
|
6810
|
+
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)
|
|
6811
|
+
])))
|
|
6812
|
+
}
|
|
6813
|
+
const AlignRight = /*#__PURE__*/_export_sfc(_sfc_main$Z, [['render',_sfc_render$e]]);
|
|
6814
|
+
|
|
6815
|
+
const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
6816
|
+
__name: "Font",
|
|
6817
|
+
props: {
|
|
6818
|
+
values: {}
|
|
6819
|
+
},
|
|
6820
|
+
emits: ["change"],
|
|
6821
|
+
setup(__props, { emit: __emit }) {
|
|
6822
|
+
const emit = __emit;
|
|
6823
|
+
const config = {
|
|
6824
|
+
items: [
|
|
6825
|
+
{
|
|
6826
|
+
type: "row",
|
|
6827
|
+
items: [
|
|
6828
|
+
{
|
|
6829
|
+
labelWidth: "68px",
|
|
6830
|
+
name: "fontSize",
|
|
6831
|
+
text: "字号",
|
|
6832
|
+
type: "data-source-field-select",
|
|
6833
|
+
fieldConfig: {
|
|
6834
|
+
type: "text"
|
|
6835
|
+
}
|
|
6836
|
+
},
|
|
6837
|
+
{
|
|
6838
|
+
labelWidth: "68px",
|
|
6839
|
+
name: "lineHeight",
|
|
6840
|
+
text: "行高",
|
|
6841
|
+
type: "data-source-field-select",
|
|
6842
|
+
fieldConfig: {
|
|
6843
|
+
type: "text"
|
|
6844
|
+
}
|
|
6845
|
+
}
|
|
6846
|
+
]
|
|
6847
|
+
},
|
|
6848
|
+
{
|
|
6849
|
+
name: "fontWeight",
|
|
6850
|
+
text: "字重",
|
|
6851
|
+
labelWidth: "68px",
|
|
6852
|
+
type: "data-source-field-select",
|
|
6853
|
+
fieldConfig: {
|
|
6854
|
+
type: "select",
|
|
6855
|
+
options: ["normal", "bold"].concat(
|
|
6856
|
+
Array(7).fill(1).map((x, i) => `${i + 1}00`)
|
|
6857
|
+
).map((item) => ({
|
|
6858
|
+
value: item,
|
|
6859
|
+
text: item
|
|
6860
|
+
}))
|
|
6861
|
+
}
|
|
6862
|
+
},
|
|
6863
|
+
{
|
|
6864
|
+
labelWidth: "68px",
|
|
6865
|
+
name: "color",
|
|
6866
|
+
text: "颜色",
|
|
6867
|
+
type: "data-source-field-select",
|
|
6868
|
+
fieldConfig: {
|
|
6869
|
+
type: "colorPicker"
|
|
6870
|
+
}
|
|
6871
|
+
},
|
|
6872
|
+
{
|
|
6873
|
+
name: "textAlign",
|
|
6874
|
+
text: "对齐",
|
|
6875
|
+
type: "radioGroup",
|
|
6876
|
+
childType: "button",
|
|
6877
|
+
labelWidth: "68px",
|
|
6878
|
+
options: [
|
|
6879
|
+
{ value: "left", icon: markRaw(AlignLeft), tooltip: "左对齐 row" },
|
|
6880
|
+
{ value: "center", icon: markRaw(AlignCenter), tooltip: "居中对齐 center" },
|
|
6881
|
+
{ value: "right", icon: markRaw(AlignRight), tooltip: "右对齐 right" }
|
|
6882
|
+
]
|
|
6883
|
+
}
|
|
6884
|
+
]
|
|
6885
|
+
};
|
|
6886
|
+
const change = (value, eventData) => {
|
|
6887
|
+
emit("change", value, eventData);
|
|
6888
|
+
};
|
|
6889
|
+
return (_ctx, _cache) => {
|
|
6890
|
+
return openBlock(), createBlock(unref(MContainer), {
|
|
6891
|
+
config,
|
|
6892
|
+
model: _ctx.values,
|
|
6893
|
+
onChange: change
|
|
6894
|
+
}, null, 8, ["model"]);
|
|
6895
|
+
};
|
|
6896
|
+
}
|
|
6897
|
+
});
|
|
6898
|
+
|
|
6899
|
+
const _hoisted_1$D = { class: "layout-box-container" };
|
|
6900
|
+
const _hoisted_2$c = {
|
|
6901
|
+
key: 0,
|
|
6902
|
+
class: "help-txt"
|
|
6903
|
+
};
|
|
6904
|
+
const _hoisted_3$5 = { class: "next-input" };
|
|
6905
|
+
const _hoisted_4$4 = ["onUpdate:modelValue", "title", "onChange"];
|
|
6906
|
+
const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
6907
|
+
__name: "Box",
|
|
6908
|
+
props: {
|
|
6909
|
+
model: {}
|
|
6910
|
+
},
|
|
6911
|
+
emits: ["change"],
|
|
6912
|
+
setup(__props, { emit: __emit }) {
|
|
6913
|
+
const list = [
|
|
6914
|
+
{
|
|
6915
|
+
name: "marginTop",
|
|
6916
|
+
class: "outer-top-border"
|
|
6917
|
+
},
|
|
6918
|
+
{
|
|
6919
|
+
name: "marginRight",
|
|
6920
|
+
class: "outer-right-border"
|
|
6921
|
+
},
|
|
6922
|
+
{
|
|
6923
|
+
name: "marginBottom",
|
|
6924
|
+
text: "MARGIN",
|
|
6925
|
+
class: "outer-bottom-border"
|
|
6926
|
+
},
|
|
6927
|
+
{
|
|
6928
|
+
name: "marginLeft",
|
|
6929
|
+
class: "outer-left-border"
|
|
6930
|
+
},
|
|
6931
|
+
{
|
|
6932
|
+
name: "paddingTop",
|
|
6933
|
+
class: "inner-top-border"
|
|
6934
|
+
},
|
|
6935
|
+
{
|
|
6936
|
+
name: "paddingRight",
|
|
6937
|
+
class: "inner-right-border"
|
|
6938
|
+
},
|
|
6939
|
+
{
|
|
6940
|
+
name: "paddingBottom",
|
|
6941
|
+
text: "PADDING",
|
|
6942
|
+
class: "inner-bottom-border"
|
|
6943
|
+
},
|
|
6944
|
+
{
|
|
6945
|
+
name: "paddingLeft",
|
|
6946
|
+
class: "inner-left-border"
|
|
6947
|
+
}
|
|
6948
|
+
];
|
|
6949
|
+
const emit = __emit;
|
|
6950
|
+
const change = (event, name) => {
|
|
6951
|
+
emit("change", event.target.value, {
|
|
6952
|
+
modifyKey: name
|
|
6953
|
+
});
|
|
6954
|
+
};
|
|
6955
|
+
return (_ctx, _cache) => {
|
|
6956
|
+
return openBlock(), createElementBlock("div", _hoisted_1$D, [
|
|
6957
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(list, (item, index) => {
|
|
6958
|
+
return createElementVNode("div", {
|
|
6959
|
+
key: index,
|
|
6960
|
+
class: normalizeClass(item.class)
|
|
6961
|
+
}, [
|
|
6962
|
+
item.text ? (openBlock(), createElementBlock("span", _hoisted_2$c, toDisplayString(item.text), 1)) : createCommentVNode("", true),
|
|
6963
|
+
createElementVNode("span", _hoisted_3$5, [
|
|
6964
|
+
withDirectives(createElementVNode("input", {
|
|
6965
|
+
"onUpdate:modelValue": ($event) => _ctx.model[item.name] = $event,
|
|
6966
|
+
title: _ctx.model[item.name],
|
|
6967
|
+
onChange: ($event) => change($event, item.name),
|
|
6968
|
+
placeholder: "0"
|
|
6969
|
+
}, null, 40, _hoisted_4$4), [
|
|
6970
|
+
[vModelText, _ctx.model[item.name]]
|
|
6971
|
+
])
|
|
6972
|
+
])
|
|
6973
|
+
], 2);
|
|
6974
|
+
}), 64))
|
|
6975
|
+
]);
|
|
6976
|
+
};
|
|
6977
|
+
}
|
|
6978
|
+
});
|
|
6979
|
+
|
|
6980
|
+
const _sfc_main$W = {};
|
|
6981
|
+
|
|
6982
|
+
const _hoisted_1$C = {
|
|
6983
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6984
|
+
viewBox: "0 0 1024 1024"
|
|
6985
|
+
};
|
|
6986
|
+
|
|
6987
|
+
function _sfc_render$d(_ctx, _cache) {
|
|
6988
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$C, _cache[0] || (_cache[0] = [
|
|
6989
|
+
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)
|
|
6990
|
+
])))
|
|
6991
|
+
}
|
|
6992
|
+
const DisplayBlock = /*#__PURE__*/_export_sfc(_sfc_main$W, [['render',_sfc_render$d]]);
|
|
6993
|
+
|
|
6994
|
+
const _sfc_main$V = {};
|
|
6995
|
+
|
|
6996
|
+
const _hoisted_1$B = {
|
|
6997
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6998
|
+
viewBox: "0 0 1024 1024"
|
|
6999
|
+
};
|
|
7000
|
+
|
|
7001
|
+
function _sfc_render$c(_ctx, _cache) {
|
|
7002
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$B, _cache[0] || (_cache[0] = [
|
|
7003
|
+
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)
|
|
7004
|
+
])))
|
|
7005
|
+
}
|
|
7006
|
+
const DisplayFlex = /*#__PURE__*/_export_sfc(_sfc_main$V, [['render',_sfc_render$c]]);
|
|
7007
|
+
|
|
7008
|
+
const _sfc_main$U = {};
|
|
7009
|
+
|
|
7010
|
+
const _hoisted_1$A = {
|
|
7011
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7012
|
+
viewBox: "0 0 1024 1024"
|
|
7013
|
+
};
|
|
7014
|
+
|
|
7015
|
+
function _sfc_render$b(_ctx, _cache) {
|
|
7016
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$A, _cache[0] || (_cache[0] = [
|
|
7017
|
+
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)
|
|
7018
|
+
])))
|
|
7019
|
+
}
|
|
7020
|
+
const DisplayInline = /*#__PURE__*/_export_sfc(_sfc_main$U, [['render',_sfc_render$b]]);
|
|
7021
|
+
|
|
7022
|
+
const _sfc_main$T = {};
|
|
7023
|
+
|
|
7024
|
+
const _hoisted_1$z = {
|
|
7025
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7026
|
+
viewBox: "0 0 1024 1024"
|
|
7027
|
+
};
|
|
7028
|
+
|
|
7029
|
+
function _sfc_render$a(_ctx, _cache) {
|
|
7030
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$z, _cache[0] || (_cache[0] = [
|
|
7031
|
+
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)
|
|
7032
|
+
])))
|
|
7033
|
+
}
|
|
7034
|
+
const DisplayInlineBlock = /*#__PURE__*/_export_sfc(_sfc_main$T, [['render',_sfc_render$a]]);
|
|
7035
|
+
|
|
7036
|
+
const _sfc_main$S = {};
|
|
7037
|
+
|
|
7038
|
+
const _hoisted_1$y = {
|
|
7039
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7040
|
+
viewBox: "0 0 1024 1024"
|
|
7041
|
+
};
|
|
7042
|
+
|
|
7043
|
+
function _sfc_render$9(_ctx, _cache) {
|
|
7044
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$y, _cache[0] || (_cache[0] = [
|
|
7045
|
+
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)
|
|
7046
|
+
])))
|
|
7047
|
+
}
|
|
7048
|
+
const DisplayNone = /*#__PURE__*/_export_sfc(_sfc_main$S, [['render',_sfc_render$9]]);
|
|
7049
|
+
|
|
7050
|
+
const _sfc_main$R = {};
|
|
7051
|
+
|
|
7052
|
+
const _hoisted_1$x = {
|
|
7053
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7054
|
+
viewBox: "0 0 1024 1024"
|
|
7055
|
+
};
|
|
7056
|
+
|
|
7057
|
+
function _sfc_render$8(_ctx, _cache) {
|
|
7058
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$x, _cache[0] || (_cache[0] = [
|
|
7059
|
+
createElementVNode("path", { d: "M896 320H128V0h768v320z m0 320H128v-256h768v256z m-128 192l-256 192-256-192 192-0.032V704h128v128h192z" }, null, -1)
|
|
7060
|
+
])))
|
|
7061
|
+
}
|
|
7062
|
+
const FlexDirectionColumn = /*#__PURE__*/_export_sfc(_sfc_main$R, [['render',_sfc_render$8]]);
|
|
7063
|
+
|
|
7064
|
+
const _sfc_main$Q = {};
|
|
7065
|
+
|
|
7066
|
+
const _hoisted_1$w = {
|
|
7067
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7068
|
+
viewBox: "0 0 1024 1024"
|
|
7069
|
+
};
|
|
7070
|
+
|
|
7071
|
+
function _sfc_render$7(_ctx, _cache) {
|
|
7072
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$w, _cache[0] || (_cache[0] = [
|
|
7073
|
+
createElementVNode("path", { d: "M896 704H128v320h768V704z m0-320H128v256h768v-256z m-128-192l-256-192-256 192 192 0.032V320h128V192h192z" }, null, -1)
|
|
7074
|
+
])))
|
|
7075
|
+
}
|
|
7076
|
+
const FlexDirectionColumnReverse = /*#__PURE__*/_export_sfc(_sfc_main$Q, [['render',_sfc_render$7]]);
|
|
7077
|
+
|
|
7078
|
+
const _sfc_main$P = {};
|
|
7079
|
+
|
|
7080
|
+
const _hoisted_1$v = {
|
|
7081
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7082
|
+
viewBox: "0 0 1024 1024"
|
|
7083
|
+
};
|
|
7084
|
+
|
|
7085
|
+
function _sfc_render$6(_ctx, _cache) {
|
|
7086
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$v, _cache[0] || (_cache[0] = [
|
|
7087
|
+
createElementVNode("path", { d: "M320 128v768H0V128h320z m320 0v768h-256V128h256z m192 128l192 256-192 256-0.032-192H704v-128h128V256z" }, null, -1)
|
|
7088
|
+
])))
|
|
7089
|
+
}
|
|
7090
|
+
const FlexDirectionRow = /*#__PURE__*/_export_sfc(_sfc_main$P, [['render',_sfc_render$6]]);
|
|
7091
|
+
|
|
7092
|
+
const _sfc_main$O = {};
|
|
7093
|
+
|
|
7094
|
+
const _hoisted_1$u = {
|
|
7095
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7096
|
+
viewBox: "0 0 1024 1024"
|
|
7097
|
+
};
|
|
7098
|
+
|
|
7099
|
+
function _sfc_render$5(_ctx, _cache) {
|
|
7100
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$u, _cache[0] || (_cache[0] = [
|
|
7101
|
+
createElementVNode("path", { d: "M704 128v768h320V128H704zM384 128v768h256V128h-256zM192 256l-192 256 192 256 0.032-192H320v-128H192V256z" }, null, -1)
|
|
7102
|
+
])))
|
|
7103
|
+
}
|
|
7104
|
+
const FlexDirectionRowReverse = /*#__PURE__*/_export_sfc(_sfc_main$O, [['render',_sfc_render$5]]);
|
|
7105
|
+
|
|
7106
|
+
const _sfc_main$N = {};
|
|
7107
|
+
|
|
7108
|
+
const _hoisted_1$t = {
|
|
7109
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7110
|
+
viewBox: "0 0 1024 1024"
|
|
7111
|
+
};
|
|
7112
|
+
|
|
7113
|
+
function _sfc_render$4(_ctx, _cache) {
|
|
7114
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$t, _cache[0] || (_cache[0] = [
|
|
7115
|
+
createElementVNode("path", { d: "M480 1024V0h64v1024h-64z m128-64V64h320v896H608zM96 960V64h320v896H96z" }, null, -1)
|
|
7116
|
+
])))
|
|
7117
|
+
}
|
|
7118
|
+
const JustifyContentCenter = /*#__PURE__*/_export_sfc(_sfc_main$N, [['render',_sfc_render$4]]);
|
|
7119
|
+
|
|
7120
|
+
const _sfc_main$M = {};
|
|
7121
|
+
|
|
7122
|
+
const _hoisted_1$s = {
|
|
7123
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7124
|
+
viewBox: "0 0 1024 1024"
|
|
7125
|
+
};
|
|
7126
|
+
|
|
7127
|
+
function _sfc_render$3(_ctx, _cache) {
|
|
7128
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$s, _cache[0] || (_cache[0] = [
|
|
7129
|
+
createElementVNode("path", { d: "M416 160H96v704h320V160z m384 0H480v704h320V160z m128-160h-64v1024h64V0z" }, null, -1)
|
|
7130
|
+
])))
|
|
7131
|
+
}
|
|
7132
|
+
const JustifyContentFlexEnd = /*#__PURE__*/_export_sfc(_sfc_main$M, [['render',_sfc_render$3]]);
|
|
7133
|
+
|
|
7134
|
+
const _sfc_main$L = {};
|
|
7135
|
+
|
|
7136
|
+
const _hoisted_1$r = {
|
|
7137
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7138
|
+
viewBox: "0 0 1024 1024"
|
|
7139
|
+
};
|
|
7140
|
+
|
|
7141
|
+
function _sfc_render$2(_ctx, _cache) {
|
|
7142
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$r, _cache[0] || (_cache[0] = [
|
|
7143
|
+
createElementVNode("path", { d: "M608 160h320v704H608V160zM224 160h320v704H224V160zM96 0h64v1024H96V0z" }, null, -1)
|
|
7144
|
+
])))
|
|
7145
|
+
}
|
|
7146
|
+
const JustifyContentFlexStart = /*#__PURE__*/_export_sfc(_sfc_main$L, [['render',_sfc_render$2]]);
|
|
7147
|
+
|
|
7148
|
+
const _sfc_main$K = {};
|
|
7149
|
+
|
|
7150
|
+
const _hoisted_1$q = {
|
|
7151
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7152
|
+
viewBox: "0 0 1024 1024"
|
|
7153
|
+
};
|
|
7154
|
+
|
|
7155
|
+
function _sfc_render$1(_ctx, _cache) {
|
|
7156
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$q, _cache[0] || (_cache[0] = [
|
|
7157
|
+
createElementVNode("path", { d: "M320 864H192v160H128v-160H0V160h128V0h64v160h128v704z m704 0h-128v160h-64v-160h-128V160h128V0h64v160h128v704z" }, null, -1)
|
|
7158
|
+
])))
|
|
7159
|
+
}
|
|
7160
|
+
const JustifyContentSpaceAround = /*#__PURE__*/_export_sfc(_sfc_main$K, [['render',_sfc_render$1]]);
|
|
7161
|
+
|
|
7162
|
+
const _sfc_main$J = {};
|
|
7163
|
+
|
|
7164
|
+
const _hoisted_1$p = {
|
|
7165
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7166
|
+
viewBox: "0 0 1024 1024"
|
|
7167
|
+
};
|
|
7168
|
+
|
|
7169
|
+
function _sfc_render(_ctx, _cache) {
|
|
7170
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$p, _cache[0] || (_cache[0] = [
|
|
7171
|
+
createElementVNode("path", { d: "M64 1024H0V0h64v1024z m384-160H128V160h320v704z m448 0H576V160h320v704z m128 160h-64V0h64v1024z" }, null, -1)
|
|
7172
|
+
])))
|
|
7173
|
+
}
|
|
7174
|
+
const JustifyContentSpaceBetween = /*#__PURE__*/_export_sfc(_sfc_main$J, [['render',_sfc_render]]);
|
|
7175
|
+
|
|
7176
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
7177
|
+
__name: "Layout",
|
|
7178
|
+
props: {
|
|
7179
|
+
values: {}
|
|
7180
|
+
},
|
|
7181
|
+
emits: ["change"],
|
|
7182
|
+
setup(__props, { emit: __emit }) {
|
|
7183
|
+
const emit = __emit;
|
|
7184
|
+
const config = {
|
|
7185
|
+
items: [
|
|
7186
|
+
{
|
|
7187
|
+
name: "display",
|
|
7188
|
+
text: "模式",
|
|
7189
|
+
type: "radioGroup",
|
|
7190
|
+
childType: "button",
|
|
7191
|
+
labelWidth: "68px",
|
|
7192
|
+
options: [
|
|
7193
|
+
{ value: "inline", icon: markRaw(DisplayInline), tooltip: "内联布局 inline" },
|
|
7194
|
+
{ value: "flex", icon: markRaw(DisplayFlex), tooltip: "弹性布局 flex" },
|
|
7195
|
+
{ value: "block", icon: markRaw(DisplayBlock), tooltip: "块级布局 block" },
|
|
7196
|
+
{ value: "inline-block", icon: markRaw(DisplayInlineBlock), tooltip: "内联块布局 inline-block" },
|
|
7197
|
+
{ value: "none", icon: markRaw(DisplayNone), tooltip: "隐藏 none" }
|
|
7198
|
+
]
|
|
7199
|
+
},
|
|
7200
|
+
{
|
|
7201
|
+
name: "flexDirection",
|
|
7202
|
+
text: "主轴方向",
|
|
7203
|
+
type: "radioGroup",
|
|
7204
|
+
childType: "button",
|
|
7205
|
+
labelWidth: "68px",
|
|
7206
|
+
options: [
|
|
7207
|
+
{ value: "row", icon: markRaw(FlexDirectionRow), tooltip: "水平方向 起点在左侧 row" },
|
|
7208
|
+
{ value: "row-reverse", icon: markRaw(FlexDirectionRowReverse), tooltip: "水平方向 起点在右侧 row-reverse" },
|
|
7209
|
+
{ value: "column", icon: markRaw(FlexDirectionColumn), tooltip: "垂直方向 起点在上沿 column" },
|
|
7210
|
+
{
|
|
7211
|
+
value: "column-reverse",
|
|
7212
|
+
icon: markRaw(FlexDirectionColumnReverse),
|
|
7213
|
+
tooltip: "垂直方向 起点在下沿 column-reverse"
|
|
7214
|
+
}
|
|
7215
|
+
],
|
|
7216
|
+
display: (mForm, { model }) => model.display === "flex"
|
|
7217
|
+
},
|
|
7218
|
+
{
|
|
7219
|
+
name: "justifyContent",
|
|
7220
|
+
text: "主轴对齐",
|
|
7221
|
+
type: "radioGroup",
|
|
7222
|
+
childType: "button",
|
|
7223
|
+
labelWidth: "68px",
|
|
7224
|
+
options: [
|
|
7225
|
+
{ value: "flex-start", icon: markRaw(JustifyContentFlexStart), tooltip: "左对齐 flex-start" },
|
|
7226
|
+
{ value: "flex-end", icon: markRaw(JustifyContentFlexEnd), tooltip: "右对齐 flex-end" },
|
|
7227
|
+
{ value: "center", icon: markRaw(JustifyContentCenter), tooltip: "居中 center" },
|
|
7228
|
+
{ value: "space-between", icon: markRaw(JustifyContentSpaceBetween), tooltip: "两端对齐 space-between" },
|
|
7229
|
+
{ value: "space-around", icon: markRaw(JustifyContentSpaceAround), tooltip: "横向平分 space-around" }
|
|
7230
|
+
],
|
|
7231
|
+
display: (mForm, { model }) => model.display === "flex"
|
|
7232
|
+
},
|
|
7233
|
+
{
|
|
7234
|
+
name: "alignItems",
|
|
7235
|
+
text: "辅轴对齐",
|
|
7236
|
+
type: "radioGroup",
|
|
7237
|
+
childType: "button",
|
|
7238
|
+
labelWidth: "68px",
|
|
7239
|
+
options: [
|
|
7240
|
+
{ value: "flex-start", icon: markRaw(JustifyContentFlexStart), tooltip: "左对齐 flex-start" },
|
|
7241
|
+
{ value: "flex-end", icon: markRaw(JustifyContentFlexEnd), tooltip: "右对齐 flex-end" },
|
|
7242
|
+
{ value: "center", icon: markRaw(JustifyContentCenter), tooltip: "居中 center" },
|
|
7243
|
+
{ value: "space-between", icon: markRaw(JustifyContentSpaceBetween), tooltip: "两端对齐 space-between" },
|
|
7244
|
+
{ value: "space-around", icon: markRaw(JustifyContentSpaceAround), tooltip: "横向平分 space-around" }
|
|
7245
|
+
],
|
|
7246
|
+
display: (mForm, { model }) => model.display === "flex"
|
|
7247
|
+
},
|
|
7248
|
+
{
|
|
7249
|
+
name: "flexWrap",
|
|
7250
|
+
text: "换行",
|
|
7251
|
+
type: "radioGroup",
|
|
7252
|
+
childType: "button",
|
|
7253
|
+
labelWidth: "68px",
|
|
7254
|
+
options: [
|
|
7255
|
+
{ value: "nowrap", text: "不换行", tooltip: "不换行 nowrap" },
|
|
7256
|
+
{ value: "wrap", text: "正换行", tooltip: "第一行在上方 wrap" },
|
|
7257
|
+
{ value: "wrap-reverse", text: "逆换行", tooltip: "第一行在下方 wrap-reverse" }
|
|
7258
|
+
],
|
|
7259
|
+
display: (mForm, { model }) => model.display === "flex"
|
|
7260
|
+
},
|
|
7261
|
+
{
|
|
7262
|
+
type: "row",
|
|
7263
|
+
items: [
|
|
7264
|
+
{
|
|
7265
|
+
name: "width",
|
|
7266
|
+
text: "宽度",
|
|
7267
|
+
labelWidth: "68px",
|
|
7268
|
+
type: "data-source-field-select",
|
|
7269
|
+
fieldConfig: {
|
|
7270
|
+
type: "text"
|
|
7271
|
+
}
|
|
7272
|
+
},
|
|
7273
|
+
{
|
|
7274
|
+
name: "height",
|
|
7275
|
+
text: "宽度",
|
|
7276
|
+
labelWidth: "68px",
|
|
7277
|
+
type: "data-source-field-select",
|
|
7278
|
+
fieldConfig: {
|
|
7279
|
+
type: "text"
|
|
7280
|
+
}
|
|
7281
|
+
}
|
|
7282
|
+
]
|
|
7283
|
+
},
|
|
7284
|
+
{
|
|
7285
|
+
type: "data-source-field-select",
|
|
7286
|
+
text: "overflow",
|
|
7287
|
+
name: "overflow",
|
|
7288
|
+
checkStrictly: false,
|
|
7289
|
+
dataSourceFieldType: ["string"],
|
|
7290
|
+
fieldConfig: {
|
|
7291
|
+
type: "select",
|
|
7292
|
+
clearable: true,
|
|
7293
|
+
allowCreate: true,
|
|
7294
|
+
options: [
|
|
7295
|
+
{ text: "visible", value: "visible" },
|
|
7296
|
+
{ text: "hidden", value: "hidden" },
|
|
7297
|
+
{ text: "clip", value: "clip" },
|
|
7298
|
+
{ text: "scroll", value: "scroll" },
|
|
7299
|
+
{ text: "auto", value: "auto" },
|
|
7300
|
+
{ text: "overlay", value: "overlay" },
|
|
7301
|
+
{ text: "initial", value: "initial" }
|
|
7302
|
+
]
|
|
7303
|
+
}
|
|
7304
|
+
}
|
|
7305
|
+
]
|
|
7306
|
+
};
|
|
7307
|
+
const change = (value, eventData) => {
|
|
7308
|
+
emit("change", value, eventData);
|
|
7309
|
+
};
|
|
7310
|
+
return (_ctx, _cache) => {
|
|
7311
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
7312
|
+
createVNode(unref(MContainer), {
|
|
7313
|
+
config,
|
|
7314
|
+
model: _ctx.values,
|
|
7315
|
+
onChange: change
|
|
7316
|
+
}, null, 8, ["model"]),
|
|
7317
|
+
createVNode(_sfc_main$X, {
|
|
7318
|
+
model: _ctx.values,
|
|
7319
|
+
onChange: change
|
|
7320
|
+
}, null, 8, ["model"])
|
|
7321
|
+
], 64);
|
|
7322
|
+
};
|
|
7323
|
+
}
|
|
7324
|
+
});
|
|
7325
|
+
|
|
7326
|
+
const _hoisted_1$o = { class: "layout-box-container" };
|
|
7327
|
+
const _hoisted_2$b = { class: "next-input" };
|
|
7328
|
+
const _hoisted_3$4 = ["onUpdate:modelValue", "title", "onChange"];
|
|
7329
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
7330
|
+
__name: "Position",
|
|
7331
|
+
props: {
|
|
7332
|
+
model: {}
|
|
7333
|
+
},
|
|
7334
|
+
emits: ["change"],
|
|
7335
|
+
setup(__props, { emit: __emit }) {
|
|
7336
|
+
const list = [
|
|
7337
|
+
{
|
|
7338
|
+
name: "top",
|
|
7339
|
+
class: "outer-top-border"
|
|
7340
|
+
},
|
|
7341
|
+
{
|
|
7342
|
+
name: "right",
|
|
7343
|
+
class: "outer-right-border"
|
|
7344
|
+
},
|
|
7345
|
+
{
|
|
7346
|
+
name: "bottom",
|
|
7347
|
+
class: "outer-bottom-border"
|
|
7348
|
+
},
|
|
7349
|
+
{
|
|
7350
|
+
name: "left",
|
|
7351
|
+
class: "outer-left-border"
|
|
7352
|
+
}
|
|
7353
|
+
];
|
|
7354
|
+
const emit = __emit;
|
|
7355
|
+
const change = (event, name) => {
|
|
7356
|
+
emit("change", event.target.value, {
|
|
7357
|
+
modifyKey: name
|
|
7358
|
+
});
|
|
7359
|
+
};
|
|
7360
|
+
return (_ctx, _cache) => {
|
|
7361
|
+
return openBlock(), createElementBlock("div", _hoisted_1$o, [
|
|
7362
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(list, (item, index) => {
|
|
7363
|
+
return createElementVNode("div", {
|
|
7364
|
+
key: index,
|
|
7365
|
+
class: normalizeClass(item.class)
|
|
7366
|
+
}, [
|
|
7367
|
+
createElementVNode("span", _hoisted_2$b, [
|
|
7368
|
+
withDirectives(createElementVNode("input", {
|
|
7369
|
+
"onUpdate:modelValue": ($event) => _ctx.model[item.name] = $event,
|
|
7370
|
+
title: _ctx.model[item.name],
|
|
7371
|
+
onChange: ($event) => change($event, item.name),
|
|
7372
|
+
placeholder: "0"
|
|
7373
|
+
}, null, 40, _hoisted_3$4), [
|
|
7374
|
+
[vModelText, _ctx.model[item.name]]
|
|
7375
|
+
])
|
|
7376
|
+
])
|
|
7377
|
+
], 2);
|
|
7378
|
+
}), 64))
|
|
7379
|
+
]);
|
|
7380
|
+
};
|
|
7381
|
+
}
|
|
7382
|
+
});
|
|
7383
|
+
|
|
7384
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
7385
|
+
__name: "Position",
|
|
7386
|
+
props: {
|
|
7387
|
+
values: {}
|
|
7388
|
+
},
|
|
7389
|
+
emits: ["change"],
|
|
7390
|
+
setup(__props, { emit: __emit }) {
|
|
7391
|
+
const emit = __emit;
|
|
7392
|
+
const config = {
|
|
7393
|
+
items: [
|
|
7394
|
+
{
|
|
7395
|
+
name: "position",
|
|
7396
|
+
text: "定位",
|
|
7397
|
+
labelWidth: "68px",
|
|
7398
|
+
type: "data-source-field-select",
|
|
7399
|
+
fieldConfig: {
|
|
7400
|
+
type: "select",
|
|
7401
|
+
options: ["static", "relative", "absolute", "fixed", "sticky"].map((item) => ({
|
|
7402
|
+
value: item,
|
|
7403
|
+
text: item
|
|
7404
|
+
}))
|
|
7405
|
+
}
|
|
7406
|
+
},
|
|
7407
|
+
{
|
|
7408
|
+
labelWidth: "68px",
|
|
7409
|
+
name: "zIndex",
|
|
7410
|
+
text: "zIndex",
|
|
7411
|
+
type: "data-source-field-select",
|
|
7412
|
+
fieldConfig: {
|
|
7413
|
+
type: "text"
|
|
7414
|
+
}
|
|
7415
|
+
}
|
|
7416
|
+
]
|
|
7417
|
+
};
|
|
7418
|
+
const change = (value, eventData) => {
|
|
7419
|
+
emit("change", value, eventData);
|
|
7420
|
+
};
|
|
7421
|
+
return (_ctx, _cache) => {
|
|
7422
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
7423
|
+
createVNode(unref(MContainer), {
|
|
7424
|
+
config,
|
|
7425
|
+
model: _ctx.values,
|
|
7426
|
+
onChange: change
|
|
7427
|
+
}, null, 8, ["model"]),
|
|
7428
|
+
withDirectives(createVNode(_sfc_main$H, {
|
|
7429
|
+
model: _ctx.values,
|
|
7430
|
+
onChange: change
|
|
7431
|
+
}, null, 8, ["model"]), [
|
|
7432
|
+
[vShow, _ctx.values["position"] !== "static"]
|
|
7433
|
+
])
|
|
7434
|
+
], 64);
|
|
7435
|
+
};
|
|
7436
|
+
}
|
|
7437
|
+
});
|
|
7438
|
+
|
|
7439
|
+
const _hoisted_1$n = { class: "border-box-container" };
|
|
7440
|
+
const _hoisted_2$a = { class: "border-icon-container" };
|
|
7441
|
+
const _hoisted_3$3 = { class: "border-icon-container-row" };
|
|
7442
|
+
const _hoisted_4$3 = { class: "border-icon-container-row" };
|
|
7443
|
+
const _hoisted_5$1 = { class: "border-icon-container-row" };
|
|
7444
|
+
const _hoisted_6 = { class: "border-value-container" };
|
|
7445
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
7446
|
+
__name: "Border",
|
|
7447
|
+
props: {
|
|
7448
|
+
model: {}
|
|
7449
|
+
},
|
|
7450
|
+
emits: ["change"],
|
|
7451
|
+
setup(__props, { emit: __emit }) {
|
|
7452
|
+
const direction = ref("");
|
|
7453
|
+
const config = computed(() => ({
|
|
7454
|
+
items: [
|
|
7455
|
+
{
|
|
7456
|
+
name: `border${direction.value}Width`,
|
|
7457
|
+
text: "边框宽度",
|
|
7458
|
+
labelWidth: "68px",
|
|
7459
|
+
type: "data-source-field-select",
|
|
7460
|
+
fieldConfig: {
|
|
7461
|
+
type: "text"
|
|
7462
|
+
}
|
|
7463
|
+
},
|
|
7464
|
+
{
|
|
7465
|
+
name: `border${direction.value}Color`,
|
|
7466
|
+
text: "边框颜色",
|
|
7467
|
+
labelWidth: "68px",
|
|
7468
|
+
type: "data-source-field-select",
|
|
7469
|
+
fieldConfig: {
|
|
7470
|
+
type: "colorPicker"
|
|
7471
|
+
}
|
|
7472
|
+
},
|
|
7473
|
+
{
|
|
7474
|
+
name: `border${direction.value}Style`,
|
|
7475
|
+
text: "边框样式",
|
|
7476
|
+
labelWidth: "68px",
|
|
7477
|
+
type: "data-source-field-select",
|
|
7478
|
+
fieldConfig: {
|
|
7479
|
+
type: "select",
|
|
7480
|
+
options: ["solid", "dashed", "dotted"].map((item) => ({
|
|
7481
|
+
value: item,
|
|
7482
|
+
text: item
|
|
7483
|
+
}))
|
|
7484
|
+
}
|
|
7485
|
+
}
|
|
7486
|
+
]
|
|
7487
|
+
}));
|
|
7488
|
+
const selectDirection = (d) => direction.value = d || "";
|
|
7489
|
+
const emit = __emit;
|
|
7490
|
+
const change = (value, eventData) => {
|
|
7491
|
+
eventData.changeRecords?.forEach((record) => {
|
|
7492
|
+
emit("change", record.value, {
|
|
7493
|
+
modifyKey: record.propPath
|
|
7494
|
+
});
|
|
7495
|
+
});
|
|
7496
|
+
};
|
|
7497
|
+
return (_ctx, _cache) => {
|
|
7498
|
+
return openBlock(), createElementBlock("div", _hoisted_1$n, [
|
|
7499
|
+
createElementVNode("div", _hoisted_2$a, [
|
|
7500
|
+
createElementVNode("div", _hoisted_3$3, [
|
|
7501
|
+
createElementVNode("div", {
|
|
7502
|
+
class: normalizeClass(["border-icon border-icon-top", { active: direction.value === "Top" }]),
|
|
7503
|
+
onClick: _cache[0] || (_cache[0] = ($event) => selectDirection("Top"))
|
|
7504
|
+
}, null, 2)
|
|
7505
|
+
]),
|
|
7506
|
+
createElementVNode("div", _hoisted_4$3, [
|
|
7507
|
+
createElementVNode("div", {
|
|
7508
|
+
class: normalizeClass(["border-icon border-icon-left", { active: direction.value === "Left" }]),
|
|
7509
|
+
onClick: _cache[1] || (_cache[1] = ($event) => selectDirection("Left"))
|
|
7510
|
+
}, null, 2),
|
|
7511
|
+
createElementVNode("div", {
|
|
7512
|
+
class: normalizeClass(["border-icon", { active: direction.value === "" }]),
|
|
7513
|
+
onClick: _cache[2] || (_cache[2] = ($event) => selectDirection())
|
|
7514
|
+
}, null, 2),
|
|
7515
|
+
createElementVNode("div", {
|
|
7516
|
+
class: normalizeClass(["border-icon border-icon-right", { active: direction.value === "Right" }]),
|
|
7517
|
+
onClick: _cache[3] || (_cache[3] = ($event) => selectDirection("Right"))
|
|
7518
|
+
}, null, 2)
|
|
7519
|
+
]),
|
|
7520
|
+
createElementVNode("div", _hoisted_5$1, [
|
|
7521
|
+
createElementVNode("div", {
|
|
7522
|
+
class: normalizeClass(["border-icon border-icon-bottom", { active: direction.value === "Bottom" }]),
|
|
7523
|
+
onClick: _cache[4] || (_cache[4] = ($event) => selectDirection("Bottom"))
|
|
7524
|
+
}, null, 2)
|
|
7525
|
+
])
|
|
7526
|
+
]),
|
|
7527
|
+
createElementVNode("div", _hoisted_6, [
|
|
7528
|
+
createVNode(unref(MContainer), {
|
|
7529
|
+
config: config.value,
|
|
7530
|
+
model: _ctx.model,
|
|
7531
|
+
onChange: change
|
|
7532
|
+
}, null, 8, ["config", "model"])
|
|
7533
|
+
])
|
|
7534
|
+
]);
|
|
7535
|
+
};
|
|
7536
|
+
}
|
|
7537
|
+
});
|
|
7538
|
+
|
|
7539
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
7540
|
+
__name: "Border",
|
|
7541
|
+
props: {
|
|
7542
|
+
values: {}
|
|
7543
|
+
},
|
|
7544
|
+
emits: ["change"],
|
|
7545
|
+
setup(__props, { emit: __emit }) {
|
|
7546
|
+
const emit = __emit;
|
|
7547
|
+
const config = {
|
|
7548
|
+
items: [
|
|
7549
|
+
{
|
|
7550
|
+
labelWidth: "68px",
|
|
7551
|
+
name: "borderRadius",
|
|
7552
|
+
text: "圆角",
|
|
7553
|
+
type: "data-source-field-select",
|
|
7554
|
+
fieldConfig: {
|
|
7555
|
+
type: "text"
|
|
7556
|
+
}
|
|
7557
|
+
}
|
|
7558
|
+
]
|
|
7559
|
+
};
|
|
7560
|
+
const change = (value, eventData) => {
|
|
7561
|
+
emit("change", value, eventData);
|
|
7562
|
+
};
|
|
7563
|
+
return (_ctx, _cache) => {
|
|
7564
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
7565
|
+
createVNode(unref(MContainer), {
|
|
7566
|
+
config,
|
|
7567
|
+
model: _ctx.values,
|
|
7568
|
+
onChange: change
|
|
7569
|
+
}, null, 8, ["model"]),
|
|
7570
|
+
createVNode(_sfc_main$F, {
|
|
7571
|
+
model: _ctx.values,
|
|
7572
|
+
onChange: change
|
|
7573
|
+
}, null, 8, ["model"])
|
|
7574
|
+
], 64);
|
|
7575
|
+
};
|
|
7576
|
+
}
|
|
7577
|
+
});
|
|
7578
|
+
|
|
7579
|
+
const _hoisted_1$m = { class: "m-fields-style-setter" };
|
|
7580
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
7581
|
+
...{
|
|
7582
|
+
name: "MFieldsStyleSetter"
|
|
7583
|
+
},
|
|
7584
|
+
__name: "Index",
|
|
7585
|
+
props: {
|
|
7586
|
+
config: {},
|
|
7587
|
+
model: {},
|
|
7588
|
+
initValues: {},
|
|
7589
|
+
values: {},
|
|
7590
|
+
name: {},
|
|
7591
|
+
prop: {},
|
|
7592
|
+
disabled: { type: Boolean },
|
|
7593
|
+
size: {},
|
|
7594
|
+
lastValues: {}
|
|
7595
|
+
},
|
|
7596
|
+
emits: ["change"],
|
|
7597
|
+
setup(__props, { emit: __emit }) {
|
|
7598
|
+
const emit = __emit;
|
|
7599
|
+
const list = [
|
|
7600
|
+
{
|
|
7601
|
+
name: "font",
|
|
7602
|
+
title: "布局",
|
|
7603
|
+
component: _sfc_main$I
|
|
7604
|
+
},
|
|
7605
|
+
{
|
|
7606
|
+
title: "位置",
|
|
7607
|
+
component: _sfc_main$G
|
|
7608
|
+
},
|
|
7609
|
+
{
|
|
7610
|
+
title: "背景",
|
|
7611
|
+
component: _sfc_main$10
|
|
7612
|
+
},
|
|
7613
|
+
{
|
|
7614
|
+
title: "文字",
|
|
7615
|
+
component: _sfc_main$Y
|
|
7616
|
+
},
|
|
7617
|
+
{
|
|
7618
|
+
title: "边框与圆角",
|
|
7619
|
+
component: _sfc_main$E
|
|
7620
|
+
}
|
|
7621
|
+
];
|
|
7622
|
+
const collapseValue = shallowRef(
|
|
7623
|
+
Array(list.length).fill(1).map((x, i) => `${i}`)
|
|
7624
|
+
);
|
|
7625
|
+
const change = (v, eventData) => {
|
|
7626
|
+
emit("change", v, eventData);
|
|
7627
|
+
};
|
|
7628
|
+
return (_ctx, _cache) => {
|
|
7629
|
+
return openBlock(), createElementBlock("div", _hoisted_1$m, [
|
|
7630
|
+
createVNode(unref(TMagicCollapse), { "model-value": collapseValue.value }, {
|
|
7631
|
+
default: withCtx(() => [
|
|
7632
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(list, (item, index) => {
|
|
7633
|
+
return createVNode(unref(TMagicCollapseItem), {
|
|
7634
|
+
key: index,
|
|
7635
|
+
name: `${index}`
|
|
7636
|
+
}, {
|
|
7637
|
+
title: withCtx(() => [
|
|
7638
|
+
createVNode(_sfc_main$1s, { icon: unref(Grid) }, null, 8, ["icon"]),
|
|
7639
|
+
createTextVNode(toDisplayString(item.title), 1)
|
|
7640
|
+
]),
|
|
7641
|
+
default: withCtx(() => [
|
|
7642
|
+
item.component ? (openBlock(), createBlock(resolveDynamicComponent(item.component), {
|
|
7643
|
+
key: 0,
|
|
7644
|
+
values: _ctx.model[_ctx.name],
|
|
7645
|
+
onChange: change
|
|
7646
|
+
}, null, 40, ["values"])) : createCommentVNode("", true)
|
|
7647
|
+
]),
|
|
7648
|
+
_: 2
|
|
7649
|
+
}, 1032, ["name"]);
|
|
7650
|
+
}), 64))
|
|
7651
|
+
]),
|
|
7652
|
+
_: 1
|
|
7653
|
+
}, 8, ["model-value"])
|
|
7654
|
+
]);
|
|
7655
|
+
};
|
|
7656
|
+
}
|
|
7657
|
+
});
|
|
7658
|
+
|
|
7659
|
+
const _hoisted_1$l = {
|
|
7660
|
+
key: 1,
|
|
7661
|
+
class: "m-fields-ui-select",
|
|
7662
|
+
style: { "display": "flex" }
|
|
7663
|
+
};
|
|
7664
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
7665
|
+
...{
|
|
7666
|
+
name: "MFieldsUISelect"
|
|
7667
|
+
},
|
|
7668
|
+
__name: "UISelect",
|
|
7669
|
+
props: {
|
|
7670
|
+
config: {},
|
|
7671
|
+
model: {},
|
|
7672
|
+
initValues: {},
|
|
7673
|
+
values: {},
|
|
7674
|
+
name: {},
|
|
7675
|
+
prop: {},
|
|
7676
|
+
disabled: { type: Boolean },
|
|
7677
|
+
size: {},
|
|
7678
|
+
lastValues: {}
|
|
7679
|
+
},
|
|
7680
|
+
emits: ["change"],
|
|
7681
|
+
setup(__props, { emit: __emit }) {
|
|
7682
|
+
const props = __props;
|
|
7683
|
+
const emit = __emit;
|
|
7684
|
+
const services = inject("services");
|
|
7685
|
+
const mForm = inject("mForm");
|
|
7686
|
+
const val = computed(() => props.model[props.name]);
|
|
7687
|
+
const uiSelectMode = ref(false);
|
|
7688
|
+
const cancelHandler = () => {
|
|
7689
|
+
if (!services?.uiService) return;
|
|
7690
|
+
services.uiService.set("uiSelectMode", false);
|
|
7691
|
+
uiSelectMode.value = false;
|
|
7692
|
+
globalThis.document.removeEventListener(UI_SELECT_MODE_EVENT_NAME, clickHandler);
|
|
7693
|
+
};
|
|
7694
|
+
const clickHandler = ({ detail }) => {
|
|
7695
|
+
let { id } = detail;
|
|
7696
|
+
if (detail.nodeType) {
|
|
7697
|
+
id = getIdFromEl()(detail) || id;
|
|
7698
|
+
}
|
|
7699
|
+
if (id) {
|
|
7700
|
+
props.model[props.name] = id;
|
|
7701
|
+
emit("change", id);
|
|
7702
|
+
mForm?.$emit("field-change", props.prop, id);
|
|
7703
|
+
}
|
|
7704
|
+
if (cancelHandler) {
|
|
7705
|
+
cancelHandler();
|
|
7706
|
+
}
|
|
7707
|
+
};
|
|
7708
|
+
const toName = computed(() => {
|
|
7709
|
+
const config = services?.editorService.getNodeById(val.value);
|
|
7710
|
+
return config?.name || "";
|
|
7711
|
+
});
|
|
7712
|
+
const startSelect = () => {
|
|
7713
|
+
if (!services?.uiService) return;
|
|
7714
|
+
services.uiService.set("uiSelectMode", true);
|
|
7715
|
+
uiSelectMode.value = true;
|
|
7716
|
+
globalThis.document.addEventListener(UI_SELECT_MODE_EVENT_NAME, clickHandler);
|
|
7717
|
+
};
|
|
7718
|
+
const deleteHandler = () => {
|
|
6832
7719
|
if (props.model) {
|
|
6833
7720
|
props.model[props.name] = "";
|
|
6834
7721
|
emit("change", "");
|
|
@@ -6872,7 +7759,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
6872
7759
|
])),
|
|
6873
7760
|
_: 1
|
|
6874
7761
|
}, 8, ["icon", "disabled", "size"])
|
|
6875
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_1$
|
|
7762
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_1$l, [
|
|
6876
7763
|
val.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
6877
7764
|
createVNode(unref(TMagicTooltip), {
|
|
6878
7765
|
content: "清除",
|
|
@@ -6947,12 +7834,11 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
6947
7834
|
emits: ["change"],
|
|
6948
7835
|
setup(__props, { emit: __emit }) {
|
|
6949
7836
|
const emit = __emit;
|
|
6950
|
-
const
|
|
6951
|
-
const { isDragging } = useGetSo(
|
|
7837
|
+
const targetEl = useTemplateRef("target");
|
|
7838
|
+
const { isDragging } = useGetSo(targetEl, emit);
|
|
6952
7839
|
return (_ctx, _cache) => {
|
|
6953
7840
|
return openBlock(), createElementBlock("span", {
|
|
6954
|
-
|
|
6955
|
-
ref: target,
|
|
7841
|
+
ref: "target",
|
|
6956
7842
|
class: normalizeClass(["m-editor-resizer", { "m-editor-resizer-dragging": unref(isDragging) }])
|
|
6957
7843
|
}, [
|
|
6958
7844
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -6981,7 +7867,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
6981
7867
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
6982
7868
|
const emit = __emit;
|
|
6983
7869
|
const props = __props;
|
|
6984
|
-
const el = useTemplateRef("
|
|
7870
|
+
const el = useTemplateRef("target");
|
|
6985
7871
|
const hasLeft = computed(() => typeof props.left !== "undefined");
|
|
6986
7872
|
const hasRight = computed(() => typeof props.right !== "undefined");
|
|
6987
7873
|
const center = ref(0);
|
|
@@ -7087,8 +7973,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
7087
7973
|
});
|
|
7088
7974
|
return (_ctx, _cache) => {
|
|
7089
7975
|
return openBlock(), createElementBlock("div", {
|
|
7090
|
-
|
|
7091
|
-
ref: el,
|
|
7976
|
+
ref: "target",
|
|
7092
7977
|
class: "m-editor-layout",
|
|
7093
7978
|
style: normalizeStyle(`min-width: ${props.minCenter + props.minLeft + props.minRight}px`)
|
|
7094
7979
|
}, [
|
|
@@ -7121,11 +8006,11 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
7121
8006
|
}
|
|
7122
8007
|
});
|
|
7123
8008
|
|
|
7124
|
-
const _hoisted_1$
|
|
8009
|
+
const _hoisted_1$k = {
|
|
7125
8010
|
key: 1,
|
|
7126
8011
|
class: "menu-item-text"
|
|
7127
8012
|
};
|
|
7128
|
-
const _hoisted_2$
|
|
8013
|
+
const _hoisted_2$9 = { class: "el-dropdown-link menubar-menu-button" };
|
|
7129
8014
|
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
7130
8015
|
...{
|
|
7131
8016
|
name: "MEditorToolButton"
|
|
@@ -7197,7 +8082,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
7197
8082
|
_ctx.data.type === "divider" ? (openBlock(), createBlock(unref(TMagicDivider), {
|
|
7198
8083
|
key: 0,
|
|
7199
8084
|
direction: _ctx.data.direction || "vertical"
|
|
7200
|
-
}, null, 8, ["direction"])) : _ctx.data.type === "text" ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
8085
|
+
}, null, 8, ["direction"])) : _ctx.data.type === "text" ? (openBlock(), createElementBlock("div", _hoisted_1$k, toDisplayString(_ctx.data.text), 1)) : _ctx.data.type === "button" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
7201
8086
|
_ctx.data.tooltip ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
7202
8087
|
key: 0,
|
|
7203
8088
|
effect: "dark",
|
|
@@ -7211,7 +8096,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
7211
8096
|
disabled: disabled.value
|
|
7212
8097
|
}, {
|
|
7213
8098
|
default: withCtx(() => [
|
|
7214
|
-
_ctx.data.icon ? (openBlock(), createBlock(_sfc_main$
|
|
8099
|
+
_ctx.data.icon ? (openBlock(), createBlock(_sfc_main$1s, {
|
|
7215
8100
|
key: 0,
|
|
7216
8101
|
icon: _ctx.data.icon
|
|
7217
8102
|
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
@@ -7229,7 +8114,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
7229
8114
|
title: _ctx.data.text
|
|
7230
8115
|
}, {
|
|
7231
8116
|
default: withCtx(() => [
|
|
7232
|
-
_ctx.data.icon ? (openBlock(), createBlock(_sfc_main$
|
|
8117
|
+
_ctx.data.icon ? (openBlock(), createBlock(_sfc_main$1s, {
|
|
7233
8118
|
key: 0,
|
|
7234
8119
|
icon: _ctx.data.icon
|
|
7235
8120
|
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
@@ -7262,7 +8147,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
7262
8147
|
})) : createCommentVNode("", true)
|
|
7263
8148
|
]),
|
|
7264
8149
|
default: withCtx(() => [
|
|
7265
|
-
createElementVNode("span", _hoisted_2$
|
|
8150
|
+
createElementVNode("span", _hoisted_2$9, [
|
|
7266
8151
|
createTextVNode(toDisplayString(_ctx.data.text), 1),
|
|
7267
8152
|
createVNode(unref(TMagicIcon), { class: "el-icon--right" }, {
|
|
7268
8153
|
default: withCtx(() => [
|
|
@@ -7279,12 +8164,12 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
7279
8164
|
}
|
|
7280
8165
|
});
|
|
7281
8166
|
|
|
7282
|
-
const _hoisted_1$
|
|
8167
|
+
const _hoisted_1$j = {
|
|
7283
8168
|
key: 0,
|
|
7284
8169
|
id: "m-editor-page-bar-add-icon",
|
|
7285
8170
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon"
|
|
7286
8171
|
};
|
|
7287
|
-
const _hoisted_2$
|
|
8172
|
+
const _hoisted_2$8 = {
|
|
7288
8173
|
key: 1,
|
|
7289
8174
|
style: { "width": "21px" }
|
|
7290
8175
|
};
|
|
@@ -7310,10 +8195,10 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
7310
8195
|
editorService.add(pageConfig);
|
|
7311
8196
|
};
|
|
7312
8197
|
return (_ctx, _cache) => {
|
|
7313
|
-
return showAddPageButton.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
8198
|
+
return showAddPageButton.value ? (openBlock(), createElementBlock("div", _hoisted_1$j, [
|
|
7314
8199
|
createVNode(unref(TMagicPopover), { "popper-class": "data-source-list-panel-add-menu" }, {
|
|
7315
8200
|
reference: withCtx(() => [
|
|
7316
|
-
createVNode(_sfc_main$
|
|
8201
|
+
createVNode(_sfc_main$1s, { icon: unref(Plus) }, null, 8, ["icon"])
|
|
7317
8202
|
]),
|
|
7318
8203
|
default: withCtx(() => [
|
|
7319
8204
|
createVNode(_sfc_main$z, {
|
|
@@ -7337,11 +8222,20 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
7337
8222
|
]),
|
|
7338
8223
|
_: 1
|
|
7339
8224
|
})
|
|
7340
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_2$
|
|
8225
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_2$8));
|
|
7341
8226
|
};
|
|
7342
8227
|
}
|
|
7343
8228
|
});
|
|
7344
8229
|
|
|
8230
|
+
const _hoisted_1$i = {
|
|
8231
|
+
class: "m-editor-page-bar",
|
|
8232
|
+
ref: "pageBar"
|
|
8233
|
+
};
|
|
8234
|
+
const _hoisted_2$7 = {
|
|
8235
|
+
key: 0,
|
|
8236
|
+
class: "m-editor-page-bar-items",
|
|
8237
|
+
ref: "itemsContainer"
|
|
8238
|
+
};
|
|
7345
8239
|
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
7346
8240
|
...{
|
|
7347
8241
|
name: "MEditorPageBarScrollContainer"
|
|
@@ -7356,33 +8250,33 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
7356
8250
|
const services = inject("services");
|
|
7357
8251
|
const editorService = services?.editorService;
|
|
7358
8252
|
const uiService = services?.uiService;
|
|
7359
|
-
const
|
|
8253
|
+
const itemsContainerEl = useTemplateRef("itemsContainer");
|
|
7360
8254
|
const canScroll = ref(false);
|
|
7361
8255
|
const showAddPageButton = computed(() => uiService?.get("showAddPageButton"));
|
|
7362
8256
|
const showPageListButton = computed(() => uiService?.get("showPageListButton"));
|
|
7363
8257
|
const itemsContainerWidth = ref(0);
|
|
8258
|
+
const pageBarEl = useTemplateRef("pageBar");
|
|
7364
8259
|
const setCanScroll = () => {
|
|
7365
|
-
itemsContainerWidth.value = (
|
|
8260
|
+
itemsContainerWidth.value = (pageBarEl.value?.clientWidth || 0) - 37 * 2 - 37 - (showAddPageButton.value ? 37 : 21) - (showPageListButton.value ? 37 : 0);
|
|
7366
8261
|
nextTick(() => {
|
|
7367
|
-
if (
|
|
7368
|
-
canScroll.value =
|
|
8262
|
+
if (itemsContainerEl.value) {
|
|
8263
|
+
canScroll.value = itemsContainerEl.value.scrollWidth - itemsContainerWidth.value > 1;
|
|
7369
8264
|
}
|
|
7370
8265
|
});
|
|
7371
8266
|
};
|
|
7372
8267
|
const resizeObserver = new ResizeObserver(() => {
|
|
7373
8268
|
setCanScroll();
|
|
7374
8269
|
});
|
|
7375
|
-
const pageBar = useTemplateRef("pageBar");
|
|
7376
8270
|
onMounted(() => {
|
|
7377
|
-
|
|
8271
|
+
pageBarEl.value && resizeObserver.observe(pageBarEl.value);
|
|
7378
8272
|
});
|
|
7379
8273
|
onBeforeUnmount(() => {
|
|
7380
8274
|
resizeObserver.disconnect();
|
|
7381
8275
|
});
|
|
7382
8276
|
let translateLeft = 0;
|
|
7383
8277
|
const scroll = (type) => {
|
|
7384
|
-
if (!
|
|
7385
|
-
const maxScrollLeft =
|
|
8278
|
+
if (!itemsContainerEl.value || !canScroll.value) return;
|
|
8279
|
+
const maxScrollLeft = itemsContainerEl.value.scrollWidth - itemsContainerWidth.value;
|
|
7386
8280
|
if (type === "left") {
|
|
7387
8281
|
scrollTo(translateLeft + 200);
|
|
7388
8282
|
} else if (type === "right") {
|
|
@@ -7394,8 +8288,8 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
7394
8288
|
}
|
|
7395
8289
|
};
|
|
7396
8290
|
const scrollTo = (value) => {
|
|
7397
|
-
if (!
|
|
7398
|
-
const maxScrollLeft =
|
|
8291
|
+
if (!itemsContainerEl.value || !canScroll.value) return;
|
|
8292
|
+
const maxScrollLeft = itemsContainerEl.value.scrollWidth - itemsContainerWidth.value;
|
|
7399
8293
|
if (value >= 0) {
|
|
7400
8294
|
value = 0;
|
|
7401
8295
|
}
|
|
@@ -7403,7 +8297,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
7403
8297
|
value = -maxScrollLeft;
|
|
7404
8298
|
}
|
|
7405
8299
|
translateLeft = value;
|
|
7406
|
-
|
|
8300
|
+
itemsContainerEl.value.style.transform = `translate(${translateLeft}px, 0px)`;
|
|
7407
8301
|
};
|
|
7408
8302
|
watch(
|
|
7409
8303
|
() => props.length,
|
|
@@ -7462,18 +8356,9 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
7462
8356
|
}
|
|
7463
8357
|
});
|
|
7464
8358
|
return (_ctx, _cache) => {
|
|
7465
|
-
return openBlock(), createElementBlock("div",
|
|
7466
|
-
class: "m-editor-page-bar",
|
|
7467
|
-
ref_key: "pageBar",
|
|
7468
|
-
ref: pageBar
|
|
7469
|
-
}, [
|
|
8359
|
+
return openBlock(), createElementBlock("div", _hoisted_1$i, [
|
|
7470
8360
|
renderSlot(_ctx.$slots, "prepend"),
|
|
7471
|
-
_ctx.length ? (openBlock(), createElementBlock("div",
|
|
7472
|
-
key: 0,
|
|
7473
|
-
class: "m-editor-page-bar-items",
|
|
7474
|
-
ref_key: "itemsContainer",
|
|
7475
|
-
ref: itemsContainer
|
|
7476
|
-
}, [
|
|
8361
|
+
_ctx.length ? (openBlock(), createElementBlock("div", _hoisted_2$7, [
|
|
7477
8362
|
renderSlot(_ctx.$slots, "default")
|
|
7478
8363
|
], 512)) : createCommentVNode("", true),
|
|
7479
8364
|
canScroll.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -7481,21 +8366,21 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
7481
8366
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon m-editor-page-bar-item-left-icon",
|
|
7482
8367
|
onClick: _cache[0] || (_cache[0] = ($event) => scroll("left"))
|
|
7483
8368
|
}, [
|
|
7484
|
-
createVNode(_sfc_main$
|
|
8369
|
+
createVNode(_sfc_main$1s, { icon: unref(ArrowLeftBold) }, null, 8, ["icon"])
|
|
7485
8370
|
])) : createCommentVNode("", true),
|
|
7486
8371
|
canScroll.value ? (openBlock(), createElementBlock("div", {
|
|
7487
8372
|
key: 2,
|
|
7488
8373
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon m-editor-page-bar-item-right-icon",
|
|
7489
8374
|
onClick: _cache[1] || (_cache[1] = ($event) => scroll("right"))
|
|
7490
8375
|
}, [
|
|
7491
|
-
createVNode(_sfc_main$
|
|
8376
|
+
createVNode(_sfc_main$1s, { icon: unref(ArrowRightBold) }, null, 8, ["icon"])
|
|
7492
8377
|
])) : createCommentVNode("", true)
|
|
7493
8378
|
], 512);
|
|
7494
8379
|
};
|
|
7495
8380
|
}
|
|
7496
8381
|
});
|
|
7497
8382
|
|
|
7498
|
-
const _hoisted_1$
|
|
8383
|
+
const _hoisted_1$h = {
|
|
7499
8384
|
key: 0,
|
|
7500
8385
|
id: "m-editor-page-bar-list-icon",
|
|
7501
8386
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon"
|
|
@@ -7518,7 +8403,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
7518
8403
|
await editorService?.select(id);
|
|
7519
8404
|
};
|
|
7520
8405
|
return (_ctx, _cache) => {
|
|
7521
|
-
return showPageListButton.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
8406
|
+
return showPageListButton.value ? (openBlock(), createElementBlock("div", _hoisted_1$h, [
|
|
7522
8407
|
createVNode(unref(TMagicPopover), {
|
|
7523
8408
|
"popper-class": "page-bar-popover",
|
|
7524
8409
|
placement: "top",
|
|
@@ -7558,7 +8443,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
7558
8443
|
}
|
|
7559
8444
|
});
|
|
7560
8445
|
|
|
7561
|
-
const _hoisted_1$
|
|
8446
|
+
const _hoisted_1$g = { class: "m-editor-page-bar-item m-editor-page-bar-item-icon m-editor-page-bar-search" };
|
|
7562
8447
|
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
7563
8448
|
__name: "Search",
|
|
7564
8449
|
props: {
|
|
@@ -7597,8 +8482,8 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
7597
8482
|
emit("search", values);
|
|
7598
8483
|
};
|
|
7599
8484
|
return (_ctx, _cache) => {
|
|
7600
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
7601
|
-
createVNode(_sfc_main$
|
|
8485
|
+
return openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
8486
|
+
createVNode(_sfc_main$1s, {
|
|
7602
8487
|
icon: unref(Search),
|
|
7603
8488
|
onClick: _cache[0] || (_cache[0] = ($event) => visible.value = !visible.value),
|
|
7604
8489
|
class: normalizeClass({ "icon-active": visible.value })
|
|
@@ -7622,7 +8507,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
7622
8507
|
}
|
|
7623
8508
|
});
|
|
7624
8509
|
|
|
7625
|
-
const _hoisted_1$
|
|
8510
|
+
const _hoisted_1$f = { class: "m-editor-page-bar-tabs" };
|
|
7626
8511
|
const _hoisted_2$6 = ["data-page-id", "onClick"];
|
|
7627
8512
|
const _hoisted_3$2 = { class: "m-editor-page-bar-title" };
|
|
7628
8513
|
const _hoisted_4$2 = ["title"];
|
|
@@ -7674,38 +8559,37 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
7674
8559
|
const remove = (node) => {
|
|
7675
8560
|
editorService?.remove(node);
|
|
7676
8561
|
};
|
|
7677
|
-
const
|
|
7678
|
-
const
|
|
8562
|
+
const pageBarScrollContainerRef = useTemplateRef("pageBarScrollContainer");
|
|
8563
|
+
const pageBarItemEls = useTemplateRef("pageBarItems");
|
|
7679
8564
|
watch(page, (page2) => {
|
|
7680
|
-
if (!page2 || !
|
|
8565
|
+
if (!page2 || !pageBarScrollContainerRef.value?.itemsContainerWidth || !pageBarItemEls.value || pageBarItemEls.value.length < 2) {
|
|
7681
8566
|
return;
|
|
7682
8567
|
}
|
|
7683
|
-
const firstItem =
|
|
7684
|
-
const lastItem =
|
|
8568
|
+
const firstItem = pageBarItemEls.value[0];
|
|
8569
|
+
const lastItem = pageBarItemEls.value[pageBarItemEls.value.length - 1];
|
|
7685
8570
|
if (page2.id === firstItem.dataset.pageId) {
|
|
7686
|
-
|
|
8571
|
+
pageBarScrollContainerRef.value.scroll("start");
|
|
7687
8572
|
} else if (page2.id === lastItem.dataset.pageId) {
|
|
7688
|
-
|
|
8573
|
+
pageBarScrollContainerRef.value.scroll("end");
|
|
7689
8574
|
} else {
|
|
7690
|
-
const pageItem =
|
|
8575
|
+
const pageItem = pageBarItemEls.value.find((item) => item.dataset.pageId === page2.id);
|
|
7691
8576
|
if (!pageItem) {
|
|
7692
8577
|
return;
|
|
7693
8578
|
}
|
|
7694
8579
|
const pageItemRect = pageItem.getBoundingClientRect();
|
|
7695
8580
|
const offsetLeft = pageItemRect.left - firstItem.getBoundingClientRect().left;
|
|
7696
|
-
const { itemsContainerWidth } =
|
|
8581
|
+
const { itemsContainerWidth } = pageBarScrollContainerRef.value;
|
|
7697
8582
|
const left = itemsContainerWidth - offsetLeft - pageItemRect.width;
|
|
7698
|
-
const translateLeft =
|
|
8583
|
+
const translateLeft = pageBarScrollContainerRef.value.getTranslateLeft();
|
|
7699
8584
|
if (offsetLeft + translateLeft < 0 || offsetLeft + pageItemRect.width > itemsContainerWidth - translateLeft) {
|
|
7700
|
-
|
|
8585
|
+
pageBarScrollContainerRef.value.scrollTo(left);
|
|
7701
8586
|
}
|
|
7702
8587
|
}
|
|
7703
8588
|
});
|
|
7704
8589
|
return (_ctx, _cache) => {
|
|
7705
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8590
|
+
return openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
7706
8591
|
createVNode(_sfc_main$x, {
|
|
7707
|
-
|
|
7708
|
-
ref: pageBarScrollContainer,
|
|
8592
|
+
ref: "pageBarScrollContainer",
|
|
7709
8593
|
"page-bar-sort-options": _ctx.pageBarSortOptions,
|
|
7710
8594
|
length: list.value.length
|
|
7711
8595
|
}, {
|
|
@@ -7729,8 +8613,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
7729
8613
|
return openBlock(), createElementBlock("div", {
|
|
7730
8614
|
class: normalizeClass(["m-editor-page-bar-item", { active: page.value?.id === item.id }]),
|
|
7731
8615
|
ref_for: true,
|
|
7732
|
-
|
|
7733
|
-
ref: pageBarItems,
|
|
8616
|
+
ref: "pageBarItems",
|
|
7734
8617
|
key: item.id,
|
|
7735
8618
|
"data-page-id": item.id,
|
|
7736
8619
|
onClick: ($event) => switchPage(item.id)
|
|
@@ -7791,7 +8674,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
7791
8674
|
}
|
|
7792
8675
|
});
|
|
7793
8676
|
|
|
7794
|
-
const _hoisted_1$
|
|
8677
|
+
const _hoisted_1$e = { class: "m-editor-empty-panel" };
|
|
7795
8678
|
const _hoisted_2$5 = { class: "m-editor-empty-content" };
|
|
7796
8679
|
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
7797
8680
|
...{
|
|
@@ -7815,14 +8698,14 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
7815
8698
|
});
|
|
7816
8699
|
};
|
|
7817
8700
|
return (_ctx, _cache) => {
|
|
7818
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8701
|
+
return openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
7819
8702
|
createElementVNode("div", _hoisted_2$5, [
|
|
7820
8703
|
createElementVNode("div", {
|
|
7821
8704
|
class: "m-editor-empty-button",
|
|
7822
8705
|
onClick: _cache[0] || (_cache[0] = ($event) => clickHandler(unref(NodeType).PAGE))
|
|
7823
8706
|
}, [
|
|
7824
8707
|
createElementVNode("div", null, [
|
|
7825
|
-
createVNode(_sfc_main$
|
|
8708
|
+
createVNode(_sfc_main$1s, { icon: unref(Plus) }, null, 8, ["icon"])
|
|
7826
8709
|
]),
|
|
7827
8710
|
_cache[2] || (_cache[2] = createElementVNode("p", null, "新增页面", -1))
|
|
7828
8711
|
]),
|
|
@@ -7832,7 +8715,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
7832
8715
|
onClick: _cache[1] || (_cache[1] = ($event) => clickHandler(unref(NodeType).PAGE_FRAGMENT))
|
|
7833
8716
|
}, [
|
|
7834
8717
|
createElementVNode("div", null, [
|
|
7835
|
-
createVNode(_sfc_main$
|
|
8718
|
+
createVNode(_sfc_main$1s, { icon: unref(Plus) }, null, 8, ["icon"])
|
|
7836
8719
|
]),
|
|
7837
8720
|
_cache[3] || (_cache[3] = createElementVNode("p", null, "新增页面片", -1))
|
|
7838
8721
|
])) : createCommentVNode("", true)
|
|
@@ -7842,6 +8725,11 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
7842
8725
|
}
|
|
7843
8726
|
});
|
|
7844
8727
|
|
|
8728
|
+
const _hoisted_1$d = {
|
|
8729
|
+
class: "m-editor",
|
|
8730
|
+
ref: "content",
|
|
8731
|
+
style: { "min-width": "180px" }
|
|
8732
|
+
};
|
|
7845
8733
|
const DEFAULT_LEFT_COLUMN_WIDTH = 310;
|
|
7846
8734
|
const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
|
|
7847
8735
|
const LEFT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorLeftColumnWidthData";
|
|
@@ -7859,8 +8747,8 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
7859
8747
|
setup(__props) {
|
|
7860
8748
|
const codeOptions = inject("codeOptions", {});
|
|
7861
8749
|
const { editorService, uiService } = inject("services") || {};
|
|
7862
|
-
const
|
|
7863
|
-
const
|
|
8750
|
+
const contentEl = useTemplateRef("content");
|
|
8751
|
+
const splitViewRef = useTemplateRef("splitView");
|
|
7864
8752
|
const root = computed(() => editorService?.get("root"));
|
|
7865
8753
|
const page = computed(() => editorService?.get("page"));
|
|
7866
8754
|
const pageLength = computed(() => editorService?.get("pageLength") || 0);
|
|
@@ -7873,7 +8761,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
7873
8761
|
right: getRightColumnWidthCacheData()
|
|
7874
8762
|
});
|
|
7875
8763
|
watch(pageLength, () => {
|
|
7876
|
-
|
|
8764
|
+
splitViewRef.value?.updateWidth();
|
|
7877
8765
|
});
|
|
7878
8766
|
watch(
|
|
7879
8767
|
() => uiService?.get("hideSlideBar"),
|
|
@@ -7898,8 +8786,8 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
7898
8786
|
});
|
|
7899
8787
|
});
|
|
7900
8788
|
onMounted(() => {
|
|
7901
|
-
if (
|
|
7902
|
-
resizerObserver.observe(
|
|
8789
|
+
if (contentEl.value) {
|
|
8790
|
+
resizerObserver.observe(contentEl.value);
|
|
7903
8791
|
}
|
|
7904
8792
|
});
|
|
7905
8793
|
onBeforeUnmount(() => {
|
|
@@ -7914,17 +8802,12 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
7914
8802
|
}
|
|
7915
8803
|
};
|
|
7916
8804
|
return (_ctx, _cache) => {
|
|
7917
|
-
return openBlock(), createElementBlock("div",
|
|
7918
|
-
class: "m-editor",
|
|
7919
|
-
ref_key: "content",
|
|
7920
|
-
ref: content,
|
|
7921
|
-
style: { "min-width": "180px" }
|
|
7922
|
-
}, [
|
|
8805
|
+
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
7923
8806
|
renderSlot(_ctx.$slots, "header"),
|
|
7924
8807
|
renderSlot(_ctx.$slots, "nav"),
|
|
7925
8808
|
renderSlot(_ctx.$slots, "content-before"),
|
|
7926
8809
|
showSrc.value ? renderSlot(_ctx.$slots, "src-code", { key: 0 }, () => [
|
|
7927
|
-
createVNode(_sfc_main$
|
|
8810
|
+
createVNode(_sfc_main$1r, {
|
|
7928
8811
|
class: "m-editor-content",
|
|
7929
8812
|
"init-values": root.value,
|
|
7930
8813
|
options: unref(codeOptions),
|
|
@@ -7932,8 +8815,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
7932
8815
|
}, null, 8, ["init-values", "options"])
|
|
7933
8816
|
]) : (openBlock(), createBlock(_sfc_main$A, {
|
|
7934
8817
|
key: 1,
|
|
7935
|
-
|
|
7936
|
-
ref: splitView,
|
|
8818
|
+
ref: "splitView",
|
|
7937
8819
|
class: "m-editor-content",
|
|
7938
8820
|
"left-class": "m-editor-framework-left",
|
|
7939
8821
|
"center-class": "m-editor-framework-center",
|
|
@@ -8144,8 +9026,9 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
8144
9026
|
});
|
|
8145
9027
|
return data;
|
|
8146
9028
|
});
|
|
9029
|
+
const navMenuEl = useTemplateRef("navMenu");
|
|
8147
9030
|
const resizeObserver = new ResizeObserver(() => {
|
|
8148
|
-
const rect =
|
|
9031
|
+
const rect = navMenuEl.value?.getBoundingClientRect();
|
|
8149
9032
|
if (rect) {
|
|
8150
9033
|
uiService?.set("navMenuRect", {
|
|
8151
9034
|
left: rect.left,
|
|
@@ -8155,9 +9038,8 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
8155
9038
|
});
|
|
8156
9039
|
}
|
|
8157
9040
|
});
|
|
8158
|
-
const navMenu = useTemplateRef("navMenu");
|
|
8159
9041
|
onMounted(() => {
|
|
8160
|
-
|
|
9042
|
+
navMenuEl.value && resizeObserver.observe(navMenuEl.value);
|
|
8161
9043
|
});
|
|
8162
9044
|
onBeforeUnmount(() => {
|
|
8163
9045
|
resizeObserver.disconnect();
|
|
@@ -8166,8 +9048,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
8166
9048
|
return openBlock(), createElementBlock("div", {
|
|
8167
9049
|
class: "m-editor-nav-menu",
|
|
8168
9050
|
style: normalizeStyle({ height: `${_ctx.height}px` }),
|
|
8169
|
-
|
|
8170
|
-
ref: navMenu
|
|
9051
|
+
ref: "navMenu"
|
|
8171
9052
|
}, [
|
|
8172
9053
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(keys), (key) => {
|
|
8173
9054
|
return openBlock(), createElementBlock("div", {
|
|
@@ -8188,7 +9069,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
8188
9069
|
}
|
|
8189
9070
|
});
|
|
8190
9071
|
|
|
8191
|
-
const _hoisted_1$
|
|
9072
|
+
const _hoisted_1$c = { class: "m-editor-props-form-panel" };
|
|
8192
9073
|
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
8193
9074
|
...{
|
|
8194
9075
|
name: "MEditorFormPanel"
|
|
@@ -8213,20 +9094,20 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
8213
9094
|
const propsPanelSize = computed(() => services?.uiService.get("propsPanelSize") || "small");
|
|
8214
9095
|
const { height: editorContentHeight } = useEditorContentHeight();
|
|
8215
9096
|
const stage = computed(() => services?.editorService.get("stage"));
|
|
8216
|
-
const
|
|
9097
|
+
const configFormRef = useTemplateRef("configForm");
|
|
8217
9098
|
watchEffect(() => {
|
|
8218
|
-
if (
|
|
8219
|
-
|
|
8220
|
-
|
|
9099
|
+
if (configFormRef.value) {
|
|
9100
|
+
configFormRef.value.formState.stage = stage.value;
|
|
9101
|
+
configFormRef.value.formState.services = services;
|
|
8221
9102
|
}
|
|
8222
9103
|
});
|
|
8223
9104
|
const internalInstance = getCurrentInstance();
|
|
8224
9105
|
onMounted(() => {
|
|
8225
|
-
emit("mounted", internalInstance);
|
|
9106
|
+
emit("mounted", internalInstance?.proxy);
|
|
8226
9107
|
});
|
|
8227
9108
|
const submit = async (v, eventData) => {
|
|
8228
9109
|
try {
|
|
8229
|
-
const values = await
|
|
9110
|
+
const values = await configFormRef.value?.submitForm();
|
|
8230
9111
|
emit("submit", values, eventData);
|
|
8231
9112
|
} catch (e) {
|
|
8232
9113
|
emit("submit-error", e);
|
|
@@ -8238,15 +9119,14 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
8238
9119
|
const saveCode = (values) => {
|
|
8239
9120
|
emit("submit", props.codeValueKey ? { [props.codeValueKey]: values } : values);
|
|
8240
9121
|
};
|
|
8241
|
-
__expose({ configForm, submit });
|
|
9122
|
+
__expose({ configForm: configFormRef, submit });
|
|
8242
9123
|
return (_ctx, _cache) => {
|
|
8243
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9124
|
+
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
8244
9125
|
renderSlot(_ctx.$slots, "props-form-panel-header"),
|
|
8245
9126
|
createVNode(unref(TMagicScrollbar), null, {
|
|
8246
9127
|
default: withCtx(() => [
|
|
8247
9128
|
createVNode(unref(MForm), {
|
|
8248
|
-
|
|
8249
|
-
ref: configForm,
|
|
9129
|
+
ref: "configForm",
|
|
8250
9130
|
class: normalizeClass(propsPanelSize.value),
|
|
8251
9131
|
"popper-class": `m-editor-props-panel-popper ${propsPanelSize.value}`,
|
|
8252
9132
|
"label-width": _ctx.labelWidth,
|
|
@@ -8270,11 +9150,11 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
8270
9150
|
onClick: _cache[0] || (_cache[0] = ($event) => showSrc.value = !showSrc.value)
|
|
8271
9151
|
}, {
|
|
8272
9152
|
default: withCtx(() => [
|
|
8273
|
-
createVNode(_sfc_main$
|
|
9153
|
+
createVNode(_sfc_main$1s, { icon: unref(Document) }, null, 8, ["icon"])
|
|
8274
9154
|
]),
|
|
8275
9155
|
_: 1
|
|
8276
9156
|
}, 8, ["type"])) : createCommentVNode("", true),
|
|
8277
|
-
showSrc.value ? (openBlock(), createBlock(_sfc_main$
|
|
9157
|
+
showSrc.value ? (openBlock(), createBlock(_sfc_main$1r, {
|
|
8278
9158
|
key: 1,
|
|
8279
9159
|
class: "m-editor-props-panel-src-code",
|
|
8280
9160
|
height: `${unref(editorContentHeight)}px`,
|
|
@@ -8312,7 +9192,10 @@ const useStylePanel = (services) => {
|
|
|
8312
9192
|
};
|
|
8313
9193
|
};
|
|
8314
9194
|
|
|
8315
|
-
const _hoisted_1$
|
|
9195
|
+
const _hoisted_1$b = {
|
|
9196
|
+
ref: "propsPanel",
|
|
9197
|
+
class: "m-editor-props-panel"
|
|
9198
|
+
};
|
|
8316
9199
|
const _hoisted_2$4 = { class: "m-editor-props-style-panel-title" };
|
|
8317
9200
|
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
8318
9201
|
...{
|
|
@@ -8356,7 +9239,18 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
8356
9239
|
if (!v.id) {
|
|
8357
9240
|
v.id = values.value.id;
|
|
8358
9241
|
}
|
|
8359
|
-
|
|
9242
|
+
const newValue = {
|
|
9243
|
+
...v,
|
|
9244
|
+
style: {}
|
|
9245
|
+
};
|
|
9246
|
+
if (v.style) {
|
|
9247
|
+
Object.entries(v.style).forEach(([key, value]) => {
|
|
9248
|
+
if (value !== "" && newValue.style) {
|
|
9249
|
+
newValue.style[key] = value;
|
|
9250
|
+
}
|
|
9251
|
+
});
|
|
9252
|
+
}
|
|
9253
|
+
services?.editorService.update(newValue, { changeRecords: eventData?.changeRecords });
|
|
8360
9254
|
} catch (e) {
|
|
8361
9255
|
emit("submit-error", e);
|
|
8362
9256
|
}
|
|
@@ -8364,8 +9258,20 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
8364
9258
|
const errorHandler = (e) => {
|
|
8365
9259
|
emit("form-error", e);
|
|
8366
9260
|
};
|
|
8367
|
-
const mountedHandler = (
|
|
8368
|
-
|
|
9261
|
+
const mountedHandler = () => {
|
|
9262
|
+
if (propertyFormPanelRef.value) {
|
|
9263
|
+
emit("mounted", propertyFormPanelRef.value);
|
|
9264
|
+
}
|
|
9265
|
+
};
|
|
9266
|
+
const propsPanelEl = useTemplateRef("propsPanel");
|
|
9267
|
+
const widthChange = ({ deltaX }) => {
|
|
9268
|
+
if (!propsPanelEl.value) {
|
|
9269
|
+
return;
|
|
9270
|
+
}
|
|
9271
|
+
const width = globalThis.parseFloat(
|
|
9272
|
+
getComputedStyle(propsPanelEl.value).getPropertyValue("--props-style-panel-width")
|
|
9273
|
+
);
|
|
9274
|
+
propsPanelEl.value.style.setProperty("--props-style-panel-width", `${width - deltaX}px`);
|
|
8369
9275
|
};
|
|
8370
9276
|
const { showStylePanel, showStylePanelHandler, closeStylePanelHandler } = useStylePanel(services);
|
|
8371
9277
|
const propertyFormPanelRef = useTemplateRef("propertyFormPanel");
|
|
@@ -8376,7 +9282,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
8376
9282
|
submit
|
|
8377
9283
|
});
|
|
8378
9284
|
return (_ctx, _cache) => {
|
|
8379
|
-
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1$
|
|
9285
|
+
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
8380
9286
|
renderSlot(_ctx.$slots, "props-panel-header"),
|
|
8381
9287
|
createVNode(_sfc_main$q, {
|
|
8382
9288
|
ref: "propertyFormPanel",
|
|
@@ -8390,8 +9296,12 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
8390
9296
|
onFormError: errorHandler,
|
|
8391
9297
|
onMounted: mountedHandler
|
|
8392
9298
|
}, null, 8, ["class", "config", "values", "disabledShowSrc", "extendState"]),
|
|
8393
|
-
unref(showStylePanel) ? (openBlock(), createBlock(_sfc_main$
|
|
9299
|
+
unref(showStylePanel) ? (openBlock(), createBlock(_sfc_main$B, {
|
|
8394
9300
|
key: 0,
|
|
9301
|
+
onChange: widthChange
|
|
9302
|
+
})) : createCommentVNode("", true),
|
|
9303
|
+
unref(showStylePanel) ? (openBlock(), createBlock(_sfc_main$q, {
|
|
9304
|
+
key: 1,
|
|
8395
9305
|
class: "m-editor-props-style-panel",
|
|
8396
9306
|
"label-position": "top",
|
|
8397
9307
|
"code-value-key": "style",
|
|
@@ -8413,7 +9323,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
8413
9323
|
onClick: unref(closeStylePanelHandler)
|
|
8414
9324
|
}, {
|
|
8415
9325
|
default: withCtx(() => [
|
|
8416
|
-
createVNode(_sfc_main$
|
|
9326
|
+
createVNode(_sfc_main$1s, { icon: unref(Close) }, null, 8, ["icon"])
|
|
8417
9327
|
]),
|
|
8418
9328
|
_: 1
|
|
8419
9329
|
}, 8, ["onClick"])
|
|
@@ -8423,14 +9333,14 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
8423
9333
|
_: 1
|
|
8424
9334
|
}, 8, ["values", "disabledShowSrc", "extendState"])) : createCommentVNode("", true),
|
|
8425
9335
|
!unref(showStylePanel) ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
8426
|
-
key:
|
|
9336
|
+
key: 2,
|
|
8427
9337
|
class: "m-editor-props-panel-style-icon",
|
|
8428
9338
|
circle: "",
|
|
8429
9339
|
type: unref(showStylePanel) ? "primary" : "",
|
|
8430
9340
|
onClick: unref(showStylePanelHandler)
|
|
8431
9341
|
}, {
|
|
8432
9342
|
default: withCtx(() => [
|
|
8433
|
-
createVNode(_sfc_main$
|
|
9343
|
+
createVNode(_sfc_main$1s, { icon: unref(Sugar) }, null, 8, ["icon"])
|
|
8434
9344
|
]),
|
|
8435
9345
|
_: 1
|
|
8436
9346
|
}, 8, ["type", "onClick"])) : createCommentVNode("", true)
|
|
@@ -8456,9 +9366,9 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
8456
9366
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
8457
9367
|
const props = __props;
|
|
8458
9368
|
const emit = __emit;
|
|
8459
|
-
const
|
|
8460
|
-
const
|
|
8461
|
-
const
|
|
9369
|
+
const menuEl = useTemplateRef("menu");
|
|
9370
|
+
const buttonRefs = useTemplateRef("buttons");
|
|
9371
|
+
const subMenuRef = useTemplateRef("subMenu");
|
|
8462
9372
|
const visible = ref(false);
|
|
8463
9373
|
const subMenuData = ref([]);
|
|
8464
9374
|
const zIndex = useZIndex();
|
|
@@ -8472,11 +9382,11 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
8472
9382
|
left: `${menuPosition.value.left + 2}px`,
|
|
8473
9383
|
zIndex: curZIndex.value
|
|
8474
9384
|
}));
|
|
8475
|
-
const contains = (el) =>
|
|
9385
|
+
const contains = (el) => menuEl.value?.contains(el) || subMenuRef.value?.contains(el);
|
|
8476
9386
|
const hide = () => {
|
|
8477
9387
|
if (!visible.value) return;
|
|
8478
9388
|
visible.value = false;
|
|
8479
|
-
|
|
9389
|
+
subMenuRef.value?.hide();
|
|
8480
9390
|
emit("hide");
|
|
8481
9391
|
};
|
|
8482
9392
|
const clickHandler = (event) => {
|
|
@@ -8497,7 +9407,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
8497
9407
|
hide();
|
|
8498
9408
|
};
|
|
8499
9409
|
const setPosition = (e) => {
|
|
8500
|
-
const menuHeight =
|
|
9410
|
+
const menuHeight = menuEl.value?.clientHeight || 0;
|
|
8501
9411
|
let top = e.clientY;
|
|
8502
9412
|
if (menuHeight + e.clientY > document.body.clientHeight) {
|
|
8503
9413
|
top = document.body.clientHeight - menuHeight;
|
|
@@ -8525,14 +9435,14 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
8525
9435
|
if (!visible.value) {
|
|
8526
9436
|
return;
|
|
8527
9437
|
}
|
|
8528
|
-
if (
|
|
8529
|
-
let y =
|
|
8530
|
-
if (
|
|
8531
|
-
const rect =
|
|
9438
|
+
if (menuEl.value) {
|
|
9439
|
+
let y = menuEl.value.offsetTop;
|
|
9440
|
+
if (buttonRefs.value?.[index].$el) {
|
|
9441
|
+
const rect = buttonRefs.value?.[index].$el.getBoundingClientRect();
|
|
8532
9442
|
y = rect.top;
|
|
8533
9443
|
}
|
|
8534
|
-
|
|
8535
|
-
clientX:
|
|
9444
|
+
subMenuRef.value?.show({
|
|
9445
|
+
clientX: menuEl.value.offsetLeft + menuEl.value.clientWidth - 2,
|
|
8536
9446
|
clientY: y
|
|
8537
9447
|
});
|
|
8538
9448
|
}
|
|
@@ -8550,7 +9460,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
8550
9460
|
globalThis.removeEventListener("mousedown", outsideClickHideHandler, true);
|
|
8551
9461
|
});
|
|
8552
9462
|
__expose({
|
|
8553
|
-
menu,
|
|
9463
|
+
menu: menuEl,
|
|
8554
9464
|
menuPosition,
|
|
8555
9465
|
hide,
|
|
8556
9466
|
show,
|
|
@@ -8563,8 +9473,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
8563
9473
|
default: withCtx(() => [
|
|
8564
9474
|
withDirectives(createElementVNode("div", {
|
|
8565
9475
|
class: "magic-editor-content-menu",
|
|
8566
|
-
|
|
8567
|
-
ref: menu,
|
|
9476
|
+
ref: "menu",
|
|
8568
9477
|
style: normalizeStyle(menuStyle.value),
|
|
8569
9478
|
onMouseenter: _cache[0] || (_cache[0] = ($event) => mouseenterHandler()),
|
|
8570
9479
|
onContextmenu: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
@@ -8576,8 +9485,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
8576
9485
|
return openBlock(), createBlock(_sfc_main$z, {
|
|
8577
9486
|
"event-type": "mouseup",
|
|
8578
9487
|
ref_for: true,
|
|
8579
|
-
|
|
8580
|
-
ref: buttons,
|
|
9488
|
+
ref: "buttons",
|
|
8581
9489
|
class: normalizeClass({ active: _ctx.active && item.id === _ctx.active }),
|
|
8582
9490
|
data: item,
|
|
8583
9491
|
key: index,
|
|
@@ -8590,8 +9498,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
8590
9498
|
subMenuData.value.length ? (openBlock(), createBlock(_component_content_menu, {
|
|
8591
9499
|
key: 0,
|
|
8592
9500
|
class: "sub-menu",
|
|
8593
|
-
|
|
8594
|
-
ref: subMenu,
|
|
9501
|
+
ref: "subMenu",
|
|
8595
9502
|
active: _ctx.active,
|
|
8596
9503
|
"menu-data": subMenuData.value,
|
|
8597
9504
|
"is-sub-menu": true,
|
|
@@ -8649,7 +9556,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
8649
9556
|
}
|
|
8650
9557
|
});
|
|
8651
9558
|
|
|
8652
|
-
const _hoisted_1$
|
|
9559
|
+
const _hoisted_1$a = ["draggable", "data-node-id", "data-parent-id", "data-parents-id", "data-is-container"];
|
|
8653
9560
|
const _hoisted_2$3 = { class: "tree-node-label" };
|
|
8654
9561
|
const _hoisted_3$1 = { class: "tree-node-tool" };
|
|
8655
9562
|
const _hoisted_4$1 = {
|
|
@@ -8730,7 +9637,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
8730
9637
|
onContextmenu: nodeContentmenuHandler,
|
|
8731
9638
|
onMouseenter: mouseenterHandler
|
|
8732
9639
|
}, [
|
|
8733
|
-
createVNode(_sfc_main$
|
|
9640
|
+
createVNode(_sfc_main$1s, {
|
|
8734
9641
|
class: "expand-icon",
|
|
8735
9642
|
style: normalizeStyle(hasChildren.value ? "" : "color: transparent; cursor: default"),
|
|
8736
9643
|
icon: expanded.value ? unref(ArrowDown) : unref(ArrowRight),
|
|
@@ -8775,14 +9682,14 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
8775
9682
|
}, 1032, ["data", "parent", "parentsId", "node-status-map", "indent"]);
|
|
8776
9683
|
}), 128))
|
|
8777
9684
|
])) : createCommentVNode("", true)
|
|
8778
|
-
], 40, _hoisted_1$
|
|
9685
|
+
], 40, _hoisted_1$a)), [
|
|
8779
9686
|
[vShow, visible.value]
|
|
8780
9687
|
]);
|
|
8781
9688
|
};
|
|
8782
9689
|
}
|
|
8783
9690
|
});
|
|
8784
9691
|
|
|
8785
|
-
const _hoisted_1$
|
|
9692
|
+
const _hoisted_1$9 = {
|
|
8786
9693
|
key: 1,
|
|
8787
9694
|
class: "m-editor-tree-empty"
|
|
8788
9695
|
};
|
|
@@ -8829,7 +9736,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
8829
9736
|
]),
|
|
8830
9737
|
_: 2
|
|
8831
9738
|
}, 1032, ["data", "indent", "next-level-indent-increment", "node-status-map"]);
|
|
8832
|
-
}), 128)) : (openBlock(), createElementBlock("div", _hoisted_1$
|
|
9739
|
+
}), 128)) : (openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
8833
9740
|
createElementVNode("p", null, toDisplayString(_ctx.emptyText), 1)
|
|
8834
9741
|
]))
|
|
8835
9742
|
], 32);
|
|
@@ -8980,7 +9887,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
8980
9887
|
placement: "bottom"
|
|
8981
9888
|
}, {
|
|
8982
9889
|
default: withCtx(() => [
|
|
8983
|
-
createVNode(_sfc_main$
|
|
9890
|
+
createVNode(_sfc_main$1s, {
|
|
8984
9891
|
icon: editable.value ? unref(Edit) : unref(View),
|
|
8985
9892
|
class: "edit-icon",
|
|
8986
9893
|
onClick: withModifiers(($event) => editCode(`${data.key}`), ["stop"])
|
|
@@ -8995,7 +9902,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
8995
9902
|
placement: "bottom"
|
|
8996
9903
|
}, {
|
|
8997
9904
|
default: withCtx(() => [
|
|
8998
|
-
createVNode(_sfc_main$
|
|
9905
|
+
createVNode(_sfc_main$1s, {
|
|
8999
9906
|
icon: unref(Close),
|
|
9000
9907
|
class: "edit-icon",
|
|
9001
9908
|
onClick: withModifiers(($event) => deleteCode(`${data.key}`), ["stop"])
|
|
@@ -9080,7 +9987,7 @@ const useContentMenu$1 = (deleteCode) => {
|
|
|
9080
9987
|
};
|
|
9081
9988
|
};
|
|
9082
9989
|
|
|
9083
|
-
const _hoisted_1$
|
|
9990
|
+
const _hoisted_1$8 = { class: "search-wrapper" };
|
|
9084
9991
|
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
9085
9992
|
...{
|
|
9086
9993
|
name: "MEditorCodeBlockListPanel"
|
|
@@ -9098,9 +10005,9 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
9098
10005
|
const { codeBlockService } = inject("services") || {};
|
|
9099
10006
|
const editable = computed(() => codeBlockService?.getEditStatus());
|
|
9100
10007
|
const { codeBlockEditor, codeConfig, editCode, deleteCode, createCodeBlock, submitCodeBlockHandler } = useCodeBlockEdit(codeBlockService);
|
|
9101
|
-
const
|
|
10008
|
+
const codeBlockListRef = useTemplateRef("codeBlockList");
|
|
9102
10009
|
const filterTextChangeHandler = (val) => {
|
|
9103
|
-
|
|
10010
|
+
codeBlockListRef.value?.filter(val);
|
|
9104
10011
|
};
|
|
9105
10012
|
eventBus?.on("edit-code", (id) => {
|
|
9106
10013
|
editCode(id);
|
|
@@ -9110,7 +10017,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
9110
10017
|
menuData: contentMenuData,
|
|
9111
10018
|
contentMenuHideHandler
|
|
9112
10019
|
} = useContentMenu$1((id) => {
|
|
9113
|
-
|
|
10020
|
+
codeBlockListRef.value?.deleteCode(id);
|
|
9114
10021
|
});
|
|
9115
10022
|
const menuData = computed(() => props.customContentMenu(contentMenuData, "code-block"));
|
|
9116
10023
|
return (_ctx, _cache) => {
|
|
@@ -9118,7 +10025,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
9118
10025
|
createVNode(unref(TMagicScrollbar), { class: "m-editor-code-block-list m-editor-layer-panel" }, {
|
|
9119
10026
|
default: withCtx(() => [
|
|
9120
10027
|
renderSlot(_ctx.$slots, "code-block-panel-header", {}, () => [
|
|
9121
|
-
createElementVNode("div", _hoisted_1$
|
|
10028
|
+
createElementVNode("div", _hoisted_1$8, [
|
|
9122
10029
|
createVNode(_sfc_main$n, { onSearch: filterTextChangeHandler }),
|
|
9123
10030
|
editable.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
9124
10031
|
key: 0,
|
|
@@ -9136,8 +10043,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
9136
10043
|
])
|
|
9137
10044
|
]),
|
|
9138
10045
|
createVNode(_sfc_main$k, {
|
|
9139
|
-
|
|
9140
|
-
ref: codeBlockList,
|
|
10046
|
+
ref: "codeBlockList",
|
|
9141
10047
|
"custom-error": _ctx.customError,
|
|
9142
10048
|
indent: _ctx.indent,
|
|
9143
10049
|
"next-level-indent-increment": _ctx.nextLevelIndentIncrement,
|
|
@@ -9156,7 +10062,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
9156
10062
|
]),
|
|
9157
10063
|
_: 3
|
|
9158
10064
|
}),
|
|
9159
|
-
unref(codeConfig) ? (openBlock(), createBlock(_sfc_main$
|
|
10065
|
+
unref(codeConfig) ? (openBlock(), createBlock(_sfc_main$1f, {
|
|
9160
10066
|
key: 0,
|
|
9161
10067
|
ref_key: "codeBlockEditor",
|
|
9162
10068
|
ref: codeBlockEditor,
|
|
@@ -9256,7 +10162,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
9256
10162
|
}
|
|
9257
10163
|
});
|
|
9258
10164
|
return (_ctx, _cache) => {
|
|
9259
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10165
|
+
return openBlock(), createBlock(_sfc_main$1k, {
|
|
9260
10166
|
visible: boxVisible.value,
|
|
9261
10167
|
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => boxVisible.value = $event),
|
|
9262
10168
|
width: width.value,
|
|
@@ -9420,7 +10326,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
9420
10326
|
placement: "bottom"
|
|
9421
10327
|
}, {
|
|
9422
10328
|
default: withCtx(() => [
|
|
9423
|
-
createVNode(_sfc_main$
|
|
10329
|
+
createVNode(_sfc_main$1s, {
|
|
9424
10330
|
icon: editable.value ? unref(Edit) : unref(View),
|
|
9425
10331
|
class: "edit-icon",
|
|
9426
10332
|
onClick: withModifiers(($event) => editHandler(`${data.key}`), ["stop"])
|
|
@@ -9435,7 +10341,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
9435
10341
|
placement: "bottom"
|
|
9436
10342
|
}, {
|
|
9437
10343
|
default: withCtx(() => [
|
|
9438
|
-
createVNode(_sfc_main$
|
|
10344
|
+
createVNode(_sfc_main$1s, {
|
|
9439
10345
|
icon: unref(Close),
|
|
9440
10346
|
class: "edit-icon",
|
|
9441
10347
|
onClick: withModifiers(($event) => removeHandler(`${data.key}`), ["stop"])
|
|
@@ -9516,7 +10422,7 @@ const useContentMenu = () => {
|
|
|
9516
10422
|
};
|
|
9517
10423
|
};
|
|
9518
10424
|
|
|
9519
|
-
const _hoisted_1$
|
|
10425
|
+
const _hoisted_1$7 = { class: "search-wrapper" };
|
|
9520
10426
|
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
9521
10427
|
...{
|
|
9522
10428
|
name: "MEditorDataSourceListPanel"
|
|
@@ -9579,7 +10485,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
9579
10485
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
9580
10486
|
createVNode(unref(TMagicScrollbar), { class: "data-source-list-panel m-editor-layer-panel" }, {
|
|
9581
10487
|
default: withCtx(() => [
|
|
9582
|
-
createElementVNode("div", _hoisted_1$
|
|
10488
|
+
createElementVNode("div", _hoisted_1$7, [
|
|
9583
10489
|
createVNode(_sfc_main$n, { onSearch: filterTextChangeHandler }),
|
|
9584
10490
|
unref(editable) ? (openBlock(), createBlock(unref(TMagicPopover), {
|
|
9585
10491
|
key: 0,
|
|
@@ -9651,7 +10557,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
9651
10557
|
}
|
|
9652
10558
|
});
|
|
9653
10559
|
|
|
9654
|
-
const _hoisted_1$
|
|
10560
|
+
const _hoisted_1$6 = {
|
|
9655
10561
|
width: "1em",
|
|
9656
10562
|
height: "1em",
|
|
9657
10563
|
viewBox: "0 0 16 16",
|
|
@@ -9666,7 +10572,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
9666
10572
|
__name: "FolderMinusIcon",
|
|
9667
10573
|
setup(__props) {
|
|
9668
10574
|
return (_ctx, _cache) => {
|
|
9669
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
10575
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$6, _cache[0] || (_cache[0] = [
|
|
9670
10576
|
createElementVNode("path", {
|
|
9671
10577
|
"fill-rule": "evenodd",
|
|
9672
10578
|
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"
|
|
@@ -9764,7 +10670,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
9764
10670
|
const props = __props;
|
|
9765
10671
|
const emit = __emit;
|
|
9766
10672
|
const services = inject("services");
|
|
9767
|
-
const
|
|
10673
|
+
const menuRef = useTemplateRef("menu");
|
|
9768
10674
|
const node = computed(() => services?.editorService.get("node"));
|
|
9769
10675
|
const nodes = computed(() => services?.editorService.get("nodes"));
|
|
9770
10676
|
const componentList = computed(() => services?.componentListService.getList() || []);
|
|
@@ -9840,7 +10746,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
9840
10746
|
)
|
|
9841
10747
|
);
|
|
9842
10748
|
const show = (e) => {
|
|
9843
|
-
|
|
10749
|
+
menuRef.value?.show(e);
|
|
9844
10750
|
};
|
|
9845
10751
|
__expose({
|
|
9846
10752
|
show
|
|
@@ -9848,8 +10754,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
9848
10754
|
return (_ctx, _cache) => {
|
|
9849
10755
|
return openBlock(), createBlock(_sfc_main$o, {
|
|
9850
10756
|
"menu-data": menuData.value,
|
|
9851
|
-
|
|
9852
|
-
ref: menu,
|
|
10757
|
+
ref: "menu",
|
|
9853
10758
|
style: { "overflow": "initial" }
|
|
9854
10759
|
}, null, 8, ["menu-data"]);
|
|
9855
10760
|
};
|
|
@@ -9874,12 +10779,12 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
9874
10779
|
};
|
|
9875
10780
|
return (_ctx, _cache) => {
|
|
9876
10781
|
return _ctx.data.type !== "page" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
9877
|
-
_ctx.data.visible === false ? (openBlock(), createBlock(_sfc_main$
|
|
10782
|
+
_ctx.data.visible === false ? (openBlock(), createBlock(_sfc_main$1s, {
|
|
9878
10783
|
key: 0,
|
|
9879
10784
|
icon: unref(Hide),
|
|
9880
10785
|
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => setNodeVisible(true), ["stop"])),
|
|
9881
10786
|
title: "点击显示"
|
|
9882
|
-
}, null, 8, ["icon"])) : (openBlock(), createBlock(_sfc_main$
|
|
10787
|
+
}, null, 8, ["icon"])) : (openBlock(), createBlock(_sfc_main$1s, {
|
|
9883
10788
|
key: 1,
|
|
9884
10789
|
icon: unref(View),
|
|
9885
10790
|
onClick: _cache[1] || (_cache[1] = withModifiers(($event) => setNodeVisible(false), ["stop"])),
|
|
@@ -9891,7 +10796,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
9891
10796
|
}
|
|
9892
10797
|
});
|
|
9893
10798
|
|
|
9894
|
-
const useClick = (services, isCtrlKeyDown, nodeStatusMap) => {
|
|
10799
|
+
const useClick = (services, isCtrlKeyDown, nodeStatusMap, menuRef) => {
|
|
9895
10800
|
const isMultiSelect = computed(() => isCtrlKeyDown.value && !services?.editorService.get("disabledMultiSelect"));
|
|
9896
10801
|
const select = async (data) => {
|
|
9897
10802
|
if (!data.id) {
|
|
@@ -9956,9 +10861,8 @@ const useClick = (services, isCtrlKeyDown, nodeStatusMap) => {
|
|
|
9956
10861
|
select(data);
|
|
9957
10862
|
});
|
|
9958
10863
|
};
|
|
9959
|
-
const menu = useTemplateRef("menu");
|
|
9960
10864
|
return {
|
|
9961
|
-
|
|
10865
|
+
menuRef,
|
|
9962
10866
|
nodeClickHandler,
|
|
9963
10867
|
nodeContentMenuHandler(event, data) {
|
|
9964
10868
|
event.preventDefault();
|
|
@@ -9966,7 +10870,7 @@ const useClick = (services, isCtrlKeyDown, nodeStatusMap) => {
|
|
|
9966
10870
|
if (nodes.length < 2 || !nodes.includes(data)) {
|
|
9967
10871
|
nodeClickHandler(event, data);
|
|
9968
10872
|
}
|
|
9969
|
-
|
|
10873
|
+
menuRef.value?.show(event);
|
|
9970
10874
|
},
|
|
9971
10875
|
highlightHandler
|
|
9972
10876
|
};
|
|
@@ -10367,11 +11271,11 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
10367
11271
|
setup(__props) {
|
|
10368
11272
|
const services = inject("services");
|
|
10369
11273
|
const editorService = services?.editorService;
|
|
10370
|
-
const
|
|
11274
|
+
const treeRef = useTemplateRef("tree");
|
|
10371
11275
|
const page = computed(() => editorService?.get("page"));
|
|
10372
11276
|
const nodeData = computed(() => !page.value ? [] : [page.value]);
|
|
10373
11277
|
const { nodeStatusMap } = useNodeStatus(services);
|
|
10374
|
-
const { isCtrlKeyDown } = useKeybinding(services,
|
|
11278
|
+
const { isCtrlKeyDown } = useKeybinding(services, treeRef);
|
|
10375
11279
|
const filterNodeMethod = (v, data) => {
|
|
10376
11280
|
let name = "";
|
|
10377
11281
|
if (data.name) {
|
|
@@ -10393,12 +11297,12 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
10393
11297
|
}
|
|
10394
11298
|
};
|
|
10395
11299
|
const { handleDragStart, handleDragEnd, handleDragLeave, handleDragOver } = useDrag(services);
|
|
11300
|
+
const menuRef = useTemplateRef("menu");
|
|
10396
11301
|
const {
|
|
10397
|
-
menu,
|
|
10398
11302
|
nodeClickHandler,
|
|
10399
11303
|
nodeContentMenuHandler,
|
|
10400
11304
|
highlightHandler: mouseenterHandler
|
|
10401
|
-
} = useClick(services, isCtrlKeyDown, nodeStatusMap);
|
|
11305
|
+
} = useClick(services, isCtrlKeyDown, nodeStatusMap, menuRef);
|
|
10402
11306
|
return (_ctx, _cache) => {
|
|
10403
11307
|
return openBlock(), createBlock(unref(TMagicScrollbar), { class: "m-editor-layer-panel" }, {
|
|
10404
11308
|
default: withCtx(() => [
|
|
@@ -10407,8 +11311,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
10407
11311
|
page.value && unref(nodeStatusMap) ? (openBlock(), createBlock(_sfc_main$l, {
|
|
10408
11312
|
key: 0,
|
|
10409
11313
|
tabindex: "-1",
|
|
10410
|
-
|
|
10411
|
-
ref: tree,
|
|
11314
|
+
ref: "tree",
|
|
10412
11315
|
data: nodeData.value,
|
|
10413
11316
|
"node-status-map": unref(nodeStatusMap),
|
|
10414
11317
|
indent: _ctx.indent,
|
|
@@ -10436,8 +11339,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
10436
11339
|
}, 8, ["data", "node-status-map", "indent", "next-level-indent-increment", "onNodeDragover", "onNodeDragstart", "onNodeDragleave", "onNodeDragend", "onNodeContextmenu", "onNodeMouseenter", "onNodeClick"])) : createCommentVNode("", true),
|
|
10437
11340
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
10438
11341
|
createVNode(_sfc_main$e, {
|
|
10439
|
-
|
|
10440
|
-
ref: menu,
|
|
11342
|
+
ref: "menu",
|
|
10441
11343
|
"layer-content-menu": _ctx.layerContentMenu,
|
|
10442
11344
|
"custom-content-menu": _ctx.customContentMenu,
|
|
10443
11345
|
onCollapseAll: collapseAllHandler
|
|
@@ -10450,7 +11352,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
10450
11352
|
}
|
|
10451
11353
|
});
|
|
10452
11354
|
|
|
10453
|
-
const _hoisted_1$
|
|
11355
|
+
const _hoisted_1$5 = ["onClick", "onDragstart"];
|
|
10454
11356
|
const _hoisted_2$2 = ["title"];
|
|
10455
11357
|
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
10456
11358
|
...{
|
|
@@ -10540,7 +11442,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
10540
11442
|
name: `${index}`
|
|
10541
11443
|
}, {
|
|
10542
11444
|
title: withCtx(() => [
|
|
10543
|
-
createVNode(_sfc_main$
|
|
11445
|
+
createVNode(_sfc_main$1s, { icon: unref(Grid) }, null, 8, ["icon"]),
|
|
10544
11446
|
createTextVNode(toDisplayString(group.title), 1)
|
|
10545
11447
|
]),
|
|
10546
11448
|
default: withCtx(() => [
|
|
@@ -10561,7 +11463,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
10561
11463
|
content: item.desc
|
|
10562
11464
|
}, {
|
|
10563
11465
|
default: withCtx(() => [
|
|
10564
|
-
createVNode(_sfc_main$
|
|
11466
|
+
createVNode(_sfc_main$1s, {
|
|
10565
11467
|
icon: item.icon
|
|
10566
11468
|
}, null, 8, ["icon"])
|
|
10567
11469
|
]),
|
|
@@ -10571,7 +11473,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
10571
11473
|
title: item.text
|
|
10572
11474
|
}, toDisplayString(item.text), 9, _hoisted_2$2)
|
|
10573
11475
|
])
|
|
10574
|
-
], 40, _hoisted_1$
|
|
11476
|
+
], 40, _hoisted_1$5);
|
|
10575
11477
|
}), 128))
|
|
10576
11478
|
]),
|
|
10577
11479
|
_: 2
|
|
@@ -10589,7 +11491,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
10589
11491
|
}
|
|
10590
11492
|
});
|
|
10591
11493
|
|
|
10592
|
-
const _hoisted_1$
|
|
11494
|
+
const _hoisted_1$4 = {
|
|
10593
11495
|
key: 0,
|
|
10594
11496
|
class: "m-editor-sidebar"
|
|
10595
11497
|
};
|
|
@@ -10739,7 +11641,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
10739
11641
|
});
|
|
10740
11642
|
return (_ctx, _cache) => {
|
|
10741
11643
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
10742
|
-
_ctx.data.type === "tabs" && _ctx.data.items.length ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
11644
|
+
_ctx.data.type === "tabs" && _ctx.data.items.length ? (openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
10743
11645
|
createElementVNode("div", _hoisted_2$1, [
|
|
10744
11646
|
(openBlock(true), createElementBlock(Fragment, null, renderList(sideBarItems.value, (config, index) => {
|
|
10745
11647
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
@@ -10752,7 +11654,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
10752
11654
|
(...args) => unref(dragstartHandler) && unref(dragstartHandler)(...args)),
|
|
10753
11655
|
onDragend: ($event) => unref(dragendHandler)(config.$key, $event)
|
|
10754
11656
|
}, [
|
|
10755
|
-
config.icon ? (openBlock(), createBlock(_sfc_main$
|
|
11657
|
+
config.icon ? (openBlock(), createBlock(_sfc_main$1s, {
|
|
10756
11658
|
key: 0,
|
|
10757
11659
|
icon: config.icon
|
|
10758
11660
|
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
@@ -10898,7 +11800,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
10898
11800
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
10899
11801
|
(openBlock(true), createElementBlock(Fragment, null, renderList(sideBarItems.value, (config, index) => {
|
|
10900
11802
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
10901
|
-
unref(floatBoxStates)[config.$key]?.status ? (openBlock(), createBlock(_sfc_main$
|
|
11803
|
+
unref(floatBoxStates)[config.$key]?.status ? (openBlock(), createBlock(_sfc_main$1k, {
|
|
10902
11804
|
key: config.$key ?? index,
|
|
10903
11805
|
visible: unref(floatBoxStates)[config.$key].status,
|
|
10904
11806
|
"onUpdate:visible": ($event) => unref(floatBoxStates)[config.$key].status = $event,
|
|
@@ -10944,8 +11846,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
10944
11846
|
setup(__props, { emit: __emit }) {
|
|
10945
11847
|
const props = __props;
|
|
10946
11848
|
const emit = __emit;
|
|
10947
|
-
const
|
|
10948
|
-
const
|
|
11849
|
+
const barEl = useTemplateRef("bar");
|
|
11850
|
+
const thumbEl = useTemplateRef("thumb");
|
|
10949
11851
|
const thumbSize = computed(() => props.size * (props.size / props.scrollSize));
|
|
10950
11852
|
const thumbPos = computed(() => props.pos / props.scrollSize * props.size);
|
|
10951
11853
|
const thumbStyle = computed(() => ({
|
|
@@ -10954,9 +11856,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
10954
11856
|
}));
|
|
10955
11857
|
let gesto;
|
|
10956
11858
|
onMounted(() => {
|
|
10957
|
-
if (!
|
|
10958
|
-
|
|
10959
|
-
gesto = new Gesto(thumbEl, {
|
|
11859
|
+
if (!thumbEl.value) return;
|
|
11860
|
+
gesto = new Gesto(thumbEl.value, {
|
|
10960
11861
|
container: window
|
|
10961
11862
|
});
|
|
10962
11863
|
gesto.on("dragStart", (e) => {
|
|
@@ -10965,11 +11866,11 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
10965
11866
|
}).on("drag", (e) => {
|
|
10966
11867
|
scrollBy(getDelta(e));
|
|
10967
11868
|
});
|
|
10968
|
-
|
|
11869
|
+
barEl.value?.addEventListener("wheel", wheelHandler, false);
|
|
10969
11870
|
});
|
|
10970
11871
|
onBeforeUnmount(() => {
|
|
10971
11872
|
if (gesto) gesto.off();
|
|
10972
|
-
|
|
11873
|
+
barEl.value?.removeEventListener("wheel", wheelHandler, false);
|
|
10973
11874
|
});
|
|
10974
11875
|
const wheelHandler = (e) => {
|
|
10975
11876
|
const delta = props.isHorizontal ? e.deltaX : e.deltaY;
|
|
@@ -11000,13 +11901,11 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
11000
11901
|
};
|
|
11001
11902
|
return (_ctx, _cache) => {
|
|
11002
11903
|
return openBlock(), createElementBlock("div", {
|
|
11003
|
-
|
|
11004
|
-
ref: bar,
|
|
11904
|
+
ref: "bar",
|
|
11005
11905
|
class: normalizeClass(["m-editor-scroll-bar", _ctx.isHorizontal ? "horizontal" : "vertical"])
|
|
11006
11906
|
}, [
|
|
11007
11907
|
createElementVNode("div", {
|
|
11008
|
-
|
|
11009
|
-
ref: thumb,
|
|
11908
|
+
ref: "thumb",
|
|
11010
11909
|
class: "m-editor-scroll-bar-thumb",
|
|
11011
11910
|
style: normalizeStyle(thumbStyle.value)
|
|
11012
11911
|
}, null, 4)
|
|
@@ -11015,6 +11914,10 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
11015
11914
|
}
|
|
11016
11915
|
});
|
|
11017
11916
|
|
|
11917
|
+
const _hoisted_1$3 = {
|
|
11918
|
+
class: "m-editor-scroll-viewer-container",
|
|
11919
|
+
ref: "container"
|
|
11920
|
+
};
|
|
11018
11921
|
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
11019
11922
|
...{
|
|
11020
11923
|
name: "MEditorScrollViewer"
|
|
@@ -11033,8 +11936,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
11033
11936
|
},
|
|
11034
11937
|
setup(__props, { expose: __expose }) {
|
|
11035
11938
|
const props = __props;
|
|
11036
|
-
const
|
|
11037
|
-
const el = useTemplateRef("
|
|
11939
|
+
const containerEl = useTemplateRef("container");
|
|
11940
|
+
const el = useTemplateRef("target");
|
|
11038
11941
|
const style = computed(
|
|
11039
11942
|
() => `
|
|
11040
11943
|
width: ${isNumber(`${props.width}`) ? `${props.width}px` : props.width};
|
|
@@ -11047,9 +11950,9 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
11047
11950
|
const scrollHeight = ref(0);
|
|
11048
11951
|
let scrollViewer;
|
|
11049
11952
|
onMounted(() => {
|
|
11050
|
-
if (!
|
|
11953
|
+
if (!containerEl.value || !el.value) return;
|
|
11051
11954
|
scrollViewer = new ScrollViewer({
|
|
11052
|
-
container:
|
|
11955
|
+
container: containerEl.value,
|
|
11053
11956
|
target: el.value,
|
|
11054
11957
|
zoom: props.zoom,
|
|
11055
11958
|
correctionScrollSize: props.correctionScrollSize
|
|
@@ -11085,17 +11988,12 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
11085
11988
|
});
|
|
11086
11989
|
};
|
|
11087
11990
|
__expose({
|
|
11088
|
-
container
|
|
11991
|
+
container: containerEl
|
|
11089
11992
|
});
|
|
11090
11993
|
return (_ctx, _cache) => {
|
|
11091
|
-
return openBlock(), createElementBlock("div",
|
|
11092
|
-
class: "m-editor-scroll-viewer-container",
|
|
11093
|
-
ref_key: "container",
|
|
11094
|
-
ref: container
|
|
11095
|
-
}, [
|
|
11994
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
11096
11995
|
createElementVNode("div", {
|
|
11097
|
-
|
|
11098
|
-
ref: el,
|
|
11996
|
+
ref: "target",
|
|
11099
11997
|
style: normalizeStyle(style.value)
|
|
11100
11998
|
}, [
|
|
11101
11999
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -11128,8 +12026,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
11128
12026
|
const editorService = services?.editorService;
|
|
11129
12027
|
const visible = ref(false);
|
|
11130
12028
|
const buttonVisible = ref(false);
|
|
11131
|
-
const
|
|
11132
|
-
const
|
|
12029
|
+
const buttonEl = useTemplateRef("button");
|
|
12030
|
+
const boxRef = useTemplateRef("box");
|
|
11133
12031
|
const stage = computed(() => editorService?.get("stage"));
|
|
11134
12032
|
const page = computed(() => editorService?.get("page"));
|
|
11135
12033
|
const nodes = computed(() => editorService?.get("nodes") || []);
|
|
@@ -11174,12 +12072,12 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
11174
12072
|
top: 0
|
|
11175
12073
|
});
|
|
11176
12074
|
watch(visible, async (visible2) => {
|
|
11177
|
-
if (!
|
|
12075
|
+
if (!buttonEl.value || !visible2) {
|
|
11178
12076
|
return;
|
|
11179
12077
|
}
|
|
11180
12078
|
await nextTick();
|
|
11181
|
-
const rect =
|
|
11182
|
-
const height =
|
|
12079
|
+
const rect = buttonEl.value.getBoundingClientRect();
|
|
12080
|
+
const height = boxRef.value?.target?.clientHeight || 0;
|
|
11183
12081
|
menuPosition.value = {
|
|
11184
12082
|
left: rect.left + rect.width + 5,
|
|
11185
12083
|
top: rect.top - height / 2 + rect.height / 2
|
|
@@ -11193,18 +12091,16 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
11193
12091
|
}, {
|
|
11194
12092
|
default: withCtx(() => [
|
|
11195
12093
|
createElementVNode("div", {
|
|
11196
|
-
|
|
11197
|
-
ref: button,
|
|
12094
|
+
ref: "button",
|
|
11198
12095
|
class: "m-editor-stage-float-button",
|
|
11199
12096
|
onClick: _cache[0] || (_cache[0] = ($event) => visible.value = true)
|
|
11200
12097
|
}, "可选组件", 512)
|
|
11201
12098
|
]),
|
|
11202
12099
|
_: 1
|
|
11203
12100
|
})) : createCommentVNode("", true),
|
|
11204
|
-
page.value && unref(nodeStatusMap) && buttonVisible.value ? (openBlock(), createBlock(_sfc_main$
|
|
12101
|
+
page.value && unref(nodeStatusMap) && buttonVisible.value ? (openBlock(), createBlock(_sfc_main$1k, {
|
|
11205
12102
|
key: 1,
|
|
11206
|
-
|
|
11207
|
-
ref: box,
|
|
12103
|
+
ref: "box",
|
|
11208
12104
|
visible: visible.value,
|
|
11209
12105
|
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => visible.value = $event),
|
|
11210
12106
|
title: "当前位置下的组件",
|
|
@@ -11230,7 +12126,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
11230
12126
|
setup(__props) {
|
|
11231
12127
|
const services = inject("services");
|
|
11232
12128
|
const stageOptions = inject("stageOptions");
|
|
11233
|
-
const
|
|
12129
|
+
const stageOverlayEl = useTemplateRef("stageOverlay");
|
|
11234
12130
|
const stageOverlayVisible = computed(() => services?.stageOverlayService.get("stageOverlayVisible"));
|
|
11235
12131
|
const wrapWidth = computed(() => services?.stageOverlayService.get("wrapWidth") || 0);
|
|
11236
12132
|
const wrapHeight = computed(() => services?.stageOverlayService.get("wrapHeight") || 0);
|
|
@@ -11249,12 +12145,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
11249
12145
|
services?.stageOverlayService.closeOverlay();
|
|
11250
12146
|
}
|
|
11251
12147
|
});
|
|
11252
|
-
watch(
|
|
12148
|
+
watch(stageOverlayEl, (stageOverlay) => {
|
|
11253
12149
|
if (!services) return;
|
|
11254
12150
|
const subStage = services.stageOverlayService.createStage(stageOptions);
|
|
11255
12151
|
services?.stageOverlayService.set("stage", subStage);
|
|
11256
|
-
if (
|
|
11257
|
-
subStage.mount(
|
|
12152
|
+
if (stageOverlay && subStage) {
|
|
12153
|
+
subStage.mount(stageOverlay);
|
|
11258
12154
|
const { mask, renderer } = subStage;
|
|
11259
12155
|
const { contentWindow } = renderer;
|
|
11260
12156
|
mask?.showRule(false);
|
|
@@ -11286,8 +12182,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
11286
12182
|
_: 1
|
|
11287
12183
|
}),
|
|
11288
12184
|
createElementVNode("div", {
|
|
11289
|
-
|
|
11290
|
-
ref: stageOverlay,
|
|
12185
|
+
ref: "stageOverlay",
|
|
11291
12186
|
class: "m-editor-stage-overlay-container",
|
|
11292
12187
|
style: normalizeStyle(style.value),
|
|
11293
12188
|
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
@@ -11351,7 +12246,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
11351
12246
|
const props = __props;
|
|
11352
12247
|
const services = inject("services");
|
|
11353
12248
|
const editorService = services?.editorService;
|
|
11354
|
-
const
|
|
12249
|
+
const menuRef = useTemplateRef("menu");
|
|
11355
12250
|
const canCenter = ref(false);
|
|
11356
12251
|
const node = computed(() => editorService?.get("node"));
|
|
11357
12252
|
const nodes = computed(() => editorService?.get("nodes"));
|
|
@@ -11370,7 +12265,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
11370
12265
|
}
|
|
11371
12266
|
},
|
|
11372
12267
|
useCopyMenu(),
|
|
11373
|
-
usePasteMenu(
|
|
12268
|
+
usePasteMenu(menuRef),
|
|
11374
12269
|
{
|
|
11375
12270
|
type: "divider",
|
|
11376
12271
|
direction: "horizontal",
|
|
@@ -11452,14 +12347,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
11452
12347
|
{ immediate: true }
|
|
11453
12348
|
);
|
|
11454
12349
|
const show = (e) => {
|
|
11455
|
-
|
|
12350
|
+
menuRef.value?.show(e);
|
|
11456
12351
|
};
|
|
11457
12352
|
__expose({ show });
|
|
11458
12353
|
return (_ctx, _cache) => {
|
|
11459
12354
|
return openBlock(), createBlock(_sfc_main$o, {
|
|
11460
12355
|
"menu-data": menuData.value,
|
|
11461
|
-
|
|
11462
|
-
ref: menu
|
|
12356
|
+
ref: "menu"
|
|
11463
12357
|
}, null, 8, ["menu-data"]);
|
|
11464
12358
|
};
|
|
11465
12359
|
}
|
|
@@ -11482,9 +12376,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11482
12376
|
let runtime = null;
|
|
11483
12377
|
const services = inject("services");
|
|
11484
12378
|
const stageLoading = computed(() => services?.editorService.get("stageLoading") || false);
|
|
11485
|
-
const
|
|
11486
|
-
const
|
|
11487
|
-
const
|
|
12379
|
+
const stageWrapRef = useTemplateRef("stageWrap");
|
|
12380
|
+
const stageContainerEl = useTemplateRef("stageContainer");
|
|
12381
|
+
const menuRef = useTemplateRef("menu");
|
|
11488
12382
|
const nodes = computed(() => services?.editorService.get("nodes") || []);
|
|
11489
12383
|
const isMultiSelect = computed(() => nodes.value.length > 1);
|
|
11490
12384
|
const stageRect = computed(() => services?.uiService.get("stageRect"));
|
|
@@ -11495,14 +12389,14 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11495
12389
|
const node = computed(() => services?.editorService.get("node"));
|
|
11496
12390
|
watchEffect(() => {
|
|
11497
12391
|
if (stage || !page.value) return;
|
|
11498
|
-
if (!
|
|
12392
|
+
if (!stageContainerEl.value) return;
|
|
11499
12393
|
if (!(props.stageOptions?.runtimeUrl || props.stageOptions?.render) || !root.value) return;
|
|
11500
12394
|
stage = useStage(props.stageOptions);
|
|
11501
12395
|
stage.on("select", () => {
|
|
11502
|
-
|
|
12396
|
+
stageWrapRef.value?.container?.focus();
|
|
11503
12397
|
});
|
|
11504
12398
|
services?.editorService.set("stage", markRaw(stage));
|
|
11505
|
-
stage.mount(
|
|
12399
|
+
stage.mount(stageContainerEl.value);
|
|
11506
12400
|
if (!node.value?.id) {
|
|
11507
12401
|
return;
|
|
11508
12402
|
}
|
|
@@ -11555,9 +12449,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11555
12449
|
}
|
|
11556
12450
|
});
|
|
11557
12451
|
onMounted(() => {
|
|
11558
|
-
if (
|
|
11559
|
-
resizeObserver.observe(
|
|
11560
|
-
services?.keybindingService.registerEl(KeyBindingContainerKey.STAGE,
|
|
12452
|
+
if (stageWrapRef.value?.container) {
|
|
12453
|
+
resizeObserver.observe(stageWrapRef.value.container);
|
|
12454
|
+
services?.keybindingService.registerEl(KeyBindingContainerKey.STAGE, stageWrapRef.value.container);
|
|
11561
12455
|
}
|
|
11562
12456
|
});
|
|
11563
12457
|
onBeforeUnmount(() => {
|
|
@@ -11570,7 +12464,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11570
12464
|
const parseDSL = getEditorConfig("parseDSL");
|
|
11571
12465
|
const contextmenuHandler = (e) => {
|
|
11572
12466
|
e.preventDefault();
|
|
11573
|
-
|
|
12467
|
+
menuRef.value?.show(e);
|
|
11574
12468
|
};
|
|
11575
12469
|
const dragoverHandler = (e) => {
|
|
11576
12470
|
if (!e.dataTransfer) return;
|
|
@@ -11593,9 +12487,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11593
12487
|
if (parentId) {
|
|
11594
12488
|
parent = services?.editorService.getNodeById(parentId, false);
|
|
11595
12489
|
}
|
|
11596
|
-
if (parent &&
|
|
12490
|
+
if (parent && stageContainerEl.value && stage) {
|
|
11597
12491
|
const layout = await services?.editorService.getLayout(parent);
|
|
11598
|
-
const containerRect =
|
|
12492
|
+
const containerRect = stageContainerEl.value.getBoundingClientRect();
|
|
11599
12493
|
const { scrollTop, scrollLeft } = stage.mask;
|
|
11600
12494
|
const { style = {} } = config.data;
|
|
11601
12495
|
let top = 0;
|
|
@@ -11629,8 +12523,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11629
12523
|
const _directive_loading = resolveDirective("loading");
|
|
11630
12524
|
return withDirectives((openBlock(), createBlock(_sfc_main$8, {
|
|
11631
12525
|
class: "m-editor-stage",
|
|
11632
|
-
|
|
11633
|
-
ref: stageWrap,
|
|
12526
|
+
ref: "stageWrap",
|
|
11634
12527
|
tabindex: "-1",
|
|
11635
12528
|
"element-loading-text": "Runtime 加载中...",
|
|
11636
12529
|
width: stageRect.value?.width,
|
|
@@ -11642,14 +12535,13 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11642
12535
|
width: 60,
|
|
11643
12536
|
height: 50
|
|
11644
12537
|
},
|
|
11645
|
-
onClick: _cache[0] || (_cache[0] = ($event) => unref(
|
|
12538
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(stageWrapRef)?.container?.focus())
|
|
11646
12539
|
}, {
|
|
11647
12540
|
content: withCtx(() => [
|
|
11648
12541
|
!_ctx.disabledStageOverlay ? (openBlock(), createBlock(_sfc_main$6, { key: 0 })) : createCommentVNode("", true),
|
|
11649
12542
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
11650
12543
|
createVNode(_sfc_main$4, {
|
|
11651
|
-
|
|
11652
|
-
ref: menu,
|
|
12544
|
+
ref: "menu",
|
|
11653
12545
|
"is-multi-select": isMultiSelect.value,
|
|
11654
12546
|
"stage-content-menu": _ctx.stageContentMenu,
|
|
11655
12547
|
"custom-content-menu": _ctx.customContentMenu
|
|
@@ -11659,8 +12551,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11659
12551
|
default: withCtx(() => [
|
|
11660
12552
|
createElementVNode("div", {
|
|
11661
12553
|
class: "m-editor-stage-container",
|
|
11662
|
-
|
|
11663
|
-
ref: stageContainer,
|
|
12554
|
+
ref: "stageContainer",
|
|
11664
12555
|
style: normalizeStyle(`transform: scale(${zoom.value});`),
|
|
11665
12556
|
onContextmenu: contextmenuHandler,
|
|
11666
12557
|
onDrop: dropHandler,
|
|
@@ -12001,7 +12892,7 @@ class CodeBlock extends BaseService {
|
|
|
12001
12892
|
const codeBlockService = new CodeBlock();
|
|
12002
12893
|
|
|
12003
12894
|
class ComponentList extends BaseService {
|
|
12004
|
-
state =
|
|
12895
|
+
state = shallowReactive({
|
|
12005
12896
|
list: []
|
|
12006
12897
|
});
|
|
12007
12898
|
constructor() {
|
|
@@ -12182,7 +13073,7 @@ const dataSourceService = new DataSource();
|
|
|
12182
13073
|
|
|
12183
13074
|
const idleTask = new IdleTask();
|
|
12184
13075
|
class Dep extends BaseService {
|
|
12185
|
-
state =
|
|
13076
|
+
state = shallowReactive({
|
|
12186
13077
|
collecting: false
|
|
12187
13078
|
});
|
|
12188
13079
|
watcher = new Watcher({ initialTargets: reactive({}) });
|
|
@@ -12224,6 +13115,7 @@ class Dep extends BaseService {
|
|
|
12224
13115
|
});
|
|
12225
13116
|
this.set("collecting", false);
|
|
12226
13117
|
this.emit("collected", nodes, deep);
|
|
13118
|
+
this.emit("ds-collected", nodes, deep);
|
|
12227
13119
|
}
|
|
12228
13120
|
collectIdle(nodes, depExtendedData = {}, deep = false, type) {
|
|
12229
13121
|
this.set("collecting", true);
|
|
@@ -12244,6 +13136,9 @@ class Dep extends BaseService {
|
|
|
12244
13136
|
this.set("collecting", false);
|
|
12245
13137
|
resolve();
|
|
12246
13138
|
});
|
|
13139
|
+
idleTask.once("hight-level-finish", () => {
|
|
13140
|
+
this.emit("ds-collected", nodes, deep);
|
|
13141
|
+
});
|
|
12247
13142
|
});
|
|
12248
13143
|
}
|
|
12249
13144
|
collectNode(node, target, depExtendedData = {}, deep = false) {
|
|
@@ -12291,7 +13186,8 @@ class Dep extends BaseService {
|
|
|
12291
13186
|
node,
|
|
12292
13187
|
deep: false,
|
|
12293
13188
|
target
|
|
12294
|
-
}
|
|
13189
|
+
},
|
|
13190
|
+
target.type === DepTargetType.DATA_SOURCE
|
|
12295
13191
|
);
|
|
12296
13192
|
if (deep && Array.isArray(node.items) && node.items.length) {
|
|
12297
13193
|
node.items.forEach((item) => {
|
|
@@ -12538,7 +13434,7 @@ const canUsePluginMethods = {
|
|
|
12538
13434
|
sync: ["openOverlay", "closeOverlay", "updateOverlay", "createStage"]
|
|
12539
13435
|
};
|
|
12540
13436
|
class StageOverlay extends BaseService {
|
|
12541
|
-
state =
|
|
13437
|
+
state = shallowReactive({
|
|
12542
13438
|
wrapDiv: document.createElement("div"),
|
|
12543
13439
|
sourceEl: null,
|
|
12544
13440
|
contentEl: null,
|
|
@@ -12906,57 +13802,39 @@ const initServiceEvents = (props, emit, { editorService, codeBlockService, dataS
|
|
|
12906
13802
|
stage2.on("rerender", () => {
|
|
12907
13803
|
const node = editorService.get("node");
|
|
12908
13804
|
if (!node) return;
|
|
12909
|
-
collectIdle([node], true)
|
|
12910
|
-
|
|
12911
|
-
});
|
|
13805
|
+
collectIdle([node], true);
|
|
13806
|
+
updateStage([node]);
|
|
12912
13807
|
});
|
|
12913
13808
|
});
|
|
12914
|
-
const getApp = () =>
|
|
12915
|
-
|
|
12916
|
-
|
|
12917
|
-
|
|
12918
|
-
if (root && app?.dsl) {
|
|
12919
|
-
app.dsl.dataSourceDeps = root.dataSourceDeps;
|
|
12920
|
-
app.dsl.dataSourceCondDeps = root.dataSourceCondDeps;
|
|
12921
|
-
app.dsl.dataSources = root.dataSources;
|
|
13809
|
+
const getApp = () => {
|
|
13810
|
+
const renderer = stage.value?.renderer;
|
|
13811
|
+
if (!renderer) {
|
|
13812
|
+
return void 0;
|
|
12922
13813
|
}
|
|
12923
|
-
if (
|
|
12924
|
-
getApp
|
|
13814
|
+
if (renderer.runtime) {
|
|
13815
|
+
return renderer.runtime.getApp?.();
|
|
12925
13816
|
}
|
|
12926
|
-
|
|
12927
|
-
|
|
12928
|
-
|
|
12929
|
-
|
|
12930
|
-
|
|
12931
|
-
|
|
12932
|
-
|
|
12933
|
-
|
|
12934
|
-
|
|
12935
|
-
});
|
|
12936
|
-
} else {
|
|
12937
|
-
allNodes.push(...nodes);
|
|
12938
|
-
}
|
|
12939
|
-
const deps = Object.values(root.dataSourceDeps || {});
|
|
12940
|
-
deps.forEach((dep) => {
|
|
12941
|
-
Object.keys(dep).forEach((id) => {
|
|
12942
|
-
const node = allNodes.find((node2) => node2.id === id);
|
|
12943
|
-
node && stage.value?.update({
|
|
12944
|
-
config: cloneDeep(node),
|
|
12945
|
-
parentId: editorService.getParentById(node.id)?.id,
|
|
12946
|
-
root: cloneDeep(root)
|
|
12947
|
-
});
|
|
13817
|
+
return new Promise((resolve) => {
|
|
13818
|
+
const timeout = globalThis.setTimeout(() => {
|
|
13819
|
+
resolve(void 0);
|
|
13820
|
+
}, 1e4);
|
|
13821
|
+
renderer.on("runtime-ready", () => {
|
|
13822
|
+
if (timeout) {
|
|
13823
|
+
globalThis.clearTimeout(timeout);
|
|
13824
|
+
}
|
|
13825
|
+
resolve(renderer.runtime?.getApp?.());
|
|
12948
13826
|
});
|
|
12949
13827
|
});
|
|
12950
13828
|
};
|
|
12951
|
-
const
|
|
13829
|
+
const updateDataSourceSchema = async () => {
|
|
12952
13830
|
const root = editorService.get("root");
|
|
12953
|
-
|
|
12954
|
-
|
|
12955
|
-
|
|
12956
|
-
|
|
12957
|
-
|
|
12958
|
-
|
|
12959
|
-
|
|
13831
|
+
const app = await getApp();
|
|
13832
|
+
if (root && app?.dsl) {
|
|
13833
|
+
app.dsl.dataSourceDeps = root.dataSourceDeps;
|
|
13834
|
+
app.dsl.dataSources = root.dataSources;
|
|
13835
|
+
}
|
|
13836
|
+
if (root?.dataSources) {
|
|
13837
|
+
app?.dataSourceManager?.updateSchema(root.dataSources);
|
|
12960
13838
|
}
|
|
12961
13839
|
};
|
|
12962
13840
|
const targetAddHandler = (target) => {
|
|
@@ -12985,17 +13863,58 @@ const initServiceEvents = (props, emit, { editorService, codeBlockService, dataS
|
|
|
12985
13863
|
delete root.dataSourceCondDeps[id];
|
|
12986
13864
|
}
|
|
12987
13865
|
};
|
|
12988
|
-
const
|
|
13866
|
+
const updateStage = (nodes, inDeps = false) => {
|
|
13867
|
+
const root = editorService.get("root");
|
|
13868
|
+
if (!root) return;
|
|
13869
|
+
const update = (node) => stage.value?.update({
|
|
13870
|
+
config: cloneDeep(node),
|
|
13871
|
+
parentId: editorService.getParentById(node.id)?.id,
|
|
13872
|
+
root: cloneDeep(root)
|
|
13873
|
+
});
|
|
13874
|
+
nodes.forEach((node) => {
|
|
13875
|
+
const inDepsNodeId = [];
|
|
13876
|
+
const deps = Object.values(root.dataSourceDeps || {});
|
|
13877
|
+
deps.forEach((dep) => {
|
|
13878
|
+
Object.keys(dep).forEach((id) => {
|
|
13879
|
+
inDepsNodeId.push(id);
|
|
13880
|
+
});
|
|
13881
|
+
});
|
|
13882
|
+
if (inDeps) {
|
|
13883
|
+
if (inDepsNodeId.includes(node.id)) {
|
|
13884
|
+
update(node);
|
|
13885
|
+
}
|
|
13886
|
+
} else {
|
|
13887
|
+
if (!inDepsNodeId.includes(node.id)) {
|
|
13888
|
+
update(node);
|
|
13889
|
+
}
|
|
13890
|
+
}
|
|
13891
|
+
});
|
|
13892
|
+
};
|
|
13893
|
+
const dsDepCollectedHandler = async (nodes, deep) => {
|
|
12989
13894
|
const root = editorService.get("root");
|
|
12990
13895
|
if (!root) return;
|
|
12991
|
-
const app = getApp();
|
|
13896
|
+
const app = await getApp();
|
|
12992
13897
|
if (app?.dsl) {
|
|
12993
13898
|
app.dsl.dataSourceDeps = root.dataSourceDeps;
|
|
12994
13899
|
}
|
|
13900
|
+
if (deep) {
|
|
13901
|
+
nodes.forEach((node) => {
|
|
13902
|
+
traverseNode(
|
|
13903
|
+
node,
|
|
13904
|
+
(node2) => {
|
|
13905
|
+
updateStage([node2], true);
|
|
13906
|
+
},
|
|
13907
|
+
[],
|
|
13908
|
+
true
|
|
13909
|
+
);
|
|
13910
|
+
});
|
|
13911
|
+
} else {
|
|
13912
|
+
updateStage(nodes, true);
|
|
13913
|
+
}
|
|
12995
13914
|
};
|
|
12996
13915
|
depService.on("add-target", targetAddHandler);
|
|
12997
13916
|
depService.on("remove-target", targetRemoveHandler);
|
|
12998
|
-
depService.on("collected",
|
|
13917
|
+
depService.on("ds-collected", dsDepCollectedHandler);
|
|
12999
13918
|
const initDataSourceDepTarget = (ds) => {
|
|
13000
13919
|
depService.addTarget(createDataSourceTarget(ds, reactive({})));
|
|
13001
13920
|
depService.addTarget(createDataSourceMethodTarget(ds, reactive({})));
|
|
@@ -13014,9 +13933,8 @@ const initServiceEvents = (props, emit, { editorService, codeBlockService, dataS
|
|
|
13014
13933
|
})
|
|
13015
13934
|
);
|
|
13016
13935
|
const nodeAddHandler = (nodes) => {
|
|
13017
|
-
collectIdle(nodes, true)
|
|
13018
|
-
|
|
13019
|
-
});
|
|
13936
|
+
collectIdle(nodes, true);
|
|
13937
|
+
updateStage(nodes);
|
|
13020
13938
|
};
|
|
13021
13939
|
const nodeUpdateHandler = (data) => {
|
|
13022
13940
|
const needRecollectNodes = [];
|
|
@@ -13037,11 +13955,10 @@ const initServiceEvents = (props, emit, { editorService, codeBlockService, dataS
|
|
|
13037
13955
|
}
|
|
13038
13956
|
});
|
|
13039
13957
|
if (needRecollectNodes.length) {
|
|
13040
|
-
collectIdle(needRecollectNodes, true)
|
|
13041
|
-
|
|
13042
|
-
});
|
|
13958
|
+
collectIdle(needRecollectNodes, true);
|
|
13959
|
+
updateStage(needRecollectNodes);
|
|
13043
13960
|
} else if (normalNodes.length) {
|
|
13044
|
-
|
|
13961
|
+
updateStage(normalNodes);
|
|
13045
13962
|
}
|
|
13046
13963
|
};
|
|
13047
13964
|
const nodeRemoveHandler = (nodes) => {
|
|
@@ -13049,7 +13966,7 @@ const initServiceEvents = (props, emit, { editorService, codeBlockService, dataS
|
|
|
13049
13966
|
};
|
|
13050
13967
|
const historyChangeHandler = (page) => {
|
|
13051
13968
|
collectIdle([page], true).then(() => {
|
|
13052
|
-
updateDataSourceSchema(
|
|
13969
|
+
updateDataSourceSchema();
|
|
13053
13970
|
});
|
|
13054
13971
|
};
|
|
13055
13972
|
editorService.on("history-change", historyChangeHandler);
|
|
@@ -13069,11 +13986,12 @@ const initServiceEvents = (props, emit, { editorService, codeBlockService, dataS
|
|
|
13069
13986
|
};
|
|
13070
13987
|
codeBlockService.on("addOrUpdate", codeBlockAddOrUpdateHandler);
|
|
13071
13988
|
codeBlockService.on("remove", codeBlockRemoveHandler);
|
|
13072
|
-
const dataSourceAddHandler = (config) => {
|
|
13989
|
+
const dataSourceAddHandler = async (config) => {
|
|
13073
13990
|
initDataSourceDepTarget(config);
|
|
13074
|
-
getApp()
|
|
13991
|
+
const app = await getApp();
|
|
13992
|
+
app?.dataSourceManager?.addDataSource(config);
|
|
13075
13993
|
};
|
|
13076
|
-
const dataSourceUpdateHandler = (config, { changeRecords }) => {
|
|
13994
|
+
const dataSourceUpdateHandler = async (config, { changeRecords }) => {
|
|
13077
13995
|
let needRecollectDep = false;
|
|
13078
13996
|
for (const changeRecord of changeRecords) {
|
|
13079
13997
|
if (!changeRecord.propPath) {
|
|
@@ -13091,11 +14009,12 @@ const initServiceEvents = (props, emit, { editorService, codeBlockService, dataS
|
|
|
13091
14009
|
removeDataSourceTarget(config.id);
|
|
13092
14010
|
initDataSourceDepTarget(config);
|
|
13093
14011
|
collectIdle(root.items, true).then(() => {
|
|
13094
|
-
updateDataSourceSchema(
|
|
14012
|
+
updateDataSourceSchema();
|
|
13095
14013
|
});
|
|
13096
14014
|
}
|
|
13097
14015
|
} else if (root?.dataSources) {
|
|
13098
|
-
getApp()
|
|
14016
|
+
const app = await getApp();
|
|
14017
|
+
app?.dataSourceManager?.updateSchema(root.dataSources);
|
|
13099
14018
|
}
|
|
13100
14019
|
};
|
|
13101
14020
|
const removeDataSourceTarget = (id) => {
|
|
@@ -13108,7 +14027,7 @@ const initServiceEvents = (props, emit, { editorService, codeBlockService, dataS
|
|
|
13108
14027
|
const nodeIds = Object.keys(root?.dataSourceDeps?.[id] || {});
|
|
13109
14028
|
const nodes = getNodes(nodeIds, root?.items);
|
|
13110
14029
|
collectIdle(nodes, false).then(() => {
|
|
13111
|
-
updateDataSourceSchema(
|
|
14030
|
+
updateDataSourceSchema();
|
|
13112
14031
|
});
|
|
13113
14032
|
removeDataSourceTarget(id);
|
|
13114
14033
|
};
|
|
@@ -13118,7 +14037,7 @@ const initServiceEvents = (props, emit, { editorService, codeBlockService, dataS
|
|
|
13118
14037
|
onBeforeUnmount(() => {
|
|
13119
14038
|
depService.off("add-target", targetAddHandler);
|
|
13120
14039
|
depService.off("remove-target", targetRemoveHandler);
|
|
13121
|
-
depService.off("collected",
|
|
14040
|
+
depService.off("ds-collected", dsDepCollectedHandler);
|
|
13122
14041
|
editorService.off("history-change", historyChangeHandler);
|
|
13123
14042
|
editorService.off("root-change", rootChangeHandler);
|
|
13124
14043
|
editorService.off("add", nodeAddHandler);
|
|
@@ -13379,25 +14298,26 @@ const index = {
|
|
|
13379
14298
|
app.config.globalProperties.$TMAGIC_EDITOR = option;
|
|
13380
14299
|
setEditorConfig(option);
|
|
13381
14300
|
app.component(`${_sfc_main.name || "MEditor"}`, _sfc_main);
|
|
13382
|
-
app.component("magic-code-editor", _sfc_main$
|
|
14301
|
+
app.component("magic-code-editor", _sfc_main$1r);
|
|
13383
14302
|
app.component("m-fields-ui-select", _sfc_main$C);
|
|
13384
|
-
app.component("m-fields-code-link", _sfc_main$
|
|
13385
|
-
app.component("m-fields-vs-code", _sfc_main$
|
|
13386
|
-
app.component("m-fields-code-select", _sfc_main$
|
|
13387
|
-
app.component("m-fields-code-select-col", _sfc_main$
|
|
13388
|
-
app.component("m-fields-event-select", _sfc_main$
|
|
13389
|
-
app.component("m-fields-data-source-fields", _sfc_main$
|
|
13390
|
-
app.component("m-fields-data-source-mocks", _sfc_main$
|
|
13391
|
-
app.component("m-fields-key-value", _sfc_main$
|
|
13392
|
-
app.component("m-fields-data-source-input", _sfc_main$
|
|
13393
|
-
app.component("m-fields-data-source-select", _sfc_main$
|
|
13394
|
-
app.component("m-fields-data-source-methods", _sfc_main$
|
|
13395
|
-
app.component("m-fields-data-source-method-select", _sfc_main$
|
|
13396
|
-
app.component("m-fields-data-source-field-select", _sfc_main$
|
|
13397
|
-
app.component("m-fields-page-fragment-select", _sfc_main$
|
|
13398
|
-
app.component("m-fields-display-conds", _sfc_main$
|
|
13399
|
-
app.component("m-fields-cond-op-select", _sfc_main$
|
|
14303
|
+
app.component("m-fields-code-link", _sfc_main$1p);
|
|
14304
|
+
app.component("m-fields-vs-code", _sfc_main$1q);
|
|
14305
|
+
app.component("m-fields-code-select", _sfc_main$1o);
|
|
14306
|
+
app.component("m-fields-code-select-col", _sfc_main$1m);
|
|
14307
|
+
app.component("m-fields-event-select", _sfc_main$19);
|
|
14308
|
+
app.component("m-fields-data-source-fields", _sfc_main$1j);
|
|
14309
|
+
app.component("m-fields-data-source-mocks", _sfc_main$1c);
|
|
14310
|
+
app.component("m-fields-key-value", _sfc_main$17);
|
|
14311
|
+
app.component("m-fields-data-source-input", _sfc_main$1g);
|
|
14312
|
+
app.component("m-fields-data-source-select", _sfc_main$1b);
|
|
14313
|
+
app.component("m-fields-data-source-methods", _sfc_main$1e);
|
|
14314
|
+
app.component("m-fields-data-source-method-select", _sfc_main$1d);
|
|
14315
|
+
app.component("m-fields-data-source-field-select", _sfc_main$1h);
|
|
14316
|
+
app.component("m-fields-page-fragment-select", _sfc_main$16);
|
|
14317
|
+
app.component("m-fields-display-conds", _sfc_main$1a);
|
|
14318
|
+
app.component("m-fields-cond-op-select", _sfc_main$1l);
|
|
14319
|
+
app.component("m-form-style-setter", _sfc_main$D);
|
|
13400
14320
|
}
|
|
13401
14321
|
};
|
|
13402
14322
|
|
|
13403
|
-
export { CODE_DRAFT_STORAGE_KEY, COPY_CODE_STORAGE_KEY, COPY_DS_STORAGE_KEY, COPY_STORAGE_KEY, _sfc_main$
|
|
14323
|
+
export { CODE_DRAFT_STORAGE_KEY, COPY_CODE_STORAGE_KEY, COPY_DS_STORAGE_KEY, COPY_STORAGE_KEY, _sfc_main$1f as CodeBlockEditor, _sfc_main$k as CodeBlockList, _sfc_main$j as CodeBlockListPanel, CodeDeleteErrorType, _sfc_main$1o as CodeSelect, _sfc_main$1m as CodeSelectCol, ColumnLayout, _sfc_main$b as ComponentListPanel, _sfc_main$1l as CondOpSelect, _sfc_main$o as ContentMenu, _sfc_main$i as DataSourceConfigPanel, _sfc_main$1h as DataSourceFieldSelect, _sfc_main$1j as DataSourceFields, _sfc_main$1g as DataSourceInput, _sfc_main$1d as DataSourceMethodSelect, _sfc_main$1e as DataSourceMethods, _sfc_main$1c as DataSourceMocks, _sfc_main$1b as DataSourceSelect, _sfc_main$1a as DisplayConds, DragType, _sfc_main$19 as EventSelect, Fixed2Other, _sfc_main$1k as FloatingBox, H_GUIDE_LINE_STORAGE_KEY, _sfc_main$1s as Icon, IdleTask, KeyBindingCommand, _sfc_main$17 as KeyValue, Keys, LayerOffset, _sfc_main$c as LayerPanel, Layout, _sfc_main$A as LayoutContainer, _sfc_main$16 as PageFragmentSelect, _sfc_main$q as PropsFormPanel, _sfc_main$p as PropsPanel, _sfc_main$B as Resizer, ScrollViewer, SideItemKey, _sfc_main$A as SplitView, _sfc_main$D as StyleSetter, _sfc_main$1r as TMagicCodeEditor, _sfc_main as TMagicEditor, _sfc_main$z as ToolButton, _sfc_main$l as Tree, _sfc_main$m as TreeNode, UI_SELECT_MODE_EVENT_NAME, UndoRedo, V_GUIDE_LINE_STORAGE_KEY, advancedTabConfig, arrayOptions, beforePaste, change2Fixed, codeBlockService, dataSourceService, debug, index as default, depService, displayTabConfig, editorService, eqOptions, error, eventTabConfig, eventsService, fillConfig$1 as fillConfig, fixNodeLeft, fixNodePosition, generatePageName, generatePageNameByApp, getAddParent, getCascaderOptionsFromFields, getDefaultConfig, getDisplayField, getEditorConfig, getFormConfig, getFormValue, getGuideLineFromCache, getInitPositionStyle, getNodeIndex, getPageFragmentList, getPageList, getPageNameList, getPositionInContainer, getRelativeStyle, historyService, info, isIncludeDataSource, log, moveItemsInContainer, numberOptions, propsService, removeDataSourceFieldPrefix, serializeConfig, setChildrenLayout, setEditorConfig, setLayout, stageOverlayService, storageService, styleTabConfig, uiService, updateStatus, useCodeBlockEdit, useEditorContentHeight, useFilter, useFloatBox, useGetSo, useNextFloatBoxPosition, useNodeStatus$1 as useNodeStatus, useStage, useWindowRect, warn };
|