@tmagic/editor 1.3.0-alpha.22 → 1.3.0-alpha.23
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 +169 -145
- package/dist/tmagic-editor.js.map +1 -1
- package/dist/tmagic-editor.umd.cjs +169 -145
- package/dist/tmagic-editor.umd.cjs.map +1 -1
- package/package.json +10 -10
- 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"
|
|
@@ -2820,7 +2844,7 @@
|
|
|
2820
2844
|
return (_ctx, _cache) => {
|
|
2821
2845
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
2822
2846
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$p, [
|
|
2823
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
2847
|
+
vue.createElementVNode("div", _hoisted_2$i, [
|
|
2824
2848
|
vue.createVNode(_component_m_form_container, {
|
|
2825
2849
|
class: "select",
|
|
2826
2850
|
config: selectConfig,
|
|
@@ -2856,7 +2880,7 @@
|
|
|
2856
2880
|
});
|
|
2857
2881
|
|
|
2858
2882
|
const _hoisted_1$o = { class: "m-editor-data-source-fields" };
|
|
2859
|
-
const _hoisted_2$
|
|
2883
|
+
const _hoisted_2$h = { class: "m-editor-data-source-fields-footer" };
|
|
2860
2884
|
const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
2861
2885
|
...{
|
|
2862
2886
|
name: "MEditorDataSourceFields"
|
|
@@ -3013,7 +3037,7 @@
|
|
|
3013
3037
|
data: _ctx.model[_ctx.name],
|
|
3014
3038
|
columns: fieldColumns
|
|
3015
3039
|
}, null, 8, ["data"]),
|
|
3016
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3040
|
+
vue.createElementVNode("div", _hoisted_2$h, [
|
|
3017
3041
|
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
3018
3042
|
size: "small",
|
|
3019
3043
|
type: "primary",
|
|
@@ -3092,8 +3116,8 @@
|
|
|
3092
3116
|
});
|
|
3093
3117
|
|
|
3094
3118
|
const _hoisted_1$n = { style: { "display": "flex", "flex-direction": "column", "line-height": "1.2em" } };
|
|
3095
|
-
const _hoisted_2$
|
|
3096
|
-
const _hoisted_3$
|
|
3119
|
+
const _hoisted_2$g = { style: { "font-size": "10px", "color": "rgba(0, 0, 0, 0.6)" } };
|
|
3120
|
+
const _hoisted_3$6 = { class: "el-input__inner" };
|
|
3097
3121
|
const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
|
|
3098
3122
|
...{
|
|
3099
3123
|
name: "MEditorDataSourceInput"
|
|
@@ -3288,7 +3312,7 @@
|
|
|
3288
3312
|
default: vue.withCtx(({ item }) => [
|
|
3289
3313
|
vue.createElementVNode("div", _hoisted_1$n, [
|
|
3290
3314
|
vue.createElementVNode("div", null, vue.toDisplayString(item.text), 1),
|
|
3291
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
3315
|
+
vue.createElementVNode("span", _hoisted_2$g, vue.toDisplayString(item.value), 1)
|
|
3292
3316
|
])
|
|
3293
3317
|
]),
|
|
3294
3318
|
_: 1
|
|
@@ -3300,7 +3324,7 @@
|
|
|
3300
3324
|
vue.createElementVNode("div", {
|
|
3301
3325
|
class: vue.normalizeClass(`tmagic-data-source-input-text-wrapper el-input__wrapper ${isFocused.value ? " is-focus" : ""}`)
|
|
3302
3326
|
}, [
|
|
3303
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
3327
|
+
vue.createElementVNode("div", _hoisted_3$6, [
|
|
3304
3328
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(displayState.value, (item, index) => {
|
|
3305
3329
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
3306
3330
|
item.type === "text" ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
@@ -3402,7 +3426,7 @@
|
|
|
3402
3426
|
};
|
|
3403
3427
|
|
|
3404
3428
|
const _hoisted_1$m = { class: "m-editor-data-source-methods" };
|
|
3405
|
-
const _hoisted_2$
|
|
3429
|
+
const _hoisted_2$f = { class: "m-editor-data-source-methods-footer" };
|
|
3406
3430
|
const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
|
|
3407
3431
|
...{
|
|
3408
3432
|
name: "MEditorDataSourceMethods"
|
|
@@ -3477,7 +3501,7 @@
|
|
|
3477
3501
|
data: _ctx.model[_ctx.name],
|
|
3478
3502
|
columns: methodColumns
|
|
3479
3503
|
}, null, 8, ["data"]),
|
|
3480
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3504
|
+
vue.createElementVNode("div", _hoisted_2$f, [
|
|
3481
3505
|
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
3482
3506
|
size: "small",
|
|
3483
3507
|
type: "primary",
|
|
@@ -3506,7 +3530,7 @@
|
|
|
3506
3530
|
});
|
|
3507
3531
|
|
|
3508
3532
|
const _hoisted_1$l = { class: "m-fields-data-source-method-select" };
|
|
3509
|
-
const _hoisted_2$
|
|
3533
|
+
const _hoisted_2$e = { class: "data-source-method-select-container" };
|
|
3510
3534
|
const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
|
|
3511
3535
|
...{
|
|
3512
3536
|
name: "MEditorDataSourceMethodSelect"
|
|
@@ -3586,7 +3610,7 @@
|
|
|
3586
3610
|
return (_ctx, _cache) => {
|
|
3587
3611
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
3588
3612
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$l, [
|
|
3589
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3613
|
+
vue.createElementVNode("div", _hoisted_2$e, [
|
|
3590
3614
|
vue.createVNode(_component_m_form_container, {
|
|
3591
3615
|
class: "select",
|
|
3592
3616
|
config: cascaderConfig,
|
|
@@ -3678,7 +3702,7 @@
|
|
|
3678
3702
|
});
|
|
3679
3703
|
|
|
3680
3704
|
const _hoisted_1$k = { class: "m-fields-event-select" };
|
|
3681
|
-
const _hoisted_2$
|
|
3705
|
+
const _hoisted_2$d = {
|
|
3682
3706
|
key: 1,
|
|
3683
3707
|
class: "fullWidth"
|
|
3684
3708
|
};
|
|
@@ -3882,7 +3906,7 @@
|
|
|
3882
3906
|
model: _ctx.model,
|
|
3883
3907
|
config: tableConfig.value,
|
|
3884
3908
|
onChange: onChangeHandler
|
|
3885
|
-
}, null, 8, ["size", "disabled", "model", "config"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
3909
|
+
}, null, 8, ["size", "disabled", "model", "config"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$d, [
|
|
3886
3910
|
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
3887
3911
|
class: "create-button",
|
|
3888
3912
|
type: "primary",
|
|
@@ -3932,7 +3956,7 @@
|
|
|
3932
3956
|
});
|
|
3933
3957
|
|
|
3934
3958
|
const _hoisted_1$j = { class: "m-fields-key-value" };
|
|
3935
|
-
const _hoisted_2$
|
|
3959
|
+
const _hoisted_2$c = /* @__PURE__ */ vue.createElementVNode("span", { class: "m-fileds-key-value-delimiter" }, ":", -1);
|
|
3936
3960
|
const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
|
|
3937
3961
|
...{
|
|
3938
3962
|
name: "MEditorKeyValue"
|
|
@@ -3992,7 +4016,7 @@
|
|
|
3992
4016
|
size: _ctx.size,
|
|
3993
4017
|
onChange: keyChangeHandler
|
|
3994
4018
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "size"]),
|
|
3995
|
-
_hoisted_2$
|
|
4019
|
+
_hoisted_2$c,
|
|
3996
4020
|
vue.createVNode(vue.unref(design.TMagicInput), {
|
|
3997
4021
|
placeholder: "value",
|
|
3998
4022
|
modelValue: records.value[index][1],
|
|
@@ -4371,8 +4395,8 @@
|
|
|
4371
4395
|
});
|
|
4372
4396
|
|
|
4373
4397
|
const _hoisted_1$h = { class: "m-editor-empty-panel" };
|
|
4374
|
-
const _hoisted_2$
|
|
4375
|
-
const _hoisted_3$
|
|
4398
|
+
const _hoisted_2$b = { class: "m-editor-empty-content" };
|
|
4399
|
+
const _hoisted_3$5 = /* @__PURE__ */ vue.createElementVNode("p", null, "新增页面", -1);
|
|
4376
4400
|
const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
4377
4401
|
...{
|
|
4378
4402
|
name: "MEditorAddPageBox"
|
|
@@ -4394,7 +4418,7 @@
|
|
|
4394
4418
|
};
|
|
4395
4419
|
return (_ctx, _cache) => {
|
|
4396
4420
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$h, [
|
|
4397
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
4421
|
+
vue.createElementVNode("div", _hoisted_2$b, [
|
|
4398
4422
|
vue.createElementVNode("div", {
|
|
4399
4423
|
class: "m-editor-empty-button",
|
|
4400
4424
|
onClick: clickHandler
|
|
@@ -4402,7 +4426,7 @@
|
|
|
4402
4426
|
vue.createElementVNode("div", null, [
|
|
4403
4427
|
vue.createVNode(_sfc_main$F, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
|
|
4404
4428
|
]),
|
|
4405
|
-
_hoisted_3$
|
|
4429
|
+
_hoisted_3$5
|
|
4406
4430
|
])
|
|
4407
4431
|
])
|
|
4408
4432
|
]);
|
|
@@ -4545,7 +4569,7 @@
|
|
|
4545
4569
|
key: 1,
|
|
4546
4570
|
class: "menu-item-text"
|
|
4547
4571
|
};
|
|
4548
|
-
const _hoisted_2$
|
|
4572
|
+
const _hoisted_2$a = { class: "el-dropdown-link menubar-menu-button" };
|
|
4549
4573
|
const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
4550
4574
|
...{
|
|
4551
4575
|
name: "MEditorToolButton"
|
|
@@ -4689,7 +4713,7 @@
|
|
|
4689
4713
|
})) : vue.createCommentVNode("", true)
|
|
4690
4714
|
]),
|
|
4691
4715
|
default: vue.withCtx(() => [
|
|
4692
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
4716
|
+
vue.createElementVNode("span", _hoisted_2$a, [
|
|
4693
4717
|
vue.createTextVNode(vue.toDisplayString(_ctx.data.text), 1),
|
|
4694
4718
|
vue.createVNode(vue.unref(design.TMagicIcon), { class: "el-icon--right" }, {
|
|
4695
4719
|
default: vue.withCtx(() => [
|
|
@@ -4990,7 +5014,7 @@
|
|
|
4990
5014
|
});
|
|
4991
5015
|
|
|
4992
5016
|
const _hoisted_1$e = { xmlns: "http://www.w3.org/2000/svg" };
|
|
4993
|
-
const _hoisted_2$
|
|
5017
|
+
const _hoisted_2$9 = /* @__PURE__ */ vue.createElementVNode("g", {
|
|
4994
5018
|
fill: "#7C878E",
|
|
4995
5019
|
"fill-rule": "evenodd"
|
|
4996
5020
|
}, [
|
|
@@ -5000,8 +5024,8 @@
|
|
|
5000
5024
|
}),
|
|
5001
5025
|
/* @__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
5026
|
], -1);
|
|
5003
|
-
const _hoisted_3$
|
|
5004
|
-
_hoisted_2$
|
|
5027
|
+
const _hoisted_3$4 = [
|
|
5028
|
+
_hoisted_2$9
|
|
5005
5029
|
];
|
|
5006
5030
|
const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
5007
5031
|
...{
|
|
@@ -5010,7 +5034,7 @@
|
|
|
5010
5034
|
__name: "AppManageIcon",
|
|
5011
5035
|
setup(__props) {
|
|
5012
5036
|
return (_ctx, _cache) => {
|
|
5013
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$e, _hoisted_3$
|
|
5037
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$e, _hoisted_3$4);
|
|
5014
5038
|
};
|
|
5015
5039
|
}
|
|
5016
5040
|
});
|
|
@@ -5021,9 +5045,9 @@
|
|
|
5021
5045
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5022
5046
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
5023
5047
|
};
|
|
5024
|
-
const _hoisted_2$
|
|
5025
|
-
const _hoisted_4$
|
|
5026
|
-
_hoisted_2$
|
|
5048
|
+
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);
|
|
5049
|
+
const _hoisted_4$2 = [
|
|
5050
|
+
_hoisted_2$8
|
|
5027
5051
|
];
|
|
5028
5052
|
const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
5029
5053
|
...{
|
|
@@ -5032,14 +5056,14 @@
|
|
|
5032
5056
|
__name: "CodeIcon",
|
|
5033
5057
|
setup(__props) {
|
|
5034
5058
|
return (_ctx, _cache) => {
|
|
5035
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$d, _hoisted_4$
|
|
5059
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$d, _hoisted_4$2);
|
|
5036
5060
|
};
|
|
5037
5061
|
}
|
|
5038
5062
|
});
|
|
5039
5063
|
|
|
5040
5064
|
const _hoisted_1$c = ["id"];
|
|
5041
|
-
const _hoisted_2$
|
|
5042
|
-
const _hoisted_3$
|
|
5065
|
+
const _hoisted_2$7 = { class: "list-item" };
|
|
5066
|
+
const _hoisted_3$3 = {
|
|
5043
5067
|
key: 2,
|
|
5044
5068
|
class: "right-tool"
|
|
5045
5069
|
};
|
|
@@ -5144,7 +5168,7 @@
|
|
|
5144
5168
|
id: data.id,
|
|
5145
5169
|
class: "list-container"
|
|
5146
5170
|
}, [
|
|
5147
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5171
|
+
vue.createElementVNode("div", _hoisted_2$7, [
|
|
5148
5172
|
data.type === "code" ? (vue.openBlock(), vue.createBlock(_sfc_main$l, {
|
|
5149
5173
|
key: 0,
|
|
5150
5174
|
class: "codeIcon"
|
|
@@ -5156,7 +5180,7 @@
|
|
|
5156
5180
|
vue.createElementVNode("span", {
|
|
5157
5181
|
class: vue.normalizeClass(["name", { code: data.type === "code", hook: data.type === "key" }])
|
|
5158
5182
|
}, vue.toDisplayString(data.name) + " (" + vue.toDisplayString(data.id) + ")", 3),
|
|
5159
|
-
data.type === "code" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
5183
|
+
data.type === "code" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$3, [
|
|
5160
5184
|
vue.createVNode(vue.unref(design.TMagicTooltip), {
|
|
5161
5185
|
effect: "dark",
|
|
5162
5186
|
content: editable.value ? "编辑" : "查看",
|
|
@@ -5340,8 +5364,8 @@
|
|
|
5340
5364
|
});
|
|
5341
5365
|
|
|
5342
5366
|
const _hoisted_1$a = ["id"];
|
|
5343
|
-
const _hoisted_2$
|
|
5344
|
-
const _hoisted_3$
|
|
5367
|
+
const _hoisted_2$6 = { class: "list-item" };
|
|
5368
|
+
const _hoisted_3$2 = {
|
|
5345
5369
|
key: 2,
|
|
5346
5370
|
class: "right-tool"
|
|
5347
5371
|
};
|
|
@@ -5440,7 +5464,7 @@
|
|
|
5440
5464
|
id: data.id,
|
|
5441
5465
|
class: "list-container"
|
|
5442
5466
|
}, [
|
|
5443
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5467
|
+
vue.createElementVNode("div", _hoisted_2$6, [
|
|
5444
5468
|
data.type === "code" ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
|
|
5445
5469
|
key: 0,
|
|
5446
5470
|
class: "codeIcon",
|
|
@@ -5454,7 +5478,7 @@
|
|
|
5454
5478
|
vue.createElementVNode("span", {
|
|
5455
5479
|
class: vue.normalizeClass(["name", { code: data.type === "ds", hook: data.type === "key" }])
|
|
5456
5480
|
}, vue.toDisplayString(data.type === "key" ? data.name : `${data.name}(${data.id})`), 3),
|
|
5457
|
-
data.type === "ds" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
5481
|
+
data.type === "ds" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$2, [
|
|
5458
5482
|
vue.createVNode(vue.unref(design.TMagicTooltip), {
|
|
5459
5483
|
effect: "dark",
|
|
5460
5484
|
content: editable.value ? "编辑" : "查看",
|
|
@@ -5499,7 +5523,7 @@
|
|
|
5499
5523
|
});
|
|
5500
5524
|
|
|
5501
5525
|
const _hoisted_1$9 = { class: "search-wrapper" };
|
|
5502
|
-
const _hoisted_2$
|
|
5526
|
+
const _hoisted_2$5 = { class: "data-source-list-panel-add-menu" };
|
|
5503
5527
|
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
5504
5528
|
...{
|
|
5505
5529
|
name: "MEditorDataSourceListPanel"
|
|
@@ -5572,7 +5596,7 @@
|
|
|
5572
5596
|
})
|
|
5573
5597
|
]),
|
|
5574
5598
|
default: vue.withCtx(() => [
|
|
5575
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5599
|
+
vue.createElementVNode("div", _hoisted_2$5, [
|
|
5576
5600
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(datasourceTypeList.value, (item, index) => {
|
|
5577
5601
|
return vue.openBlock(), vue.createBlock(_sfc_main$q, {
|
|
5578
5602
|
data: {
|
|
@@ -5610,7 +5634,7 @@
|
|
|
5610
5634
|
});
|
|
5611
5635
|
|
|
5612
5636
|
const _hoisted_1$8 = ["onClick", "onDragstart"];
|
|
5613
|
-
const _hoisted_2$
|
|
5637
|
+
const _hoisted_2$4 = ["title"];
|
|
5614
5638
|
const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
5615
5639
|
...{
|
|
5616
5640
|
name: "MEditorComponentListPanel"
|
|
@@ -5719,7 +5743,7 @@
|
|
|
5719
5743
|
}, null, 8, ["title", "icon"]),
|
|
5720
5744
|
vue.createElementVNode("span", {
|
|
5721
5745
|
title: item.text
|
|
5722
|
-
}, vue.toDisplayString(item.text), 9, _hoisted_2$
|
|
5746
|
+
}, vue.toDisplayString(item.text), 9, _hoisted_2$4)
|
|
5723
5747
|
])
|
|
5724
5748
|
], 40, _hoisted_1$8);
|
|
5725
5749
|
}), 128))
|
|
@@ -6387,6 +6411,12 @@
|
|
|
6387
6411
|
});
|
|
6388
6412
|
|
|
6389
6413
|
const _hoisted_1$5 = {
|
|
6414
|
+
key: 0,
|
|
6415
|
+
class: "m-editor-sidebar"
|
|
6416
|
+
};
|
|
6417
|
+
const _hoisted_2$3 = { class: "m-editor-sidebar-header" };
|
|
6418
|
+
const _hoisted_3$1 = ["onClick"];
|
|
6419
|
+
const _hoisted_4$1 = {
|
|
6390
6420
|
key: 1,
|
|
6391
6421
|
class: "magic-editor-tab-panel-title"
|
|
6392
6422
|
};
|
|
@@ -6401,8 +6431,6 @@
|
|
|
6401
6431
|
},
|
|
6402
6432
|
setup(__props, { expose: __expose }) {
|
|
6403
6433
|
const props = __props;
|
|
6404
|
-
const tabPaneComponent = design.getConfig("components")?.tabPane;
|
|
6405
|
-
const tabsComponent = design.getConfig("components")?.tabs;
|
|
6406
6434
|
const activeTabName = vue.ref(props.data?.status);
|
|
6407
6435
|
const getItemConfig = (data) => {
|
|
6408
6436
|
const map = {
|
|
@@ -6455,98 +6483,94 @@
|
|
|
6455
6483
|
activeTabName
|
|
6456
6484
|
});
|
|
6457
6485
|
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(() => [
|
|
6486
|
+
return _ctx.data.type === "tabs" && _ctx.data.items.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [
|
|
6487
|
+
vue.createElementVNode("div", _hoisted_2$3, [
|
|
6465
6488
|
(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);
|
|
6489
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
6490
|
+
class: vue.normalizeClass(["m-editor-sidebar-header-item", { "is-active": activeTabName.value === config.text }]),
|
|
6491
|
+
key: config.$key ?? index,
|
|
6492
|
+
onClick: ($event) => activeTabName.value = config.text || `${index}`
|
|
6493
|
+
}, [
|
|
6494
|
+
config.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
|
|
6495
|
+
key: 0,
|
|
6496
|
+
icon: config.icon
|
|
6497
|
+
}, null, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
6498
|
+
config.text ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$1, vue.toDisplayString(config.text), 1)) : vue.createCommentVNode("", true)
|
|
6499
|
+
], 10, _hoisted_3$1);
|
|
6546
6500
|
}), 128))
|
|
6547
6501
|
]),
|
|
6548
|
-
|
|
6549
|
-
|
|
6502
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(sideBarItems.value, (config, index) => {
|
|
6503
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
6504
|
+
class: "m-editor-sidebar-content",
|
|
6505
|
+
key: config.$key ?? index
|
|
6506
|
+
}, [
|
|
6507
|
+
config ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.component), vue.mergeProps({ key: 0 }, config.props || {}, vue.toHandlers(config?.listeners || {})), vue.createSlots({ _: 2 }, [
|
|
6508
|
+
config.$key === "component-list" || config.slots?.componentListPanelHeader ? {
|
|
6509
|
+
name: "component-list-panel-header",
|
|
6510
|
+
fn: vue.withCtx(() => [
|
|
6511
|
+
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)
|
|
6512
|
+
]),
|
|
6513
|
+
key: "0"
|
|
6514
|
+
} : void 0,
|
|
6515
|
+
config.$key === "component-list" || config.slots?.componentListItem ? {
|
|
6516
|
+
name: "component-list-item",
|
|
6517
|
+
fn: vue.withCtx(({ component }) => [
|
|
6518
|
+
config.$key === "component-list" ? vue.renderSlot(_ctx.$slots, "component-list-item", {
|
|
6519
|
+
key: 0,
|
|
6520
|
+
component
|
|
6521
|
+
}) : config.slots?.componentListItem ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.componentListItem), {
|
|
6522
|
+
key: 1,
|
|
6523
|
+
component
|
|
6524
|
+
}, null, 8, ["component"])) : vue.createCommentVNode("", true)
|
|
6525
|
+
]),
|
|
6526
|
+
key: "1"
|
|
6527
|
+
} : void 0,
|
|
6528
|
+
config.$key === "layer" || config.slots?.layerPanelHeader ? {
|
|
6529
|
+
name: "layer-panel-header",
|
|
6530
|
+
fn: vue.withCtx(() => [
|
|
6531
|
+
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)
|
|
6532
|
+
]),
|
|
6533
|
+
key: "2"
|
|
6534
|
+
} : void 0,
|
|
6535
|
+
config.$key === "code-block" || config.slots?.codeBlockPanelHeader ? {
|
|
6536
|
+
name: "code-block-panel-header",
|
|
6537
|
+
fn: vue.withCtx(() => [
|
|
6538
|
+
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)
|
|
6539
|
+
]),
|
|
6540
|
+
key: "3"
|
|
6541
|
+
} : void 0,
|
|
6542
|
+
config.$key === "code-block" || config.slots?.codeBlockPanelTool ? {
|
|
6543
|
+
name: "code-block-panel-tool",
|
|
6544
|
+
fn: vue.withCtx(({ id, data }) => [
|
|
6545
|
+
config.$key === "code-block" ? vue.renderSlot(_ctx.$slots, "code-block-panel-tool", {
|
|
6546
|
+
key: 0,
|
|
6547
|
+
id,
|
|
6548
|
+
data
|
|
6549
|
+
}) : config.slots?.codeBlockPanelTool ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.codeBlockPanelTool), { key: 1 })) : vue.createCommentVNode("", true)
|
|
6550
|
+
]),
|
|
6551
|
+
key: "4"
|
|
6552
|
+
} : void 0,
|
|
6553
|
+
config.$key === "layer" || config.slots?.layerNodeContent ? {
|
|
6554
|
+
name: "layer-node-content",
|
|
6555
|
+
fn: vue.withCtx(({ data: nodeData, node }) => [
|
|
6556
|
+
config.$key === "layer" ? vue.renderSlot(_ctx.$slots, "layer-node-content", {
|
|
6557
|
+
key: 0,
|
|
6558
|
+
data: nodeData,
|
|
6559
|
+
node
|
|
6560
|
+
}) : config.slots?.layerNodeContent ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.layerNodeContent), {
|
|
6561
|
+
key: 1,
|
|
6562
|
+
data: nodeData,
|
|
6563
|
+
node
|
|
6564
|
+
}, null, 8, ["data", "node"])) : vue.createCommentVNode("", true)
|
|
6565
|
+
]),
|
|
6566
|
+
key: "5"
|
|
6567
|
+
} : void 0
|
|
6568
|
+
]), 1040)) : vue.createCommentVNode("", true)
|
|
6569
|
+
])), [
|
|
6570
|
+
[vue.vShow, activeTabName.value === config.text]
|
|
6571
|
+
]);
|
|
6572
|
+
}), 128))
|
|
6573
|
+
])) : vue.createCommentVNode("", true);
|
|
6550
6574
|
};
|
|
6551
6575
|
}
|
|
6552
6576
|
});
|