@tmagic/editor 1.3.2 → 1.3.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 +6 -0
- package/dist/tmagic-editor.js +187 -141
- package/dist/tmagic-editor.js.map +1 -1
- package/dist/tmagic-editor.umd.cjs +193 -144
- package/dist/tmagic-editor.umd.cjs.map +1 -1
- package/package.json +11 -11
- package/src/components/ScrollViewer.vue +6 -4
- package/src/fields/DataSourceFields.vue +15 -10
- package/src/fields/KeyValue.vue +72 -31
- package/src/index.ts +1 -1
- package/src/layouts/workspace/viewer/Stage.vue +5 -1
- package/src/services/editor.ts +3 -1
- package/src/services/ui.ts +7 -2
- package/src/theme/key-value.scss +7 -0
- package/src/type.ts +6 -3
- package/src/utils/data-source/formConfigs/http.ts +1 -0
- package/types/components/ScrollViewer.vue.d.ts +6 -6
- package/types/fields/KeyValue.vue.d.ts +2 -0
- package/types/index.d.ts +1 -1
- package/types/services/ui.d.ts +2 -2
- package/types/type.d.ts +6 -3
package/dist/tmagic-editor.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, onMounted, onUnmounted, openBlock, createElementBlock, createBlock, Teleport, createElementVNode, normalizeClass, normalizeStyle, createVNode, unref, computed, reactive, resolveComponent, inject, withCtx, Fragment, resolveDynamicComponent, createTextVNode, createCommentVNode, toRaw, nextTick, mergeProps, toDisplayString, renderList, watchEffect, withModifiers, renderSlot, createSlots, normalizeProps, markRaw, getCurrentInstance, withDirectives, vShow,
|
|
1
|
+
import { defineComponent, ref, watch, onMounted, onUnmounted, openBlock, createElementBlock, createBlock, Teleport, createElementVNode, normalizeClass, normalizeStyle, createVNode, unref, computed, reactive, resolveComponent, inject, withCtx, Fragment, resolveDynamicComponent, createTextVNode, createCommentVNode, toRaw, nextTick, mergeProps, toDisplayString, renderList, createStaticVNode, watchEffect, withModifiers, renderSlot, createSlots, normalizeProps, markRaw, getCurrentInstance, withDirectives, vShow, provide, Transition, toHandlers, mergeDefaults } from 'vue';
|
|
2
2
|
import { FullScreen, Edit, View, Coin, Delete, Plus, Close, ArrowDown, Grid, Memo, ScaleToOriginal, ZoomOut, ZoomIn, Right, Back, Search, Aim, ArrowRight, CopyDocument, DocumentCopy, Files, Hide, Goods, List, EditPen, Top, Bottom, ArrowLeftBold, ArrowRightBold, CaretBottom } from '@element-plus/icons-vue';
|
|
3
3
|
import { throttle, isEmpty, cloneDeep, mergeWith, isObject, uniq, map, has, pick, keys } from 'lodash-es';
|
|
4
4
|
import * as monaco from 'monaco-editor';
|
|
@@ -7,10 +7,11 @@ import { TMagicButton, TMagicCard, tMagicMessage, TMagicDialog, TMagicTag, tMagi
|
|
|
7
7
|
import { HookType, NodeType, ActionType } from '@tmagic/schema';
|
|
8
8
|
import { MFormBox, MFormDrawer, MForm, createValues, MSelect } from '@tmagic/form';
|
|
9
9
|
import { MagicTable } from '@tmagic/table';
|
|
10
|
-
import { guid, isPop, getNodePath, isNumber, isPage, toLine,
|
|
10
|
+
import { guid, isPop, getNodePath, isNumber, isPage, toLine, getDefaultValueFromFields, DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX, getKeys, addClassName, removeClassName, removeClassNameByClassName, convertToNumber, getNodes } from '@tmagic/utils';
|
|
11
11
|
import Gesto from 'gesto';
|
|
12
12
|
import Moveable from 'moveable';
|
|
13
13
|
import { DepTargetType, Watcher, createCodeBlockTarget, createDataSourceTarget, createDataSourceMethodTarget, createDataSourceCondTarget } from '@tmagic/dep';
|
|
14
|
+
export { DepTargetType } from '@tmagic/dep';
|
|
14
15
|
import StageCore, { GuidesType, StageDragStatus, getOffset, calcValueByFontsize, CONTAINER_HIGHLIGHT_CLASS_NAME, ContainerHighlightType } from '@tmagic/stage';
|
|
15
16
|
import { EventEmitter } from 'events';
|
|
16
17
|
import { DEFAULT_EVENTS, DEFAULT_METHODS } from '@tmagic/core';
|
|
@@ -406,7 +407,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
406
407
|
|
|
407
408
|
const _hoisted_1$w = { style: { "display": "flex", "margin-bottom": "10px" } };
|
|
408
409
|
const _hoisted_2$p = { style: { "flex": "1" } };
|
|
409
|
-
const _hoisted_3$
|
|
410
|
+
const _hoisted_3$c = { style: { "flex": "1" } };
|
|
410
411
|
const _hoisted_4$7 = { class: "dialog-footer" };
|
|
411
412
|
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
412
413
|
...{
|
|
@@ -664,7 +665,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
664
665
|
_: 1
|
|
665
666
|
})
|
|
666
667
|
]),
|
|
667
|
-
createElementVNode("div", _hoisted_3$
|
|
668
|
+
createElementVNode("div", _hoisted_3$c, [
|
|
668
669
|
createVNode(unref(TMagicTag), {
|
|
669
670
|
size: "small",
|
|
670
671
|
type: "success"
|
|
@@ -769,6 +770,7 @@ const HttpFormConfig = [
|
|
|
769
770
|
name: "data",
|
|
770
771
|
type: "key-value",
|
|
771
772
|
defaultValue: {},
|
|
773
|
+
advanced: true,
|
|
772
774
|
text: "请求体"
|
|
773
775
|
},
|
|
774
776
|
{
|
|
@@ -2530,7 +2532,9 @@ class Editor extends BaseService {
|
|
|
2530
2532
|
async update(config) {
|
|
2531
2533
|
const nodes = Array.isArray(config) ? config : [config];
|
|
2532
2534
|
const newNodes = await Promise.all(nodes.map((node) => this.doUpdate(node)));
|
|
2533
|
-
|
|
2535
|
+
if (newNodes[0]?.type !== NodeType.ROOT) {
|
|
2536
|
+
this.pushHistoryState();
|
|
2537
|
+
}
|
|
2534
2538
|
this.emit("update", newNodes);
|
|
2535
2539
|
return Array.isArray(config) ? newNodes : newNodes[0];
|
|
2536
2540
|
}
|
|
@@ -3283,7 +3287,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
3283
3287
|
},
|
|
3284
3288
|
{
|
|
3285
3289
|
label: "属性描述",
|
|
3286
|
-
prop: "
|
|
3290
|
+
prop: "description"
|
|
3287
3291
|
},
|
|
3288
3292
|
{
|
|
3289
3293
|
label: "默认值",
|
|
@@ -3414,6 +3418,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
3414
3418
|
data: {}
|
|
3415
3419
|
});
|
|
3416
3420
|
const newFromJsonHandler = () => {
|
|
3421
|
+
jsonFromValues.value.data = getDefaultValueFromFields(props.model[props.name]);
|
|
3417
3422
|
addFromJsonDialog.value?.show();
|
|
3418
3423
|
};
|
|
3419
3424
|
const getValueType = (value) => {
|
|
@@ -3431,33 +3436,35 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
3431
3436
|
return "string";
|
|
3432
3437
|
return "any";
|
|
3433
3438
|
};
|
|
3434
|
-
const getFieldsConfig = (value) => {
|
|
3439
|
+
const getFieldsConfig = (value, fields = []) => {
|
|
3435
3440
|
if (!value || typeof value !== "object")
|
|
3436
3441
|
throw new Error("数据格式错误");
|
|
3437
|
-
const
|
|
3442
|
+
const newFields = [];
|
|
3438
3443
|
Object.entries(value).forEach(([key, value2]) => {
|
|
3439
3444
|
const type = getValueType(value2);
|
|
3445
|
+
const oldField = fields.find((field) => field.name === key);
|
|
3440
3446
|
let childFields = [];
|
|
3441
3447
|
if (Array.isArray(value2) && value2.length > 0) {
|
|
3442
|
-
childFields = getFieldsConfig(value2[0]);
|
|
3448
|
+
childFields = getFieldsConfig(value2[0], oldField?.fields);
|
|
3443
3449
|
} else if (type === "object") {
|
|
3444
|
-
childFields = getFieldsConfig(value2);
|
|
3450
|
+
childFields = getFieldsConfig(value2, oldField?.fields);
|
|
3445
3451
|
}
|
|
3446
|
-
|
|
3452
|
+
newFields.push({
|
|
3447
3453
|
name: key,
|
|
3448
|
-
title: key,
|
|
3454
|
+
title: oldField?.title || key,
|
|
3449
3455
|
type,
|
|
3456
|
+
description: oldField?.description || "",
|
|
3457
|
+
enable: oldField?.enable ?? true,
|
|
3450
3458
|
defaultValue: value2,
|
|
3451
3459
|
fields: childFields
|
|
3452
3460
|
});
|
|
3453
3461
|
});
|
|
3454
|
-
return
|
|
3462
|
+
return newFields;
|
|
3455
3463
|
};
|
|
3456
3464
|
const addFromJsonFromChange = ({ data }) => {
|
|
3457
|
-
console.log(data);
|
|
3458
3465
|
try {
|
|
3459
3466
|
const value = JSON.parse(data);
|
|
3460
|
-
props.model[props.name] = getFieldsConfig(value);
|
|
3467
|
+
props.model[props.name] = getFieldsConfig(value, props.model[props.name]);
|
|
3461
3468
|
addFromJsonDialog.value?.hide();
|
|
3462
3469
|
emit("change", props.model[props.name]);
|
|
3463
3470
|
} catch (e) {
|
|
@@ -3579,7 +3586,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
3579
3586
|
|
|
3580
3587
|
const _hoisted_1$s = { style: { "display": "flex", "flex-direction": "column", "line-height": "1.2em" } };
|
|
3581
3588
|
const _hoisted_2$m = { style: { "font-size": "10px", "color": "rgba(0, 0, 0, 0.6)" } };
|
|
3582
|
-
const _hoisted_3$
|
|
3589
|
+
const _hoisted_3$b = { class: "el-input__inner" };
|
|
3583
3590
|
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
3584
3591
|
...{
|
|
3585
3592
|
name: "MEditorDataSourceInput"
|
|
@@ -3787,7 +3794,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
3787
3794
|
createElementVNode("div", {
|
|
3788
3795
|
class: normalizeClass(`tmagic-data-source-input-text-wrapper el-input__wrapper ${isFocused.value ? " is-focus" : ""}`)
|
|
3789
3796
|
}, [
|
|
3790
|
-
createElementVNode("div", _hoisted_3$
|
|
3797
|
+
createElementVNode("div", _hoisted_3$b, [
|
|
3791
3798
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayState.value, (item, index) => {
|
|
3792
3799
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
3793
3800
|
item.type === "text" ? (openBlock(), createElementBlock("span", {
|
|
@@ -4675,9 +4682,32 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
4675
4682
|
}
|
|
4676
4683
|
});
|
|
4677
4684
|
|
|
4678
|
-
const _hoisted_1$n = {
|
|
4679
|
-
|
|
4685
|
+
const _hoisted_1$n = {
|
|
4686
|
+
viewBox: "0 0 32 32",
|
|
4687
|
+
version: "1.1",
|
|
4688
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4689
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
4690
|
+
};
|
|
4691
|
+
const _hoisted_2$h = /* @__PURE__ */ createStaticVNode('<defs><rect id="path-1" x="0" y="0" width="32" height="32"></rect></defs><g id="组件规范" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="03图标" transform="translate(-561.000000, -2356.000000)"><g id="icon/line/Universal/code" transform="translate(561.000000, 2356.000000)"><g id="路径"><mask id="mask-2" fill="white"><use xlink:href="#path-1"></use></mask><use id="蒙版" fill="#D8D8D8" opacity="0" xlink:href="#path-1"></use><path d="M21.9284587,7.9482233 L29.8079004,15.827665 C29.9055315,15.9252961 29.9055315,16.0835874 29.8079004,16.1812184 L21.9284587,24.0606602 C21.8308276,24.1582912 21.6725364,24.1582912 21.5749053,24.0606602 L20.3374684,22.8232233 C20.2419143,22.7276698 20.2398813,22.5740096 20.331369,22.4759832 L20.3374687,22.4696702 L26.8027181,16.0044417 L20.3374687,9.53921328 C20.2398372,9.44158265 20.2398369,9.2832914 20.3374679,9.18566017 L21.5749053,7.9482233 C21.6725364,7.85059223 21.8308276,7.85059223 21.9284587,7.9482233 Z M10.3999684,7.9482233 L11.6374053,9.18566017 C11.7329594,9.28121371 11.7349925,9.43487387 11.6435048,9.53290029 L11.637405,9.53921328 L5.17215562,16.0044417 L11.637405,22.4696702 C11.7329593,22.5652236 11.7349926,22.7188837 11.643505,22.8169103 L11.6374053,22.8232233 L10.3999684,24.0606602 C10.3023374,24.1582912 10.1440461,24.1582912 10.046415,24.0606602 L2.1669733,16.1812184 C2.06934223,16.0835874 2.06934223,15.9252961 2.1669733,15.827665 L10.046415,7.9482233 C10.1440461,7.85059223 10.3023374,7.85059223 10.3999684,7.9482233 Z M17.2612532,9.29310422 L18.9262468,9.83189578 C19.0576112,9.87440526 19.1296423,10.0153579 19.0871328,10.1467222 L15.0848232,22.514807 C15.0423138,22.6461714 14.9013612,22.7182025 14.7699968,22.675693 L13.1050032,22.1369014 C12.9736388,22.0943919 12.9016077,21.9534393 12.9441172,21.822075 L16.9464268,9.45399022 C16.9889362,9.32262585 17.1298888,9.25059474 17.2612532,9.29310422 Z" id="形状" fill="#1D1F24" mask="url(#mask-2)"></path></g></g><g id="icon切图" transform="translate(226.000000, 1782.000000)"></g></g></g>', 2);
|
|
4692
|
+
const _hoisted_4$6 = [
|
|
4693
|
+
_hoisted_2$h
|
|
4694
|
+
];
|
|
4680
4695
|
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
4696
|
+
...{
|
|
4697
|
+
name: "MEditorCodeIcon"
|
|
4698
|
+
},
|
|
4699
|
+
__name: "CodeIcon",
|
|
4700
|
+
setup(__props) {
|
|
4701
|
+
return (_ctx, _cache) => {
|
|
4702
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$n, _hoisted_4$6);
|
|
4703
|
+
};
|
|
4704
|
+
}
|
|
4705
|
+
});
|
|
4706
|
+
|
|
4707
|
+
const _hoisted_1$m = { class: "m-fields-key-value" };
|
|
4708
|
+
const _hoisted_2$g = { key: 0 };
|
|
4709
|
+
const _hoisted_3$a = /* @__PURE__ */ createElementVNode("span", { class: "m-fileds-key-value-delimiter" }, ":", -1);
|
|
4710
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
4681
4711
|
...{
|
|
4682
4712
|
name: "MEditorKeyValue"
|
|
4683
4713
|
},
|
|
@@ -4698,8 +4728,16 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
4698
4728
|
const props = __props;
|
|
4699
4729
|
const emit = __emit;
|
|
4700
4730
|
const records = ref([]);
|
|
4731
|
+
const showCode = ref(false);
|
|
4701
4732
|
watchEffect(() => {
|
|
4702
|
-
|
|
4733
|
+
const initValues = Object.entries(props.model[props.name] || {});
|
|
4734
|
+
for (const [, value] of initValues) {
|
|
4735
|
+
if (typeof value !== "string") {
|
|
4736
|
+
showCode.value = true;
|
|
4737
|
+
break;
|
|
4738
|
+
}
|
|
4739
|
+
}
|
|
4740
|
+
records.value = initValues;
|
|
4703
4741
|
});
|
|
4704
4742
|
const getValue = () => {
|
|
4705
4743
|
const record = {};
|
|
@@ -4723,66 +4761,90 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
4723
4761
|
records.value.splice(index, 1);
|
|
4724
4762
|
emit("change", getValue());
|
|
4725
4763
|
};
|
|
4764
|
+
const save = (v) => {
|
|
4765
|
+
emit("change", v);
|
|
4766
|
+
};
|
|
4726
4767
|
return (_ctx, _cache) => {
|
|
4727
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
4728
|
-
(openBlock(
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4768
|
+
return openBlock(), createElementBlock("div", _hoisted_1$m, [
|
|
4769
|
+
!showCode.value ? (openBlock(), createElementBlock("div", _hoisted_2$g, [
|
|
4770
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(records.value, (item, index) => {
|
|
4771
|
+
return openBlock(), createElementBlock("div", {
|
|
4772
|
+
class: "m-fields-key-value-item",
|
|
4773
|
+
key: index
|
|
4774
|
+
}, [
|
|
4775
|
+
createVNode(unref(TMagicInput), {
|
|
4776
|
+
placeholder: "key",
|
|
4777
|
+
modelValue: records.value[index][0],
|
|
4778
|
+
"onUpdate:modelValue": ($event) => records.value[index][0] = $event,
|
|
4779
|
+
disabled: _ctx.disabled,
|
|
4780
|
+
size: _ctx.size,
|
|
4781
|
+
onChange: keyChangeHandler
|
|
4782
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "size"]),
|
|
4783
|
+
_hoisted_3$a,
|
|
4784
|
+
createVNode(unref(TMagicInput), {
|
|
4785
|
+
placeholder: "value",
|
|
4786
|
+
modelValue: records.value[index][1],
|
|
4787
|
+
"onUpdate:modelValue": ($event) => records.value[index][1] = $event,
|
|
4788
|
+
disabled: _ctx.disabled,
|
|
4789
|
+
size: _ctx.size,
|
|
4790
|
+
onChange: valueChangeHandler
|
|
4791
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "size"]),
|
|
4792
|
+
createVNode(unref(TMagicButton), {
|
|
4793
|
+
class: "m-fileds-key-value-delete",
|
|
4794
|
+
type: "danger",
|
|
4795
|
+
size: _ctx.size,
|
|
4796
|
+
disabled: _ctx.disabled,
|
|
4797
|
+
circle: "",
|
|
4798
|
+
plain: "",
|
|
4799
|
+
icon: unref(Delete),
|
|
4800
|
+
onClick: ($event) => deleteHandler(index)
|
|
4801
|
+
}, null, 8, ["size", "disabled", "icon", "onClick"])
|
|
4802
|
+
]);
|
|
4803
|
+
}), 128)),
|
|
4804
|
+
createVNode(unref(TMagicButton), {
|
|
4805
|
+
type: "primary",
|
|
4806
|
+
size: _ctx.size,
|
|
4807
|
+
disabled: _ctx.disabled,
|
|
4808
|
+
plain: "",
|
|
4809
|
+
icon: unref(Plus),
|
|
4810
|
+
onClick: addHandler
|
|
4811
|
+
}, {
|
|
4812
|
+
default: withCtx(() => [
|
|
4813
|
+
createTextVNode("添加")
|
|
4814
|
+
]),
|
|
4815
|
+
_: 1
|
|
4816
|
+
}, 8, ["size", "disabled", "icon"])
|
|
4817
|
+
])) : createCommentVNode("", true),
|
|
4818
|
+
_ctx.config.advanced && showCode.value ? (openBlock(), createBlock(_sfc_main$T, {
|
|
4819
|
+
key: 1,
|
|
4820
|
+
height: "200px",
|
|
4821
|
+
"init-values": _ctx.model[_ctx.name],
|
|
4822
|
+
language: "json",
|
|
4823
|
+
options: {
|
|
4824
|
+
readOnly: _ctx.disabled
|
|
4825
|
+
},
|
|
4826
|
+
parse: true,
|
|
4827
|
+
onSave: save
|
|
4828
|
+
}, null, 8, ["init-values", "options"])) : createCommentVNode("", true),
|
|
4829
|
+
_ctx.config.advanced ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
4830
|
+
key: 2,
|
|
4831
|
+
size: "default",
|
|
4765
4832
|
disabled: _ctx.disabled,
|
|
4766
|
-
|
|
4767
|
-
icon:
|
|
4768
|
-
onClick:
|
|
4769
|
-
},
|
|
4770
|
-
default: withCtx(() => [
|
|
4771
|
-
createTextVNode("添加")
|
|
4772
|
-
]),
|
|
4773
|
-
_: 1
|
|
4774
|
-
}, 8, ["size", "disabled", "icon"])
|
|
4833
|
+
text: "",
|
|
4834
|
+
icon: _sfc_main$D,
|
|
4835
|
+
onClick: _cache[0] || (_cache[0] = ($event) => showCode.value = !showCode.value)
|
|
4836
|
+
}, null, 8, ["disabled"])) : createCommentVNode("", true)
|
|
4775
4837
|
]);
|
|
4776
4838
|
};
|
|
4777
4839
|
}
|
|
4778
4840
|
});
|
|
4779
4841
|
|
|
4780
|
-
const _hoisted_1$
|
|
4842
|
+
const _hoisted_1$l = {
|
|
4781
4843
|
key: 1,
|
|
4782
4844
|
class: "m-fields-ui-select",
|
|
4783
4845
|
style: { "display": "flex" }
|
|
4784
4846
|
};
|
|
4785
|
-
const _sfc_main$
|
|
4847
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
4786
4848
|
...{
|
|
4787
4849
|
name: "MEditorUISelect"
|
|
4788
4850
|
},
|
|
@@ -4872,7 +4934,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
4872
4934
|
]),
|
|
4873
4935
|
_: 1
|
|
4874
4936
|
}, 8, ["icon", "disabled", "size"])
|
|
4875
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_1$
|
|
4937
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_1$l, [
|
|
4876
4938
|
val.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4877
4939
|
createVNode(unref(TMagicTooltip), {
|
|
4878
4940
|
content: "清除",
|
|
@@ -4969,7 +5031,7 @@ const useGetSo = (target, emit) => {
|
|
|
4969
5031
|
};
|
|
4970
5032
|
};
|
|
4971
5033
|
|
|
4972
|
-
const _sfc_main$
|
|
5034
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
4973
5035
|
...{
|
|
4974
5036
|
name: "MEditorResizer"
|
|
4975
5037
|
},
|
|
@@ -4991,7 +5053,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
4991
5053
|
}
|
|
4992
5054
|
});
|
|
4993
5055
|
|
|
4994
|
-
const _sfc_main$
|
|
5056
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
4995
5057
|
...{
|
|
4996
5058
|
name: "MEditorLayout"
|
|
4997
5059
|
},
|
|
@@ -5118,7 +5180,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
5118
5180
|
}, [
|
|
5119
5181
|
renderSlot(_ctx.$slots, "left")
|
|
5120
5182
|
], 6),
|
|
5121
|
-
createVNode(_sfc_main$
|
|
5183
|
+
createVNode(_sfc_main$A, { onChange: changeLeft })
|
|
5122
5184
|
], 64)) : createCommentVNode("", true),
|
|
5123
5185
|
createElementVNode("div", {
|
|
5124
5186
|
class: normalizeClass(["m-editor-layout-center", _ctx.centerClass]),
|
|
@@ -5127,7 +5189,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
5127
5189
|
renderSlot(_ctx.$slots, "center")
|
|
5128
5190
|
], 6),
|
|
5129
5191
|
hasRight.value && _ctx.$slots.right ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
5130
|
-
createVNode(_sfc_main$
|
|
5192
|
+
createVNode(_sfc_main$A, { onChange: changeRight }),
|
|
5131
5193
|
createElementVNode("div", {
|
|
5132
5194
|
class: normalizeClass(["m-editor-layout-right", _ctx.rightClass]),
|
|
5133
5195
|
style: normalizeStyle(`width: ${_ctx.right}px`)
|
|
@@ -5140,10 +5202,10 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
5140
5202
|
}
|
|
5141
5203
|
});
|
|
5142
5204
|
|
|
5143
|
-
const _hoisted_1$
|
|
5144
|
-
const _hoisted_2$
|
|
5205
|
+
const _hoisted_1$k = { class: "m-editor-empty-panel" };
|
|
5206
|
+
const _hoisted_2$f = { class: "m-editor-empty-content" };
|
|
5145
5207
|
const _hoisted_3$9 = /* @__PURE__ */ createElementVNode("p", null, "新增页面", -1);
|
|
5146
|
-
const _sfc_main$
|
|
5208
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
5147
5209
|
...{
|
|
5148
5210
|
name: "MEditorAddPageBox"
|
|
5149
5211
|
},
|
|
@@ -5163,8 +5225,8 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
5163
5225
|
});
|
|
5164
5226
|
};
|
|
5165
5227
|
return (_ctx, _cache) => {
|
|
5166
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
5167
|
-
createElementVNode("div", _hoisted_2$
|
|
5228
|
+
return openBlock(), createElementBlock("div", _hoisted_1$k, [
|
|
5229
|
+
createElementVNode("div", _hoisted_2$f, [
|
|
5168
5230
|
createElementVNode("div", {
|
|
5169
5231
|
class: "m-editor-empty-button",
|
|
5170
5232
|
onClick: clickHandler
|
|
@@ -5184,7 +5246,7 @@ const DEFAULT_LEFT_COLUMN_WIDTH = 310;
|
|
|
5184
5246
|
const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
|
|
5185
5247
|
const LEFT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorLeftColumnWidthData";
|
|
5186
5248
|
const RIGHT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorRightColumnWidthData";
|
|
5187
|
-
const _sfc_main$
|
|
5249
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
5188
5250
|
...{
|
|
5189
5251
|
name: "MEditorFramework"
|
|
5190
5252
|
},
|
|
@@ -5265,7 +5327,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5265
5327
|
options: unref(codeOptions),
|
|
5266
5328
|
onSave: saveCode
|
|
5267
5329
|
}, null, 8, ["init-values", "options"])
|
|
5268
|
-
]) : (openBlock(), createBlock(_sfc_main$
|
|
5330
|
+
]) : (openBlock(), createBlock(_sfc_main$z, {
|
|
5269
5331
|
key: 1,
|
|
5270
5332
|
ref_key: "splitView",
|
|
5271
5333
|
ref: splitView,
|
|
@@ -5287,7 +5349,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5287
5349
|
]),
|
|
5288
5350
|
center: withCtx(() => [
|
|
5289
5351
|
pageLength.value > 0 ? renderSlot(_ctx.$slots, "workspace", { key: 0 }) : renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
|
|
5290
|
-
createVNode(_sfc_main$
|
|
5352
|
+
createVNode(_sfc_main$y)
|
|
5291
5353
|
])
|
|
5292
5354
|
]),
|
|
5293
5355
|
_: 2
|
|
@@ -5312,12 +5374,12 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
5312
5374
|
}
|
|
5313
5375
|
});
|
|
5314
5376
|
|
|
5315
|
-
const _hoisted_1$
|
|
5377
|
+
const _hoisted_1$j = {
|
|
5316
5378
|
key: 1,
|
|
5317
5379
|
class: "menu-item-text"
|
|
5318
5380
|
};
|
|
5319
|
-
const _hoisted_2$
|
|
5320
|
-
const _sfc_main$
|
|
5381
|
+
const _hoisted_2$e = { class: "el-dropdown-link menubar-menu-button" };
|
|
5382
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
5321
5383
|
...{
|
|
5322
5384
|
name: "MEditorToolButton"
|
|
5323
5385
|
},
|
|
@@ -5396,7 +5458,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
5396
5458
|
_ctx.data.type === "divider" ? (openBlock(), createBlock(unref(TMagicDivider), {
|
|
5397
5459
|
key: 0,
|
|
5398
5460
|
direction: _ctx.data.direction || "vertical"
|
|
5399
|
-
}, null, 8, ["direction"])) : _ctx.data.type === "text" ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
5461
|
+
}, null, 8, ["direction"])) : _ctx.data.type === "text" ? (openBlock(), createElementBlock("div", _hoisted_1$j, toDisplayString(_ctx.data.text), 1)) : _ctx.data.type === "button" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
5400
5462
|
_ctx.data.tooltip ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
5401
5463
|
key: 0,
|
|
5402
5464
|
effect: "dark",
|
|
@@ -5461,7 +5523,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
5461
5523
|
})) : createCommentVNode("", true)
|
|
5462
5524
|
]),
|
|
5463
5525
|
default: withCtx(() => [
|
|
5464
|
-
createElementVNode("span", _hoisted_2$
|
|
5526
|
+
createElementVNode("span", _hoisted_2$e, [
|
|
5465
5527
|
createTextVNode(toDisplayString(_ctx.data.text), 1),
|
|
5466
5528
|
createVNode(unref(TMagicIcon), { class: "el-icon--right" }, {
|
|
5467
5529
|
default: withCtx(() => [
|
|
@@ -5478,7 +5540,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
5478
5540
|
}
|
|
5479
5541
|
});
|
|
5480
5542
|
|
|
5481
|
-
const _sfc_main$
|
|
5543
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
5482
5544
|
...{
|
|
5483
5545
|
name: "MEditorNavMenu"
|
|
5484
5546
|
},
|
|
@@ -5640,7 +5702,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
5640
5702
|
style: normalizeStyle(`width: ${columnWidth.value?.[key]}px`)
|
|
5641
5703
|
}, [
|
|
5642
5704
|
(openBlock(true), createElementBlock(Fragment, null, renderList(buttons.value[key], (item, index) => {
|
|
5643
|
-
return openBlock(), createBlock(_sfc_main$
|
|
5705
|
+
return openBlock(), createBlock(_sfc_main$w, {
|
|
5644
5706
|
data: item,
|
|
5645
5707
|
key: index
|
|
5646
5708
|
}, null, 8, ["data"]);
|
|
@@ -5652,8 +5714,8 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
5652
5714
|
}
|
|
5653
5715
|
});
|
|
5654
5716
|
|
|
5655
|
-
const _hoisted_1$
|
|
5656
|
-
const _sfc_main$
|
|
5717
|
+
const _hoisted_1$i = { class: "m-editor-props-panel" };
|
|
5718
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
5657
5719
|
...{
|
|
5658
5720
|
name: "MEditorPropsPanel"
|
|
5659
5721
|
},
|
|
@@ -5707,7 +5769,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
5707
5769
|
};
|
|
5708
5770
|
__expose({ configForm, submit });
|
|
5709
5771
|
return (_ctx, _cache) => {
|
|
5710
|
-
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1$
|
|
5772
|
+
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1$i, [
|
|
5711
5773
|
renderSlot(_ctx.$slots, "props-panel-header"),
|
|
5712
5774
|
createVNode(unref(MForm), {
|
|
5713
5775
|
ref_key: "configForm",
|
|
@@ -5858,7 +5920,7 @@ const useFloatBox = (slideKeys) => {
|
|
|
5858
5920
|
};
|
|
5859
5921
|
};
|
|
5860
5922
|
|
|
5861
|
-
const _sfc_main$
|
|
5923
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
5862
5924
|
...{
|
|
5863
5925
|
name: "MEditorSearchInput"
|
|
5864
5926
|
},
|
|
@@ -5898,8 +5960,8 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
5898
5960
|
}
|
|
5899
5961
|
});
|
|
5900
5962
|
|
|
5901
|
-
const _hoisted_1$
|
|
5902
|
-
const _hoisted_2$
|
|
5963
|
+
const _hoisted_1$h = { xmlns: "http://www.w3.org/2000/svg" };
|
|
5964
|
+
const _hoisted_2$d = /* @__PURE__ */ createElementVNode("g", {
|
|
5903
5965
|
fill: "#7C878E",
|
|
5904
5966
|
"fill-rule": "evenodd"
|
|
5905
5967
|
}, [
|
|
@@ -5910,38 +5972,16 @@ const _hoisted_2$e = /* @__PURE__ */ createElementVNode("g", {
|
|
|
5910
5972
|
/* @__PURE__ */ createElementVNode("path", { d: "M8 13.5L2.3 9.2 0.7 10.5 8 16 15.3 10.5 13.7 9.2z" })
|
|
5911
5973
|
], -1);
|
|
5912
5974
|
const _hoisted_3$8 = [
|
|
5913
|
-
_hoisted_2$e
|
|
5914
|
-
];
|
|
5915
|
-
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
5916
|
-
...{
|
|
5917
|
-
name: "MEditorAppManageIcon"
|
|
5918
|
-
},
|
|
5919
|
-
__name: "AppManageIcon",
|
|
5920
|
-
setup(__props) {
|
|
5921
|
-
return (_ctx, _cache) => {
|
|
5922
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$i, _hoisted_3$8);
|
|
5923
|
-
};
|
|
5924
|
-
}
|
|
5925
|
-
});
|
|
5926
|
-
|
|
5927
|
-
const _hoisted_1$h = {
|
|
5928
|
-
viewBox: "0 0 32 32",
|
|
5929
|
-
version: "1.1",
|
|
5930
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
5931
|
-
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
5932
|
-
};
|
|
5933
|
-
const _hoisted_2$d = /* @__PURE__ */ createStaticVNode('<defs><rect id="path-1" x="0" y="0" width="32" height="32"></rect></defs><g id="组件规范" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="03图标" transform="translate(-561.000000, -2356.000000)"><g id="icon/line/Universal/code" transform="translate(561.000000, 2356.000000)"><g id="路径"><mask id="mask-2" fill="white"><use xlink:href="#path-1"></use></mask><use id="蒙版" fill="#D8D8D8" opacity="0" xlink:href="#path-1"></use><path d="M21.9284587,7.9482233 L29.8079004,15.827665 C29.9055315,15.9252961 29.9055315,16.0835874 29.8079004,16.1812184 L21.9284587,24.0606602 C21.8308276,24.1582912 21.6725364,24.1582912 21.5749053,24.0606602 L20.3374684,22.8232233 C20.2419143,22.7276698 20.2398813,22.5740096 20.331369,22.4759832 L20.3374687,22.4696702 L26.8027181,16.0044417 L20.3374687,9.53921328 C20.2398372,9.44158265 20.2398369,9.2832914 20.3374679,9.18566017 L21.5749053,7.9482233 C21.6725364,7.85059223 21.8308276,7.85059223 21.9284587,7.9482233 Z M10.3999684,7.9482233 L11.6374053,9.18566017 C11.7329594,9.28121371 11.7349925,9.43487387 11.6435048,9.53290029 L11.637405,9.53921328 L5.17215562,16.0044417 L11.637405,22.4696702 C11.7329593,22.5652236 11.7349926,22.7188837 11.643505,22.8169103 L11.6374053,22.8232233 L10.3999684,24.0606602 C10.3023374,24.1582912 10.1440461,24.1582912 10.046415,24.0606602 L2.1669733,16.1812184 C2.06934223,16.0835874 2.06934223,15.9252961 2.1669733,15.827665 L10.046415,7.9482233 C10.1440461,7.85059223 10.3023374,7.85059223 10.3999684,7.9482233 Z M17.2612532,9.29310422 L18.9262468,9.83189578 C19.0576112,9.87440526 19.1296423,10.0153579 19.0871328,10.1467222 L15.0848232,22.514807 C15.0423138,22.6461714 14.9013612,22.7182025 14.7699968,22.675693 L13.1050032,22.1369014 C12.9736388,22.0943919 12.9016077,21.9534393 12.9441172,21.822075 L16.9464268,9.45399022 C16.9889362,9.32262585 17.1298888,9.25059474 17.2612532,9.29310422 Z" id="形状" fill="#1D1F24" mask="url(#mask-2)"></path></g></g><g id="icon切图" transform="translate(226.000000, 1782.000000)"></g></g></g>', 2);
|
|
5934
|
-
const _hoisted_4$6 = [
|
|
5935
5975
|
_hoisted_2$d
|
|
5936
5976
|
];
|
|
5937
5977
|
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
5938
5978
|
...{
|
|
5939
|
-
name: "
|
|
5979
|
+
name: "MEditorAppManageIcon"
|
|
5940
5980
|
},
|
|
5941
|
-
__name: "
|
|
5981
|
+
__name: "AppManageIcon",
|
|
5942
5982
|
setup(__props) {
|
|
5943
5983
|
return (_ctx, _cache) => {
|
|
5944
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$h,
|
|
5984
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$h, _hoisted_3$8);
|
|
5945
5985
|
};
|
|
5946
5986
|
}
|
|
5947
5987
|
});
|
|
@@ -6055,11 +6095,11 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
6055
6095
|
class: "list-container"
|
|
6056
6096
|
}, [
|
|
6057
6097
|
createElementVNode("div", _hoisted_2$c, [
|
|
6058
|
-
data.type === "code" ? (openBlock(), createBlock(_sfc_main$
|
|
6098
|
+
data.type === "code" ? (openBlock(), createBlock(_sfc_main$D, {
|
|
6059
6099
|
key: 0,
|
|
6060
6100
|
class: "codeIcon"
|
|
6061
6101
|
})) : createCommentVNode("", true),
|
|
6062
|
-
data.type === "node" ? (openBlock(), createBlock(_sfc_main$
|
|
6102
|
+
data.type === "node" ? (openBlock(), createBlock(_sfc_main$s, {
|
|
6063
6103
|
key: 1,
|
|
6064
6104
|
class: "compIcon"
|
|
6065
6105
|
})) : createCommentVNode("", true),
|
|
@@ -6134,7 +6174,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
6134
6174
|
default: withCtx(() => [
|
|
6135
6175
|
renderSlot(_ctx.$slots, "code-block-panel-header", {}, () => [
|
|
6136
6176
|
createElementVNode("div", _hoisted_1$f, [
|
|
6137
|
-
createVNode(_sfc_main$
|
|
6177
|
+
createVNode(_sfc_main$t, { onSearch: filterTextChangeHandler }),
|
|
6138
6178
|
editable.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
6139
6179
|
key: 0,
|
|
6140
6180
|
class: "create-code-button",
|
|
@@ -6461,7 +6501,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
6461
6501
|
createVNode(unref(TMagicScrollbar), { class: "data-source-list-panel m-editor-dep-list-panel" }, {
|
|
6462
6502
|
default: withCtx(() => [
|
|
6463
6503
|
createElementVNode("div", _hoisted_1$d, [
|
|
6464
|
-
createVNode(_sfc_main$
|
|
6504
|
+
createVNode(_sfc_main$t, { onSearch: filterTextChangeHandler }),
|
|
6465
6505
|
editable.value ? (openBlock(), createBlock(unref(TMagicPopover), {
|
|
6466
6506
|
key: 0,
|
|
6467
6507
|
placement: "right"
|
|
@@ -6480,7 +6520,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
6480
6520
|
default: withCtx(() => [
|
|
6481
6521
|
createElementVNode("div", _hoisted_2$a, [
|
|
6482
6522
|
(openBlock(true), createElementBlock(Fragment, null, renderList(datasourceTypeList.value, (item, index) => {
|
|
6483
|
-
return openBlock(), createBlock(_sfc_main$
|
|
6523
|
+
return openBlock(), createBlock(_sfc_main$w, {
|
|
6484
6524
|
data: {
|
|
6485
6525
|
type: "button",
|
|
6486
6526
|
text: item.text,
|
|
@@ -6823,7 +6863,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
6823
6863
|
renderSlot(_ctx.$slots, "title"),
|
|
6824
6864
|
createElementVNode("div", null, [
|
|
6825
6865
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuData, (item, index) => {
|
|
6826
|
-
return openBlock(), createBlock(_sfc_main$
|
|
6866
|
+
return openBlock(), createBlock(_sfc_main$w, {
|
|
6827
6867
|
"event-type": "mouseup",
|
|
6828
6868
|
ref_for: true,
|
|
6829
6869
|
ref_key: "buttons",
|
|
@@ -7621,7 +7661,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
7621
7661
|
return openBlock(), createBlock(unref(TMagicScrollbar), { class: "m-editor-layer-panel" }, {
|
|
7622
7662
|
default: withCtx(() => [
|
|
7623
7663
|
renderSlot(_ctx.$slots, "layer-panel-header"),
|
|
7624
|
-
createVNode(_sfc_main$
|
|
7664
|
+
createVNode(_sfc_main$t, { onSearch: unref(filterTextChangeHandler) }, null, 8, ["onSearch"]),
|
|
7625
7665
|
page.value && unref(nodeStatusMap) ? (openBlock(), createBlock(_sfc_main$l, {
|
|
7626
7666
|
key: 0,
|
|
7627
7667
|
tabindex: "-1",
|
|
@@ -7744,7 +7784,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
7744
7784
|
"model-value": collapseValue.value
|
|
7745
7785
|
}, {
|
|
7746
7786
|
default: withCtx(() => [
|
|
7747
|
-
createVNode(_sfc_main$
|
|
7787
|
+
createVNode(_sfc_main$t, { onSearch: filterTextChangeHandler }),
|
|
7748
7788
|
(openBlock(true), createElementBlock(Fragment, null, renderList(list.value, (group, index) => {
|
|
7749
7789
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
7750
7790
|
group.items && group.items.length ? (openBlock(), createBlock(unref(TMagicCollapseItem), {
|
|
@@ -8303,8 +8343,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
8303
8343
|
const el = ref();
|
|
8304
8344
|
const style = computed(
|
|
8305
8345
|
() => `
|
|
8306
|
-
width: ${props.width}px;
|
|
8307
|
-
height: ${props.height}px;
|
|
8346
|
+
width: ${isNumber(`${props.width}`) ? `${props.width}px` : props.width};
|
|
8347
|
+
height: ${isNumber(`${props.height}`) ? `${props.height}px` : props.height};
|
|
8308
8348
|
position: absolute;
|
|
8309
8349
|
margin-top: 30px;
|
|
8310
8350
|
`
|
|
@@ -8442,8 +8482,10 @@ class Ui extends BaseService {
|
|
|
8442
8482
|
const { height, width } = stageContainerRect;
|
|
8443
8483
|
if (!width || !height)
|
|
8444
8484
|
return 1;
|
|
8445
|
-
|
|
8446
|
-
|
|
8485
|
+
let stageWidth = convertToNumber(stageRect.width, width);
|
|
8486
|
+
let stageHeight = convertToNumber(stageRect.height, height);
|
|
8487
|
+
stageWidth = stageWidth + 30;
|
|
8488
|
+
stageHeight = stageHeight + 30;
|
|
8447
8489
|
if (width > stageWidth && height > stageHeight) {
|
|
8448
8490
|
return 1;
|
|
8449
8491
|
}
|
|
@@ -9163,7 +9205,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
9163
9205
|
let top = 0;
|
|
9164
9206
|
let left = 0;
|
|
9165
9207
|
let position = "relative";
|
|
9166
|
-
if (
|
|
9208
|
+
if (style.position === "fixed") {
|
|
9209
|
+
position = "fixed";
|
|
9210
|
+
top = e.clientY - containerRect.top;
|
|
9211
|
+
left = e.clientX - containerRect.left;
|
|
9212
|
+
} else if (layout === Layout.ABSOLUTE) {
|
|
9167
9213
|
position = "absolute";
|
|
9168
9214
|
top = e.clientY - containerRect.top + scrollTop;
|
|
9169
9215
|
left = e.clientX - containerRect.left + scrollLeft;
|
|
@@ -9461,7 +9507,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
9461
9507
|
default: withCtx(() => [
|
|
9462
9508
|
createElementVNode("div", null, [
|
|
9463
9509
|
renderSlot(_ctx.$slots, "page-bar-popover", { page: item }, () => [
|
|
9464
|
-
createVNode(_sfc_main$
|
|
9510
|
+
createVNode(_sfc_main$w, {
|
|
9465
9511
|
data: {
|
|
9466
9512
|
type: "button",
|
|
9467
9513
|
text: "复制",
|
|
@@ -9469,7 +9515,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
9469
9515
|
handler: () => copy(item)
|
|
9470
9516
|
}
|
|
9471
9517
|
}, null, 8, ["data"]),
|
|
9472
|
-
createVNode(_sfc_main$
|
|
9518
|
+
createVNode(_sfc_main$w, {
|
|
9473
9519
|
data: {
|
|
9474
9520
|
type: "button",
|
|
9475
9521
|
text: "删除",
|
|
@@ -10384,13 +10430,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
10384
10430
|
);
|
|
10385
10431
|
__expose(services);
|
|
10386
10432
|
return (_ctx, _cache) => {
|
|
10387
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10433
|
+
return openBlock(), createBlock(_sfc_main$x, null, {
|
|
10388
10434
|
header: withCtx(() => [
|
|
10389
10435
|
renderSlot(_ctx.$slots, "header")
|
|
10390
10436
|
]),
|
|
10391
10437
|
nav: withCtx(() => [
|
|
10392
10438
|
renderSlot(_ctx.$slots, "nav", { editorService: unref(editorService) }, () => [
|
|
10393
|
-
createVNode(_sfc_main$
|
|
10439
|
+
createVNode(_sfc_main$v, { data: _ctx.menu }, null, 8, ["data"])
|
|
10394
10440
|
])
|
|
10395
10441
|
]),
|
|
10396
10442
|
"content-before": withCtx(() => [
|
|
@@ -10457,7 +10503,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
10457
10503
|
]),
|
|
10458
10504
|
"props-panel": withCtx(() => [
|
|
10459
10505
|
renderSlot(_ctx.$slots, "props-panel", {}, () => [
|
|
10460
|
-
createVNode(_sfc_main$
|
|
10506
|
+
createVNode(_sfc_main$u, {
|
|
10461
10507
|
"extend-state": _ctx.extendFormState,
|
|
10462
10508
|
onMounted: _cache[0] || (_cache[0] = (instance) => _ctx.$emit("props-panel-mounted", instance))
|
|
10463
10509
|
}, {
|
|
@@ -10495,7 +10541,7 @@ const index = {
|
|
|
10495
10541
|
app.config.globalProperties.$TMAGIC_EDITOR = option;
|
|
10496
10542
|
setConfig(option);
|
|
10497
10543
|
app.component(_sfc_main.name, _sfc_main);
|
|
10498
|
-
app.component("m-fields-ui-select", _sfc_main$
|
|
10544
|
+
app.component("m-fields-ui-select", _sfc_main$B);
|
|
10499
10545
|
app.component("m-fields-code-link", _sfc_main$R);
|
|
10500
10546
|
app.component("m-fields-vs-code", _sfc_main$S);
|
|
10501
10547
|
app.component("magic-code-editor", _sfc_main$T);
|
|
@@ -10504,7 +10550,7 @@ const index = {
|
|
|
10504
10550
|
app.component("m-fields-event-select", _sfc_main$E);
|
|
10505
10551
|
app.component("m-fields-data-source-fields", _sfc_main$L);
|
|
10506
10552
|
app.component("m-fields-data-source-mocks", _sfc_main$G);
|
|
10507
|
-
app.component("m-fields-key-value", _sfc_main$
|
|
10553
|
+
app.component("m-fields-key-value", _sfc_main$C);
|
|
10508
10554
|
app.component("m-fields-data-source-input", _sfc_main$J);
|
|
10509
10555
|
app.component("m-fields-data-source-select", _sfc_main$F);
|
|
10510
10556
|
app.component("m-fields-data-source-methods", _sfc_main$I);
|
|
@@ -10513,5 +10559,5 @@ const index = {
|
|
|
10513
10559
|
}
|
|
10514
10560
|
};
|
|
10515
10561
|
|
|
10516
|
-
export { CODE_DRAFT_STORAGE_KEY, COPY_STORAGE_KEY, _sfc_main$P as CodeBlockEditor, _sfc_main$r as CodeBlockList, _sfc_main$q as CodeBlockListPanel, CodeDeleteErrorType, _sfc_main$Q as CodeSelect, _sfc_main$M as CodeSelectCol, ColumnLayout, _sfc_main$f as ComponentListPanel, _sfc_main$k as ContentMenu, _sfc_main$K as DataSourceFieldSelect, _sfc_main$L as DataSourceFields, _sfc_main$J as DataSourceInput, _sfc_main$H as DataSourceMethodSelect, _sfc_main$I as DataSourceMethods, _sfc_main$G as DataSourceMocks, _sfc_main$F as DataSourceSelect, DragType, _sfc_main$E as EventSelect, Fixed2Other, H_GUIDE_LINE_STORAGE_KEY, _sfc_main$N as Icon, KeyBindingCommand, _sfc_main$
|
|
10562
|
+
export { CODE_DRAFT_STORAGE_KEY, COPY_STORAGE_KEY, _sfc_main$P as CodeBlockEditor, _sfc_main$r as CodeBlockList, _sfc_main$q as CodeBlockListPanel, CodeDeleteErrorType, _sfc_main$Q as CodeSelect, _sfc_main$M as CodeSelectCol, ColumnLayout, _sfc_main$f as ComponentListPanel, _sfc_main$k as ContentMenu, _sfc_main$K as DataSourceFieldSelect, _sfc_main$L as DataSourceFields, _sfc_main$J as DataSourceInput, _sfc_main$H as DataSourceMethodSelect, _sfc_main$I as DataSourceMethods, _sfc_main$G as DataSourceMocks, _sfc_main$F as DataSourceSelect, DragType, _sfc_main$E as EventSelect, Fixed2Other, H_GUIDE_LINE_STORAGE_KEY, _sfc_main$N as Icon, KeyBindingCommand, _sfc_main$C as KeyValue, Keys, LayerOffset, _sfc_main$g as LayerPanel, Layout, _sfc_main$z as LayoutContainer, _sfc_main$u as PropsPanel, _sfc_main$A as Resizer, _sfc_main$z as SplitView, _sfc_main$T as TMagicCodeEditor, _sfc_main as TMagicEditor, _sfc_main$w as ToolButton, UI_SELECT_MODE_EVENT_NAME, V_GUIDE_LINE_STORAGE_KEY, advancedTabConfig, beforePaste, change2Fixed, codeBlockService, dataSourceService, debug, index as default, depService, displayTabConfig, editorService, error, eventTabConfig, eventsService, fillConfig, fixNodeLeft, fixNodePosition, generatePageName, generatePageNameByApp, getAddParent, getConfig, getDefaultConfig, getDisplayField, getFormConfig, getFormValue, getGuideLineFromCache, getInitPositionStyle, getNodeIndex, getPageList, getPageNameList, getPositionInContainer, getRelativeStyle, historyService, info, isFixed, log, propsService, serializeConfig, setChilrenLayout, setConfig, setLayout, storageService, styleTabConfig, traverseNode, uiService, useCodeBlockEdit, useDataSourceMethod, useFloatBox, useStage, warn };
|
|
10517
10563
|
//# sourceMappingURL=tmagic-editor.js.map
|