@tmagic/editor 1.3.0-alpha.22 → 1.3.0-alpha.24
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 +21 -103
- package/dist/tmagic-editor.js +177 -145
- package/dist/tmagic-editor.js.map +1 -1
- package/dist/tmagic-editor.umd.cjs +177 -145
- package/dist/tmagic-editor.umd.cjs.map +1 -1
- package/package.json +10 -10
- package/src/fields/CodeSelectCol.vue +10 -1
- package/src/layouts/sidebar/Sidebar.vue +20 -26
- package/src/services/editor.ts +43 -15
- package/src/theme/sidebar.scss +18 -60
|
@@ -2310,12 +2310,14 @@
|
|
|
2310
2310
|
const doc = stage?.renderer.contentWindow?.document;
|
|
2311
2311
|
if (doc) {
|
|
2312
2312
|
const el = doc.getElementById(`${node.id}`);
|
|
2313
|
-
const parentEl = el?.offsetParent;
|
|
2313
|
+
const parentEl = layout === Layout.FIXED ? doc.body : el?.offsetParent;
|
|
2314
2314
|
if (parentEl && el) {
|
|
2315
2315
|
node.style.left = (parentEl.clientWidth - el.clientWidth) / 2;
|
|
2316
|
+
node.style.right = "";
|
|
2316
2317
|
}
|
|
2317
2318
|
} else if (parent.style && utils.isNumber(parent.style?.width) && utils.isNumber(node.style?.width)) {
|
|
2318
2319
|
node.style.left = (parent.style.width - node.style.width) / 2;
|
|
2320
|
+
node.style.right = "";
|
|
2319
2321
|
}
|
|
2320
2322
|
return node;
|
|
2321
2323
|
}
|
|
@@ -2427,21 +2429,43 @@
|
|
|
2427
2429
|
if (!node || utils.isPage(node))
|
|
2428
2430
|
return;
|
|
2429
2431
|
const { style, id, type } = node;
|
|
2430
|
-
if (!style || style.position
|
|
2432
|
+
if (!style || !["absolute", "fixed"].includes(style.position))
|
|
2431
2433
|
return;
|
|
2432
|
-
|
|
2433
|
-
return;
|
|
2434
|
-
if (left && !utils.isNumber(style.left))
|
|
2435
|
-
return;
|
|
2436
|
-
this.update({
|
|
2434
|
+
const update = (style2) => this.update({
|
|
2437
2435
|
id,
|
|
2438
2436
|
type,
|
|
2439
|
-
style:
|
|
2440
|
-
...style,
|
|
2441
|
-
left: Number(style.left) + left,
|
|
2442
|
-
top: Number(style.top) + top
|
|
2443
|
-
}
|
|
2437
|
+
style: style2
|
|
2444
2438
|
});
|
|
2439
|
+
if (top) {
|
|
2440
|
+
if (utils.isNumber(style.top)) {
|
|
2441
|
+
update({
|
|
2442
|
+
...style,
|
|
2443
|
+
top: Number(style.top) + Number(top),
|
|
2444
|
+
bottom: ""
|
|
2445
|
+
});
|
|
2446
|
+
} else if (utils.isNumber(style.bottom)) {
|
|
2447
|
+
update({
|
|
2448
|
+
...style,
|
|
2449
|
+
bottom: Number(style.bottom) - Number(top),
|
|
2450
|
+
top: ""
|
|
2451
|
+
});
|
|
2452
|
+
}
|
|
2453
|
+
}
|
|
2454
|
+
if (left) {
|
|
2455
|
+
if (utils.isNumber(style.left)) {
|
|
2456
|
+
update({
|
|
2457
|
+
...style,
|
|
2458
|
+
left: Number(style.left) + Number(left),
|
|
2459
|
+
right: ""
|
|
2460
|
+
});
|
|
2461
|
+
} else if (utils.isNumber(style.right)) {
|
|
2462
|
+
update({
|
|
2463
|
+
...style,
|
|
2464
|
+
right: Number(style.right) - Number(left),
|
|
2465
|
+
left: ""
|
|
2466
|
+
});
|
|
2467
|
+
}
|
|
2468
|
+
}
|
|
2445
2469
|
}
|
|
2446
2470
|
resetState() {
|
|
2447
2471
|
this.set("root", null);
|
|
@@ -2752,7 +2776,7 @@
|
|
|
2752
2776
|
};
|
|
2753
2777
|
|
|
2754
2778
|
const _hoisted_1$p = { class: "m-fields-code-select-col" };
|
|
2755
|
-
const _hoisted_2$
|
|
2779
|
+
const _hoisted_2$i = { class: "code-select-container" };
|
|
2756
2780
|
const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
2757
2781
|
...{
|
|
2758
2782
|
name: "MEditorCodeSelectCol"
|
|
@@ -2787,6 +2811,14 @@
|
|
|
2787
2811
|
};
|
|
2788
2812
|
const codeDsl = vue.computed(() => services?.codeBlockService.getCodeDsl());
|
|
2789
2813
|
const paramsConfig = vue.ref(getParamItemsConfig(props.model[props.name]));
|
|
2814
|
+
vue.watch(
|
|
2815
|
+
() => props.model[props.name],
|
|
2816
|
+
(v, preV) => {
|
|
2817
|
+
if (v !== preV) {
|
|
2818
|
+
paramsConfig.value = getParamItemsConfig(v);
|
|
2819
|
+
}
|
|
2820
|
+
}
|
|
2821
|
+
);
|
|
2790
2822
|
const selectConfig = {
|
|
2791
2823
|
type: "select",
|
|
2792
2824
|
text: "代码块",
|
|
@@ -2820,7 +2852,7 @@
|
|
|
2820
2852
|
return (_ctx, _cache) => {
|
|
2821
2853
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
2822
2854
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$p, [
|
|
2823
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
2855
|
+
vue.createElementVNode("div", _hoisted_2$i, [
|
|
2824
2856
|
vue.createVNode(_component_m_form_container, {
|
|
2825
2857
|
class: "select",
|
|
2826
2858
|
config: selectConfig,
|
|
@@ -2856,7 +2888,7 @@
|
|
|
2856
2888
|
});
|
|
2857
2889
|
|
|
2858
2890
|
const _hoisted_1$o = { class: "m-editor-data-source-fields" };
|
|
2859
|
-
const _hoisted_2$
|
|
2891
|
+
const _hoisted_2$h = { class: "m-editor-data-source-fields-footer" };
|
|
2860
2892
|
const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
2861
2893
|
...{
|
|
2862
2894
|
name: "MEditorDataSourceFields"
|
|
@@ -3013,7 +3045,7 @@
|
|
|
3013
3045
|
data: _ctx.model[_ctx.name],
|
|
3014
3046
|
columns: fieldColumns
|
|
3015
3047
|
}, null, 8, ["data"]),
|
|
3016
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3048
|
+
vue.createElementVNode("div", _hoisted_2$h, [
|
|
3017
3049
|
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
3018
3050
|
size: "small",
|
|
3019
3051
|
type: "primary",
|
|
@@ -3092,8 +3124,8 @@
|
|
|
3092
3124
|
});
|
|
3093
3125
|
|
|
3094
3126
|
const _hoisted_1$n = { style: { "display": "flex", "flex-direction": "column", "line-height": "1.2em" } };
|
|
3095
|
-
const _hoisted_2$
|
|
3096
|
-
const _hoisted_3$
|
|
3127
|
+
const _hoisted_2$g = { style: { "font-size": "10px", "color": "rgba(0, 0, 0, 0.6)" } };
|
|
3128
|
+
const _hoisted_3$6 = { class: "el-input__inner" };
|
|
3097
3129
|
const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
|
|
3098
3130
|
...{
|
|
3099
3131
|
name: "MEditorDataSourceInput"
|
|
@@ -3288,7 +3320,7 @@
|
|
|
3288
3320
|
default: vue.withCtx(({ item }) => [
|
|
3289
3321
|
vue.createElementVNode("div", _hoisted_1$n, [
|
|
3290
3322
|
vue.createElementVNode("div", null, vue.toDisplayString(item.text), 1),
|
|
3291
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
3323
|
+
vue.createElementVNode("span", _hoisted_2$g, vue.toDisplayString(item.value), 1)
|
|
3292
3324
|
])
|
|
3293
3325
|
]),
|
|
3294
3326
|
_: 1
|
|
@@ -3300,7 +3332,7 @@
|
|
|
3300
3332
|
vue.createElementVNode("div", {
|
|
3301
3333
|
class: vue.normalizeClass(`tmagic-data-source-input-text-wrapper el-input__wrapper ${isFocused.value ? " is-focus" : ""}`)
|
|
3302
3334
|
}, [
|
|
3303
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
3335
|
+
vue.createElementVNode("div", _hoisted_3$6, [
|
|
3304
3336
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(displayState.value, (item, index) => {
|
|
3305
3337
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
3306
3338
|
item.type === "text" ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
@@ -3402,7 +3434,7 @@
|
|
|
3402
3434
|
};
|
|
3403
3435
|
|
|
3404
3436
|
const _hoisted_1$m = { class: "m-editor-data-source-methods" };
|
|
3405
|
-
const _hoisted_2$
|
|
3437
|
+
const _hoisted_2$f = { class: "m-editor-data-source-methods-footer" };
|
|
3406
3438
|
const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
|
|
3407
3439
|
...{
|
|
3408
3440
|
name: "MEditorDataSourceMethods"
|
|
@@ -3477,7 +3509,7 @@
|
|
|
3477
3509
|
data: _ctx.model[_ctx.name],
|
|
3478
3510
|
columns: methodColumns
|
|
3479
3511
|
}, null, 8, ["data"]),
|
|
3480
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3512
|
+
vue.createElementVNode("div", _hoisted_2$f, [
|
|
3481
3513
|
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
3482
3514
|
size: "small",
|
|
3483
3515
|
type: "primary",
|
|
@@ -3506,7 +3538,7 @@
|
|
|
3506
3538
|
});
|
|
3507
3539
|
|
|
3508
3540
|
const _hoisted_1$l = { class: "m-fields-data-source-method-select" };
|
|
3509
|
-
const _hoisted_2$
|
|
3541
|
+
const _hoisted_2$e = { class: "data-source-method-select-container" };
|
|
3510
3542
|
const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
|
|
3511
3543
|
...{
|
|
3512
3544
|
name: "MEditorDataSourceMethodSelect"
|
|
@@ -3586,7 +3618,7 @@
|
|
|
3586
3618
|
return (_ctx, _cache) => {
|
|
3587
3619
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
3588
3620
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$l, [
|
|
3589
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3621
|
+
vue.createElementVNode("div", _hoisted_2$e, [
|
|
3590
3622
|
vue.createVNode(_component_m_form_container, {
|
|
3591
3623
|
class: "select",
|
|
3592
3624
|
config: cascaderConfig,
|
|
@@ -3678,7 +3710,7 @@
|
|
|
3678
3710
|
});
|
|
3679
3711
|
|
|
3680
3712
|
const _hoisted_1$k = { class: "m-fields-event-select" };
|
|
3681
|
-
const _hoisted_2$
|
|
3713
|
+
const _hoisted_2$d = {
|
|
3682
3714
|
key: 1,
|
|
3683
3715
|
class: "fullWidth"
|
|
3684
3716
|
};
|
|
@@ -3882,7 +3914,7 @@
|
|
|
3882
3914
|
model: _ctx.model,
|
|
3883
3915
|
config: tableConfig.value,
|
|
3884
3916
|
onChange: onChangeHandler
|
|
3885
|
-
}, null, 8, ["size", "disabled", "model", "config"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
3917
|
+
}, null, 8, ["size", "disabled", "model", "config"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$d, [
|
|
3886
3918
|
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
3887
3919
|
class: "create-button",
|
|
3888
3920
|
type: "primary",
|
|
@@ -3932,7 +3964,7 @@
|
|
|
3932
3964
|
});
|
|
3933
3965
|
|
|
3934
3966
|
const _hoisted_1$j = { class: "m-fields-key-value" };
|
|
3935
|
-
const _hoisted_2$
|
|
3967
|
+
const _hoisted_2$c = /* @__PURE__ */ vue.createElementVNode("span", { class: "m-fileds-key-value-delimiter" }, ":", -1);
|
|
3936
3968
|
const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
|
|
3937
3969
|
...{
|
|
3938
3970
|
name: "MEditorKeyValue"
|
|
@@ -3992,7 +4024,7 @@
|
|
|
3992
4024
|
size: _ctx.size,
|
|
3993
4025
|
onChange: keyChangeHandler
|
|
3994
4026
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "size"]),
|
|
3995
|
-
_hoisted_2$
|
|
4027
|
+
_hoisted_2$c,
|
|
3996
4028
|
vue.createVNode(vue.unref(design.TMagicInput), {
|
|
3997
4029
|
placeholder: "value",
|
|
3998
4030
|
modelValue: records.value[index][1],
|
|
@@ -4371,8 +4403,8 @@
|
|
|
4371
4403
|
});
|
|
4372
4404
|
|
|
4373
4405
|
const _hoisted_1$h = { class: "m-editor-empty-panel" };
|
|
4374
|
-
const _hoisted_2$
|
|
4375
|
-
const _hoisted_3$
|
|
4406
|
+
const _hoisted_2$b = { class: "m-editor-empty-content" };
|
|
4407
|
+
const _hoisted_3$5 = /* @__PURE__ */ vue.createElementVNode("p", null, "新增页面", -1);
|
|
4376
4408
|
const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
4377
4409
|
...{
|
|
4378
4410
|
name: "MEditorAddPageBox"
|
|
@@ -4394,7 +4426,7 @@
|
|
|
4394
4426
|
};
|
|
4395
4427
|
return (_ctx, _cache) => {
|
|
4396
4428
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$h, [
|
|
4397
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
4429
|
+
vue.createElementVNode("div", _hoisted_2$b, [
|
|
4398
4430
|
vue.createElementVNode("div", {
|
|
4399
4431
|
class: "m-editor-empty-button",
|
|
4400
4432
|
onClick: clickHandler
|
|
@@ -4402,7 +4434,7 @@
|
|
|
4402
4434
|
vue.createElementVNode("div", null, [
|
|
4403
4435
|
vue.createVNode(_sfc_main$F, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
|
|
4404
4436
|
]),
|
|
4405
|
-
_hoisted_3$
|
|
4437
|
+
_hoisted_3$5
|
|
4406
4438
|
])
|
|
4407
4439
|
])
|
|
4408
4440
|
]);
|
|
@@ -4545,7 +4577,7 @@
|
|
|
4545
4577
|
key: 1,
|
|
4546
4578
|
class: "menu-item-text"
|
|
4547
4579
|
};
|
|
4548
|
-
const _hoisted_2$
|
|
4580
|
+
const _hoisted_2$a = { class: "el-dropdown-link menubar-menu-button" };
|
|
4549
4581
|
const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
4550
4582
|
...{
|
|
4551
4583
|
name: "MEditorToolButton"
|
|
@@ -4689,7 +4721,7 @@
|
|
|
4689
4721
|
})) : vue.createCommentVNode("", true)
|
|
4690
4722
|
]),
|
|
4691
4723
|
default: vue.withCtx(() => [
|
|
4692
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
4724
|
+
vue.createElementVNode("span", _hoisted_2$a, [
|
|
4693
4725
|
vue.createTextVNode(vue.toDisplayString(_ctx.data.text), 1),
|
|
4694
4726
|
vue.createVNode(vue.unref(design.TMagicIcon), { class: "el-icon--right" }, {
|
|
4695
4727
|
default: vue.withCtx(() => [
|
|
@@ -4990,7 +5022,7 @@
|
|
|
4990
5022
|
});
|
|
4991
5023
|
|
|
4992
5024
|
const _hoisted_1$e = { xmlns: "http://www.w3.org/2000/svg" };
|
|
4993
|
-
const _hoisted_2$
|
|
5025
|
+
const _hoisted_2$9 = /* @__PURE__ */ vue.createElementVNode("g", {
|
|
4994
5026
|
fill: "#7C878E",
|
|
4995
5027
|
"fill-rule": "evenodd"
|
|
4996
5028
|
}, [
|
|
@@ -5000,8 +5032,8 @@
|
|
|
5000
5032
|
}),
|
|
5001
5033
|
/* @__PURE__ */ vue.createElementVNode("path", { d: "M8 13.5L2.3 9.2 0.7 10.5 8 16 15.3 10.5 13.7 9.2z" })
|
|
5002
5034
|
], -1);
|
|
5003
|
-
const _hoisted_3$
|
|
5004
|
-
_hoisted_2$
|
|
5035
|
+
const _hoisted_3$4 = [
|
|
5036
|
+
_hoisted_2$9
|
|
5005
5037
|
];
|
|
5006
5038
|
const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
5007
5039
|
...{
|
|
@@ -5010,7 +5042,7 @@
|
|
|
5010
5042
|
__name: "AppManageIcon",
|
|
5011
5043
|
setup(__props) {
|
|
5012
5044
|
return (_ctx, _cache) => {
|
|
5013
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$e, _hoisted_3$
|
|
5045
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$e, _hoisted_3$4);
|
|
5014
5046
|
};
|
|
5015
5047
|
}
|
|
5016
5048
|
});
|
|
@@ -5021,9 +5053,9 @@
|
|
|
5021
5053
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5022
5054
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
5023
5055
|
};
|
|
5024
|
-
const _hoisted_2$
|
|
5025
|
-
const _hoisted_4$
|
|
5026
|
-
_hoisted_2$
|
|
5056
|
+
const _hoisted_2$8 = /* @__PURE__ */ vue.createStaticVNode('<defs><rect id="path-1" x="0" y="0" width="32" height="32"></rect></defs><g id="组件规范" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="03图标" transform="translate(-561.000000, -2356.000000)"><g id="icon/line/Universal/code" transform="translate(561.000000, 2356.000000)"><g id="路径"><mask id="mask-2" fill="white"><use xlink:href="#path-1"></use></mask><use id="蒙版" fill="#D8D8D8" opacity="0" xlink:href="#path-1"></use><path d="M21.9284587,7.9482233 L29.8079004,15.827665 C29.9055315,15.9252961 29.9055315,16.0835874 29.8079004,16.1812184 L21.9284587,24.0606602 C21.8308276,24.1582912 21.6725364,24.1582912 21.5749053,24.0606602 L20.3374684,22.8232233 C20.2419143,22.7276698 20.2398813,22.5740096 20.331369,22.4759832 L20.3374687,22.4696702 L26.8027181,16.0044417 L20.3374687,9.53921328 C20.2398372,9.44158265 20.2398369,9.2832914 20.3374679,9.18566017 L21.5749053,7.9482233 C21.6725364,7.85059223 21.8308276,7.85059223 21.9284587,7.9482233 Z M10.3999684,7.9482233 L11.6374053,9.18566017 C11.7329594,9.28121371 11.7349925,9.43487387 11.6435048,9.53290029 L11.637405,9.53921328 L5.17215562,16.0044417 L11.637405,22.4696702 C11.7329593,22.5652236 11.7349926,22.7188837 11.643505,22.8169103 L11.6374053,22.8232233 L10.3999684,24.0606602 C10.3023374,24.1582912 10.1440461,24.1582912 10.046415,24.0606602 L2.1669733,16.1812184 C2.06934223,16.0835874 2.06934223,15.9252961 2.1669733,15.827665 L10.046415,7.9482233 C10.1440461,7.85059223 10.3023374,7.85059223 10.3999684,7.9482233 Z M17.2612532,9.29310422 L18.9262468,9.83189578 C19.0576112,9.87440526 19.1296423,10.0153579 19.0871328,10.1467222 L15.0848232,22.514807 C15.0423138,22.6461714 14.9013612,22.7182025 14.7699968,22.675693 L13.1050032,22.1369014 C12.9736388,22.0943919 12.9016077,21.9534393 12.9441172,21.822075 L16.9464268,9.45399022 C16.9889362,9.32262585 17.1298888,9.25059474 17.2612532,9.29310422 Z" id="形状" fill="#1D1F24" mask="url(#mask-2)"></path></g></g><g id="icon切图" transform="translate(226.000000, 1782.000000)"></g></g></g>', 2);
|
|
5057
|
+
const _hoisted_4$2 = [
|
|
5058
|
+
_hoisted_2$8
|
|
5027
5059
|
];
|
|
5028
5060
|
const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
5029
5061
|
...{
|
|
@@ -5032,14 +5064,14 @@
|
|
|
5032
5064
|
__name: "CodeIcon",
|
|
5033
5065
|
setup(__props) {
|
|
5034
5066
|
return (_ctx, _cache) => {
|
|
5035
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$d, _hoisted_4$
|
|
5067
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$d, _hoisted_4$2);
|
|
5036
5068
|
};
|
|
5037
5069
|
}
|
|
5038
5070
|
});
|
|
5039
5071
|
|
|
5040
5072
|
const _hoisted_1$c = ["id"];
|
|
5041
|
-
const _hoisted_2$
|
|
5042
|
-
const _hoisted_3$
|
|
5073
|
+
const _hoisted_2$7 = { class: "list-item" };
|
|
5074
|
+
const _hoisted_3$3 = {
|
|
5043
5075
|
key: 2,
|
|
5044
5076
|
class: "right-tool"
|
|
5045
5077
|
};
|
|
@@ -5144,7 +5176,7 @@
|
|
|
5144
5176
|
id: data.id,
|
|
5145
5177
|
class: "list-container"
|
|
5146
5178
|
}, [
|
|
5147
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5179
|
+
vue.createElementVNode("div", _hoisted_2$7, [
|
|
5148
5180
|
data.type === "code" ? (vue.openBlock(), vue.createBlock(_sfc_main$l, {
|
|
5149
5181
|
key: 0,
|
|
5150
5182
|
class: "codeIcon"
|
|
@@ -5156,7 +5188,7 @@
|
|
|
5156
5188
|
vue.createElementVNode("span", {
|
|
5157
5189
|
class: vue.normalizeClass(["name", { code: data.type === "code", hook: data.type === "key" }])
|
|
5158
5190
|
}, vue.toDisplayString(data.name) + " (" + vue.toDisplayString(data.id) + ")", 3),
|
|
5159
|
-
data.type === "code" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
5191
|
+
data.type === "code" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$3, [
|
|
5160
5192
|
vue.createVNode(vue.unref(design.TMagicTooltip), {
|
|
5161
5193
|
effect: "dark",
|
|
5162
5194
|
content: editable.value ? "编辑" : "查看",
|
|
@@ -5340,8 +5372,8 @@
|
|
|
5340
5372
|
});
|
|
5341
5373
|
|
|
5342
5374
|
const _hoisted_1$a = ["id"];
|
|
5343
|
-
const _hoisted_2$
|
|
5344
|
-
const _hoisted_3$
|
|
5375
|
+
const _hoisted_2$6 = { class: "list-item" };
|
|
5376
|
+
const _hoisted_3$2 = {
|
|
5345
5377
|
key: 2,
|
|
5346
5378
|
class: "right-tool"
|
|
5347
5379
|
};
|
|
@@ -5440,7 +5472,7 @@
|
|
|
5440
5472
|
id: data.id,
|
|
5441
5473
|
class: "list-container"
|
|
5442
5474
|
}, [
|
|
5443
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5475
|
+
vue.createElementVNode("div", _hoisted_2$6, [
|
|
5444
5476
|
data.type === "code" ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
|
|
5445
5477
|
key: 0,
|
|
5446
5478
|
class: "codeIcon",
|
|
@@ -5454,7 +5486,7 @@
|
|
|
5454
5486
|
vue.createElementVNode("span", {
|
|
5455
5487
|
class: vue.normalizeClass(["name", { code: data.type === "ds", hook: data.type === "key" }])
|
|
5456
5488
|
}, vue.toDisplayString(data.type === "key" ? data.name : `${data.name}(${data.id})`), 3),
|
|
5457
|
-
data.type === "ds" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
5489
|
+
data.type === "ds" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$2, [
|
|
5458
5490
|
vue.createVNode(vue.unref(design.TMagicTooltip), {
|
|
5459
5491
|
effect: "dark",
|
|
5460
5492
|
content: editable.value ? "编辑" : "查看",
|
|
@@ -5499,7 +5531,7 @@
|
|
|
5499
5531
|
});
|
|
5500
5532
|
|
|
5501
5533
|
const _hoisted_1$9 = { class: "search-wrapper" };
|
|
5502
|
-
const _hoisted_2$
|
|
5534
|
+
const _hoisted_2$5 = { class: "data-source-list-panel-add-menu" };
|
|
5503
5535
|
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
5504
5536
|
...{
|
|
5505
5537
|
name: "MEditorDataSourceListPanel"
|
|
@@ -5572,7 +5604,7 @@
|
|
|
5572
5604
|
})
|
|
5573
5605
|
]),
|
|
5574
5606
|
default: vue.withCtx(() => [
|
|
5575
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5607
|
+
vue.createElementVNode("div", _hoisted_2$5, [
|
|
5576
5608
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(datasourceTypeList.value, (item, index) => {
|
|
5577
5609
|
return vue.openBlock(), vue.createBlock(_sfc_main$q, {
|
|
5578
5610
|
data: {
|
|
@@ -5610,7 +5642,7 @@
|
|
|
5610
5642
|
});
|
|
5611
5643
|
|
|
5612
5644
|
const _hoisted_1$8 = ["onClick", "onDragstart"];
|
|
5613
|
-
const _hoisted_2$
|
|
5645
|
+
const _hoisted_2$4 = ["title"];
|
|
5614
5646
|
const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
5615
5647
|
...{
|
|
5616
5648
|
name: "MEditorComponentListPanel"
|
|
@@ -5719,7 +5751,7 @@
|
|
|
5719
5751
|
}, null, 8, ["title", "icon"]),
|
|
5720
5752
|
vue.createElementVNode("span", {
|
|
5721
5753
|
title: item.text
|
|
5722
|
-
}, vue.toDisplayString(item.text), 9, _hoisted_2$
|
|
5754
|
+
}, vue.toDisplayString(item.text), 9, _hoisted_2$4)
|
|
5723
5755
|
])
|
|
5724
5756
|
], 40, _hoisted_1$8);
|
|
5725
5757
|
}), 128))
|
|
@@ -6387,6 +6419,12 @@
|
|
|
6387
6419
|
});
|
|
6388
6420
|
|
|
6389
6421
|
const _hoisted_1$5 = {
|
|
6422
|
+
key: 0,
|
|
6423
|
+
class: "m-editor-sidebar"
|
|
6424
|
+
};
|
|
6425
|
+
const _hoisted_2$3 = { class: "m-editor-sidebar-header" };
|
|
6426
|
+
const _hoisted_3$1 = ["onClick"];
|
|
6427
|
+
const _hoisted_4$1 = {
|
|
6390
6428
|
key: 1,
|
|
6391
6429
|
class: "magic-editor-tab-panel-title"
|
|
6392
6430
|
};
|
|
@@ -6401,8 +6439,6 @@
|
|
|
6401
6439
|
},
|
|
6402
6440
|
setup(__props, { expose: __expose }) {
|
|
6403
6441
|
const props = __props;
|
|
6404
|
-
const tabPaneComponent = design.getConfig("components")?.tabPane;
|
|
6405
|
-
const tabsComponent = design.getConfig("components")?.tabs;
|
|
6406
6442
|
const activeTabName = vue.ref(props.data?.status);
|
|
6407
6443
|
const getItemConfig = (data) => {
|
|
6408
6444
|
const map = {
|
|
@@ -6455,98 +6491,94 @@
|
|
|
6455
6491
|
activeTabName
|
|
6456
6492
|
});
|
|
6457
6493
|
return (_ctx, _cache) => {
|
|
6458
|
-
return _ctx.data.type === "tabs" && _ctx.data.items.length ? (vue.openBlock(), vue.
|
|
6459
|
-
|
|
6460
|
-
modelValue: activeTabName.value,
|
|
6461
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeTabName.value = $event),
|
|
6462
|
-
class: "m-editor-sidebar tmagic-design-tabs"
|
|
6463
|
-
}, vue.unref(tabsComponent)?.props({ type: "card", tabPosition: "left" }) || {}), {
|
|
6464
|
-
default: vue.withCtx(() => [
|
|
6494
|
+
return _ctx.data.type === "tabs" && _ctx.data.items.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [
|
|
6495
|
+
vue.createElementVNode("div", _hoisted_2$3, [
|
|
6465
6496
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(sideBarItems.value, (config, index) => {
|
|
6466
|
-
return vue.openBlock(), vue.
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
config.text ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, vue.toDisplayString(config.text), 1)) : vue.createCommentVNode("", true)
|
|
6478
|
-
]))
|
|
6479
|
-
]),
|
|
6480
|
-
default: vue.withCtx(() => [
|
|
6481
|
-
config ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.component), vue.mergeProps({ key: 0 }, config.props || {}, vue.toHandlers(config?.listeners || {})), vue.createSlots({ _: 2 }, [
|
|
6482
|
-
config.$key === "component-list" || config.slots?.componentListPanelHeader ? {
|
|
6483
|
-
name: "component-list-panel-header",
|
|
6484
|
-
fn: vue.withCtx(() => [
|
|
6485
|
-
config.$key === "component-list" ? vue.renderSlot(_ctx.$slots, "component-list-panel-header", { key: 0 }) : config.slots?.componentListPanelHeader ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.componentListPanelHeader), { key: 1 })) : vue.createCommentVNode("", true)
|
|
6486
|
-
]),
|
|
6487
|
-
key: "0"
|
|
6488
|
-
} : void 0,
|
|
6489
|
-
config.$key === "component-list" || config.slots?.componentListItem ? {
|
|
6490
|
-
name: "component-list-item",
|
|
6491
|
-
fn: vue.withCtx(({ component }) => [
|
|
6492
|
-
config.$key === "component-list" ? vue.renderSlot(_ctx.$slots, "component-list-item", {
|
|
6493
|
-
key: 0,
|
|
6494
|
-
component
|
|
6495
|
-
}) : config.slots?.componentListItem ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.componentListItem), {
|
|
6496
|
-
key: 1,
|
|
6497
|
-
component
|
|
6498
|
-
}, null, 8, ["component"])) : vue.createCommentVNode("", true)
|
|
6499
|
-
]),
|
|
6500
|
-
key: "1"
|
|
6501
|
-
} : void 0,
|
|
6502
|
-
config.$key === "layer" || config.slots?.layerPanelHeader ? {
|
|
6503
|
-
name: "layer-panel-header",
|
|
6504
|
-
fn: vue.withCtx(() => [
|
|
6505
|
-
config.$key === "layer" ? vue.renderSlot(_ctx.$slots, "layer-panel-header", { key: 0 }) : config.slots?.layerPanelHeader ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.layerPanelHeader), { key: 1 })) : vue.createCommentVNode("", true)
|
|
6506
|
-
]),
|
|
6507
|
-
key: "2"
|
|
6508
|
-
} : void 0,
|
|
6509
|
-
config.$key === "code-block" || config.slots?.codeBlockPanelHeader ? {
|
|
6510
|
-
name: "code-block-panel-header",
|
|
6511
|
-
fn: vue.withCtx(() => [
|
|
6512
|
-
config.$key === "code-block" ? vue.renderSlot(_ctx.$slots, "code-block-panel-header", { key: 0 }) : config.slots?.codeBlockPanelHeader ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.codeBlockPanelHeader), { key: 1 })) : vue.createCommentVNode("", true)
|
|
6513
|
-
]),
|
|
6514
|
-
key: "3"
|
|
6515
|
-
} : void 0,
|
|
6516
|
-
config.$key === "code-block" || config.slots?.codeBlockPanelTool ? {
|
|
6517
|
-
name: "code-block-panel-tool",
|
|
6518
|
-
fn: vue.withCtx(({ id, data }) => [
|
|
6519
|
-
config.$key === "code-block" ? vue.renderSlot(_ctx.$slots, "code-block-panel-tool", {
|
|
6520
|
-
key: 0,
|
|
6521
|
-
id,
|
|
6522
|
-
data
|
|
6523
|
-
}) : config.slots?.codeBlockPanelTool ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.codeBlockPanelTool), { key: 1 })) : vue.createCommentVNode("", true)
|
|
6524
|
-
]),
|
|
6525
|
-
key: "4"
|
|
6526
|
-
} : void 0,
|
|
6527
|
-
config.$key === "layer" || config.slots?.layerNodeContent ? {
|
|
6528
|
-
name: "layer-node-content",
|
|
6529
|
-
fn: vue.withCtx(({ data: nodeData, node }) => [
|
|
6530
|
-
config.$key === "layer" ? vue.renderSlot(_ctx.$slots, "layer-node-content", {
|
|
6531
|
-
key: 0,
|
|
6532
|
-
data: nodeData,
|
|
6533
|
-
node
|
|
6534
|
-
}) : config.slots?.layerNodeContent ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.layerNodeContent), {
|
|
6535
|
-
key: 1,
|
|
6536
|
-
data: nodeData,
|
|
6537
|
-
node
|
|
6538
|
-
}, null, 8, ["data", "node"])) : vue.createCommentVNode("", true)
|
|
6539
|
-
]),
|
|
6540
|
-
key: "5"
|
|
6541
|
-
} : void 0
|
|
6542
|
-
]), 1040)) : vue.createCommentVNode("", true)
|
|
6543
|
-
]),
|
|
6544
|
-
_: 2
|
|
6545
|
-
}, 1040);
|
|
6497
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
6498
|
+
class: vue.normalizeClass(["m-editor-sidebar-header-item", { "is-active": activeTabName.value === config.text }]),
|
|
6499
|
+
key: config.$key ?? index,
|
|
6500
|
+
onClick: ($event) => activeTabName.value = config.text || `${index}`
|
|
6501
|
+
}, [
|
|
6502
|
+
config.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
|
|
6503
|
+
key: 0,
|
|
6504
|
+
icon: config.icon
|
|
6505
|
+
}, null, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
6506
|
+
config.text ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$1, vue.toDisplayString(config.text), 1)) : vue.createCommentVNode("", true)
|
|
6507
|
+
], 10, _hoisted_3$1);
|
|
6546
6508
|
}), 128))
|
|
6547
6509
|
]),
|
|
6548
|
-
|
|
6549
|
-
|
|
6510
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(sideBarItems.value, (config, index) => {
|
|
6511
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
6512
|
+
class: "m-editor-sidebar-content",
|
|
6513
|
+
key: config.$key ?? index
|
|
6514
|
+
}, [
|
|
6515
|
+
config ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.component), vue.mergeProps({ key: 0 }, config.props || {}, vue.toHandlers(config?.listeners || {})), vue.createSlots({ _: 2 }, [
|
|
6516
|
+
config.$key === "component-list" || config.slots?.componentListPanelHeader ? {
|
|
6517
|
+
name: "component-list-panel-header",
|
|
6518
|
+
fn: vue.withCtx(() => [
|
|
6519
|
+
config.$key === "component-list" ? vue.renderSlot(_ctx.$slots, "component-list-panel-header", { key: 0 }) : config.slots?.componentListPanelHeader ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.componentListPanelHeader), { key: 1 })) : vue.createCommentVNode("", true)
|
|
6520
|
+
]),
|
|
6521
|
+
key: "0"
|
|
6522
|
+
} : void 0,
|
|
6523
|
+
config.$key === "component-list" || config.slots?.componentListItem ? {
|
|
6524
|
+
name: "component-list-item",
|
|
6525
|
+
fn: vue.withCtx(({ component }) => [
|
|
6526
|
+
config.$key === "component-list" ? vue.renderSlot(_ctx.$slots, "component-list-item", {
|
|
6527
|
+
key: 0,
|
|
6528
|
+
component
|
|
6529
|
+
}) : config.slots?.componentListItem ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.componentListItem), {
|
|
6530
|
+
key: 1,
|
|
6531
|
+
component
|
|
6532
|
+
}, null, 8, ["component"])) : vue.createCommentVNode("", true)
|
|
6533
|
+
]),
|
|
6534
|
+
key: "1"
|
|
6535
|
+
} : void 0,
|
|
6536
|
+
config.$key === "layer" || config.slots?.layerPanelHeader ? {
|
|
6537
|
+
name: "layer-panel-header",
|
|
6538
|
+
fn: vue.withCtx(() => [
|
|
6539
|
+
config.$key === "layer" ? vue.renderSlot(_ctx.$slots, "layer-panel-header", { key: 0 }) : config.slots?.layerPanelHeader ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.layerPanelHeader), { key: 1 })) : vue.createCommentVNode("", true)
|
|
6540
|
+
]),
|
|
6541
|
+
key: "2"
|
|
6542
|
+
} : void 0,
|
|
6543
|
+
config.$key === "code-block" || config.slots?.codeBlockPanelHeader ? {
|
|
6544
|
+
name: "code-block-panel-header",
|
|
6545
|
+
fn: vue.withCtx(() => [
|
|
6546
|
+
config.$key === "code-block" ? vue.renderSlot(_ctx.$slots, "code-block-panel-header", { key: 0 }) : config.slots?.codeBlockPanelHeader ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.codeBlockPanelHeader), { key: 1 })) : vue.createCommentVNode("", true)
|
|
6547
|
+
]),
|
|
6548
|
+
key: "3"
|
|
6549
|
+
} : void 0,
|
|
6550
|
+
config.$key === "code-block" || config.slots?.codeBlockPanelTool ? {
|
|
6551
|
+
name: "code-block-panel-tool",
|
|
6552
|
+
fn: vue.withCtx(({ id, data }) => [
|
|
6553
|
+
config.$key === "code-block" ? vue.renderSlot(_ctx.$slots, "code-block-panel-tool", {
|
|
6554
|
+
key: 0,
|
|
6555
|
+
id,
|
|
6556
|
+
data
|
|
6557
|
+
}) : config.slots?.codeBlockPanelTool ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.codeBlockPanelTool), { key: 1 })) : vue.createCommentVNode("", true)
|
|
6558
|
+
]),
|
|
6559
|
+
key: "4"
|
|
6560
|
+
} : void 0,
|
|
6561
|
+
config.$key === "layer" || config.slots?.layerNodeContent ? {
|
|
6562
|
+
name: "layer-node-content",
|
|
6563
|
+
fn: vue.withCtx(({ data: nodeData, node }) => [
|
|
6564
|
+
config.$key === "layer" ? vue.renderSlot(_ctx.$slots, "layer-node-content", {
|
|
6565
|
+
key: 0,
|
|
6566
|
+
data: nodeData,
|
|
6567
|
+
node
|
|
6568
|
+
}) : config.slots?.layerNodeContent ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.layerNodeContent), {
|
|
6569
|
+
key: 1,
|
|
6570
|
+
data: nodeData,
|
|
6571
|
+
node
|
|
6572
|
+
}, null, 8, ["data", "node"])) : vue.createCommentVNode("", true)
|
|
6573
|
+
]),
|
|
6574
|
+
key: "5"
|
|
6575
|
+
} : void 0
|
|
6576
|
+
]), 1040)) : vue.createCommentVNode("", true)
|
|
6577
|
+
])), [
|
|
6578
|
+
[vue.vShow, activeTabName.value === config.text]
|
|
6579
|
+
]);
|
|
6580
|
+
}), 128))
|
|
6581
|
+
])) : vue.createCommentVNode("", true);
|
|
6550
6582
|
};
|
|
6551
6583
|
}
|
|
6552
6584
|
});
|