@tmagic/editor 1.3.0-beta.5 → 1.3.0-beta.7
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 +57 -56
- package/dist/tmagic-editor.js +607 -428
- package/dist/tmagic-editor.js.map +1 -1
- package/dist/tmagic-editor.umd.cjs +626 -446
- package/dist/tmagic-editor.umd.cjs.map +1 -1
- package/package.json +11 -10
- package/src/Editor.vue +8 -0
- package/src/components/Tree.vue +66 -0
- package/src/components/TreeNode.vue +142 -0
- package/src/fields/KeyValue.vue +1 -0
- package/src/layouts/CodeEditor.vue +1 -0
- package/src/layouts/sidebar/Sidebar.vue +13 -0
- package/src/layouts/sidebar/data-source/DataSourceList.vue +4 -2
- package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +8 -2
- package/src/layouts/sidebar/layer/LayerPanel.vue +40 -31
- package/src/layouts/sidebar/layer/use-click.ts +105 -0
- package/src/layouts/sidebar/layer/use-drag.ts +1 -1
- package/src/layouts/sidebar/layer/use-filter.ts +1 -12
- package/src/layouts/sidebar/layer/use-keybinding.ts +6 -2
- package/src/layouts/sidebar/layer/use-node-status.ts +4 -2
- package/src/services/dataSource.ts +2 -2
- package/src/theme/layer-panel.scss +2 -74
- package/src/theme/theme.scss +1 -0
- package/src/theme/tree.scss +72 -0
- package/src/type.ts +16 -1
- package/src/utils/data-source/index.ts +117 -34
- package/src/utils/tree.ts +15 -0
- package/types/{layouts/sidebar/layer/LayerNode.vue.d.ts → components/Tree.vue.d.ts} +19 -17
- package/types/components/TreeNode.vue.d.ts +47 -0
- package/types/layouts/CodeEditor.vue.d.ts +4 -1
- package/types/layouts/sidebar/data-source/DataSourceList.vue.d.ts +2 -6
- package/types/layouts/sidebar/data-source/DataSourceListPanel.vue.d.ts +7 -1
- package/types/layouts/sidebar/layer/LayerPanel.vue.d.ts +1 -1
- package/types/layouts/sidebar/layer/use-click.d.ts +106 -0
- package/types/layouts/sidebar/layer/use-filter.d.ts +0 -1
- package/types/layouts/sidebar/layer/use-keybinding.d.ts +2 -1
- package/types/type.d.ts +20 -1
- package/types/utils/data-source/index.d.ts +1 -0
- package/types/utils/tree.d.ts +3 -0
- package/src/layouts/sidebar/layer/LayerNode.vue +0 -208
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
};
|
|
30
30
|
const getConfig = (key) => $TMAGIC_EDITOR[key];
|
|
31
31
|
|
|
32
|
-
const _hoisted_1$
|
|
32
|
+
const _hoisted_1$x = {
|
|
33
33
|
class: /* @__PURE__ */ vue.normalizeClass(`magic-code-editor`)
|
|
34
34
|
};
|
|
35
|
-
const _sfc_main$
|
|
35
|
+
const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
|
|
36
36
|
...{
|
|
37
37
|
name: "MEditorCodeEditor"
|
|
38
38
|
},
|
|
39
39
|
__name: "CodeEditor",
|
|
40
40
|
props: {
|
|
41
|
-
initValues: {},
|
|
41
|
+
initValues: { default: "" },
|
|
42
42
|
modifiedValues: {},
|
|
43
43
|
type: {},
|
|
44
44
|
language: { default: "javascript" },
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
}
|
|
190
190
|
});
|
|
191
191
|
return (_ctx, _cache) => {
|
|
192
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
192
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$x, [
|
|
193
193
|
(vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
194
194
|
to: "body",
|
|
195
195
|
disabled: !fullScreen.value
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
}
|
|
218
218
|
});
|
|
219
219
|
|
|
220
|
-
const _sfc_main$
|
|
220
|
+
const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
|
|
221
221
|
...{
|
|
222
222
|
name: "MEditorCode"
|
|
223
223
|
},
|
|
@@ -241,7 +241,7 @@
|
|
|
241
241
|
emit("change", v);
|
|
242
242
|
};
|
|
243
243
|
return (_ctx, _cache) => {
|
|
244
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
244
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$T, {
|
|
245
245
|
height: _ctx.config.height,
|
|
246
246
|
"init-values": _ctx.model[_ctx.name],
|
|
247
247
|
language: _ctx.config.language,
|
|
@@ -256,7 +256,7 @@
|
|
|
256
256
|
}
|
|
257
257
|
});
|
|
258
258
|
|
|
259
|
-
const _sfc_main$
|
|
259
|
+
const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
|
|
260
260
|
...{
|
|
261
261
|
name: "MEditorCodeLink"
|
|
262
262
|
},
|
|
@@ -335,7 +335,7 @@
|
|
|
335
335
|
}
|
|
336
336
|
});
|
|
337
337
|
|
|
338
|
-
const _sfc_main$
|
|
338
|
+
const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
|
|
339
339
|
...{
|
|
340
340
|
name: "MEditorCodeSelect"
|
|
341
341
|
},
|
|
@@ -407,11 +407,11 @@
|
|
|
407
407
|
}
|
|
408
408
|
});
|
|
409
409
|
|
|
410
|
-
const _hoisted_1$
|
|
410
|
+
const _hoisted_1$w = { style: { "display": "flex", "margin-bottom": "10px" } };
|
|
411
411
|
const _hoisted_2$p = { style: { "flex": "1" } };
|
|
412
412
|
const _hoisted_3$b = { style: { "flex": "1" } };
|
|
413
413
|
const _hoisted_4$7 = { class: "dialog-footer" };
|
|
414
|
-
const _sfc_main$
|
|
414
|
+
const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
|
|
415
415
|
...{
|
|
416
416
|
name: "MEditorCodeBlockEditor"
|
|
417
417
|
},
|
|
@@ -653,7 +653,7 @@
|
|
|
653
653
|
])
|
|
654
654
|
]),
|
|
655
655
|
default: vue.withCtx(() => [
|
|
656
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
656
|
+
vue.createElementVNode("div", _hoisted_1$w, [
|
|
657
657
|
vue.createElementVNode("div", _hoisted_2$p, [
|
|
658
658
|
vue.createVNode(vue.unref(design.TMagicTag), {
|
|
659
659
|
size: "small",
|
|
@@ -677,7 +677,7 @@
|
|
|
677
677
|
})
|
|
678
678
|
])
|
|
679
679
|
]),
|
|
680
|
-
difVisible.value ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
680
|
+
difVisible.value ? (vue.openBlock(), vue.createBlock(_sfc_main$T, {
|
|
681
681
|
key: 0,
|
|
682
682
|
ref_key: "magicVsEditor",
|
|
683
683
|
ref: magicVsEditor,
|
|
@@ -786,47 +786,72 @@
|
|
|
786
786
|
...BaseFormConfig(),
|
|
787
787
|
...config,
|
|
788
788
|
{
|
|
789
|
-
type: "
|
|
790
|
-
title: "数据定义",
|
|
789
|
+
type: "tab",
|
|
791
790
|
items: [
|
|
792
791
|
{
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
items: [
|
|
792
|
+
title: "数据定义",
|
|
793
|
+
items: [
|
|
794
|
+
{
|
|
795
|
+
name: "fields",
|
|
796
|
+
type: "data-source-fields",
|
|
797
|
+
defaultValue: () => []
|
|
798
|
+
}
|
|
799
|
+
]
|
|
800
|
+
},
|
|
803
801
|
{
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
display: false,
|
|
814
|
-
items: [
|
|
802
|
+
title: "方法定义",
|
|
803
|
+
items: [
|
|
804
|
+
{
|
|
805
|
+
name: "methods",
|
|
806
|
+
type: "data-source-methods",
|
|
807
|
+
defaultValue: () => []
|
|
808
|
+
}
|
|
809
|
+
]
|
|
810
|
+
},
|
|
815
811
|
{
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
812
|
+
title: "事件配置",
|
|
813
|
+
display: false,
|
|
814
|
+
items: [
|
|
815
|
+
{
|
|
816
|
+
name: "events",
|
|
817
|
+
src: "datasource",
|
|
818
|
+
type: "event-select"
|
|
819
|
+
}
|
|
820
|
+
]
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
title: "mock数据",
|
|
824
|
+
items: [
|
|
825
|
+
{
|
|
826
|
+
name: "mocks",
|
|
827
|
+
type: "data-source-mocks",
|
|
828
|
+
defaultValue: () => []
|
|
829
|
+
}
|
|
830
|
+
]
|
|
831
|
+
},
|
|
826
832
|
{
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
833
|
+
title: "请求参数裁剪",
|
|
834
|
+
display: (formState, { model }) => model.type === "http",
|
|
835
|
+
items: [
|
|
836
|
+
{
|
|
837
|
+
name: "beforeRequest",
|
|
838
|
+
type: "vs-code",
|
|
839
|
+
parse: true,
|
|
840
|
+
height: "600px"
|
|
841
|
+
}
|
|
842
|
+
]
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
title: "响应数据裁剪",
|
|
846
|
+
display: (formState, { model }) => model.type === "http",
|
|
847
|
+
items: [
|
|
848
|
+
{
|
|
849
|
+
name: "afterResponse",
|
|
850
|
+
type: "vs-code",
|
|
851
|
+
parse: true,
|
|
852
|
+
height: "600px"
|
|
853
|
+
}
|
|
854
|
+
]
|
|
830
855
|
}
|
|
831
856
|
]
|
|
832
857
|
}
|
|
@@ -841,6 +866,62 @@
|
|
|
841
866
|
return fillConfig$1(configs[type] || []);
|
|
842
867
|
}
|
|
843
868
|
};
|
|
869
|
+
const getFormValue = (type, values) => {
|
|
870
|
+
if (type !== "http") {
|
|
871
|
+
return values;
|
|
872
|
+
}
|
|
873
|
+
return {
|
|
874
|
+
beforeRequest: `(options, context) => {
|
|
875
|
+
/**
|
|
876
|
+
* 用户可以直接编写函数,在原始接口调用之前,会运行该函数,将这个函数的返回值作为该数据源接口的入参
|
|
877
|
+
*
|
|
878
|
+
* options: HttpOptions
|
|
879
|
+
*
|
|
880
|
+
* interface HttpOptions {
|
|
881
|
+
* // 请求链接
|
|
882
|
+
* url: string;
|
|
883
|
+
* // query参数
|
|
884
|
+
* params?: Record<string, string>;
|
|
885
|
+
* // body数据
|
|
886
|
+
* data?: Record<string, any>;
|
|
887
|
+
* // 请求头
|
|
888
|
+
* headers?: Record<string, string>;
|
|
889
|
+
* // 请求方法 GET/POST
|
|
890
|
+
* method?: Method;
|
|
891
|
+
* }
|
|
892
|
+
*
|
|
893
|
+
* context:上下文对象
|
|
894
|
+
*
|
|
895
|
+
* interface Content {
|
|
896
|
+
* app: AppCore;
|
|
897
|
+
* dataSource: HttpDataSource;
|
|
898
|
+
* }
|
|
899
|
+
*
|
|
900
|
+
* return: HttpOptions
|
|
901
|
+
*/
|
|
902
|
+
|
|
903
|
+
// 此处的返回值会作为这个接口的入参
|
|
904
|
+
return options;
|
|
905
|
+
}`,
|
|
906
|
+
afterResponse: `(response, context) => {
|
|
907
|
+
/**
|
|
908
|
+
* 用户可以直接编写函数,在原始接口返回之后,会运行该函数,将这个函数的返回值作为该数据源接口的返回
|
|
909
|
+
|
|
910
|
+
* context:上下文对象
|
|
911
|
+
*
|
|
912
|
+
* interface Content {
|
|
913
|
+
* app: AppCore;
|
|
914
|
+
* dataSource: HttpDataSource;
|
|
915
|
+
* }
|
|
916
|
+
*
|
|
917
|
+
*/
|
|
918
|
+
|
|
919
|
+
// 此处的返回值会作为这个接口的返回值
|
|
920
|
+
return response;
|
|
921
|
+
}`,
|
|
922
|
+
...values
|
|
923
|
+
};
|
|
924
|
+
};
|
|
844
925
|
const getDisplayField = (dataSources, key) => {
|
|
845
926
|
const displayState = [];
|
|
846
927
|
const matches = key.matchAll(/\$\{([\s\S]+?)\}/g);
|
|
@@ -1026,7 +1107,7 @@
|
|
|
1026
1107
|
this.get("configs")[type] = config;
|
|
1027
1108
|
}
|
|
1028
1109
|
getFormValue(type = "base") {
|
|
1029
|
-
return this.get("values")[type];
|
|
1110
|
+
return getFormValue(type, this.get("values")[type]);
|
|
1030
1111
|
}
|
|
1031
1112
|
setFormValue(type, value) {
|
|
1032
1113
|
this.get("values")[type] = value;
|
|
@@ -2883,7 +2964,7 @@
|
|
|
2883
2964
|
return newNode;
|
|
2884
2965
|
};
|
|
2885
2966
|
|
|
2886
|
-
const _sfc_main$
|
|
2967
|
+
const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
|
|
2887
2968
|
...{
|
|
2888
2969
|
name: "MEditorCodeParams"
|
|
2889
2970
|
},
|
|
@@ -2932,8 +3013,8 @@
|
|
|
2932
3013
|
}
|
|
2933
3014
|
});
|
|
2934
3015
|
|
|
2935
|
-
const _hoisted_1$
|
|
2936
|
-
const _sfc_main$
|
|
3016
|
+
const _hoisted_1$v = ["src"];
|
|
3017
|
+
const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
|
|
2937
3018
|
...{
|
|
2938
3019
|
name: "MEditorIcon"
|
|
2939
3020
|
},
|
|
@@ -2957,7 +3038,7 @@
|
|
|
2957
3038
|
class: "magic-editor-icon"
|
|
2958
3039
|
}, {
|
|
2959
3040
|
default: vue.withCtx(() => [
|
|
2960
|
-
vue.createElementVNode("img", { src: _ctx.icon }, null, 8, _hoisted_1$
|
|
3041
|
+
vue.createElementVNode("img", { src: _ctx.icon }, null, 8, _hoisted_1$v)
|
|
2961
3042
|
]),
|
|
2962
3043
|
_: 1
|
|
2963
3044
|
})) : typeof _ctx.icon === "string" ? (vue.openBlock(), vue.createElementBlock("i", {
|
|
@@ -3034,9 +3115,9 @@
|
|
|
3034
3115
|
};
|
|
3035
3116
|
};
|
|
3036
3117
|
|
|
3037
|
-
const _hoisted_1$
|
|
3118
|
+
const _hoisted_1$u = { class: "m-fields-code-select-col" };
|
|
3038
3119
|
const _hoisted_2$o = { class: "code-select-container" };
|
|
3039
|
-
const _sfc_main$
|
|
3120
|
+
const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
3040
3121
|
...{
|
|
3041
3122
|
name: "MEditorCodeSelectCol"
|
|
3042
3123
|
},
|
|
@@ -3108,7 +3189,7 @@
|
|
|
3108
3189
|
const { codeBlockEditor, codeConfig, editCode, submitCodeBlockHandler } = useCodeBlockEdit(services?.codeBlockService);
|
|
3109
3190
|
return (_ctx, _cache) => {
|
|
3110
3191
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
3111
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
3192
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$u, [
|
|
3112
3193
|
vue.createElementVNode("div", _hoisted_2$o, [
|
|
3113
3194
|
vue.createVNode(_component_m_form_container, {
|
|
3114
3195
|
class: "select",
|
|
@@ -3117,14 +3198,14 @@
|
|
|
3117
3198
|
size: _ctx.size,
|
|
3118
3199
|
onChange: onParamsChangeHandler
|
|
3119
3200
|
}, null, 8, ["model", "size"]),
|
|
3120
|
-
_ctx.model[_ctx.name] ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3201
|
+
_ctx.model[_ctx.name] ? (vue.openBlock(), vue.createBlock(_sfc_main$N, {
|
|
3121
3202
|
key: 0,
|
|
3122
3203
|
class: "icon",
|
|
3123
3204
|
icon: !_ctx.disabled ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
|
|
3124
3205
|
onClick: _cache[0] || (_cache[0] = ($event) => vue.unref(editCode)(_ctx.model[_ctx.name]))
|
|
3125
3206
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true)
|
|
3126
3207
|
]),
|
|
3127
|
-
paramsConfig.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3208
|
+
paramsConfig.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$O, {
|
|
3128
3209
|
key: 0,
|
|
3129
3210
|
name: "params",
|
|
3130
3211
|
model: _ctx.model,
|
|
@@ -3132,7 +3213,7 @@
|
|
|
3132
3213
|
"params-config": paramsConfig.value,
|
|
3133
3214
|
onChange: onParamsChangeHandler
|
|
3134
3215
|
}, null, 8, ["model", "size", "params-config"])) : vue.createCommentVNode("", true),
|
|
3135
|
-
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3216
|
+
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$P, {
|
|
3136
3217
|
key: 1,
|
|
3137
3218
|
ref_key: "codeBlockEditor",
|
|
3138
3219
|
ref: codeBlockEditor,
|
|
@@ -3145,9 +3226,9 @@
|
|
|
3145
3226
|
}
|
|
3146
3227
|
});
|
|
3147
3228
|
|
|
3148
|
-
const _hoisted_1$
|
|
3229
|
+
const _hoisted_1$t = { class: "m-editor-data-source-fields" };
|
|
3149
3230
|
const _hoisted_2$n = { class: "m-editor-data-source-fields-footer" };
|
|
3150
|
-
const _sfc_main$
|
|
3231
|
+
const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
|
|
3151
3232
|
...{
|
|
3152
3233
|
name: "MEditorDataSourceFields"
|
|
3153
3234
|
},
|
|
@@ -3378,7 +3459,7 @@
|
|
|
3378
3459
|
}
|
|
3379
3460
|
};
|
|
3380
3461
|
return (_ctx, _cache) => {
|
|
3381
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
3462
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$t, [
|
|
3382
3463
|
vue.createVNode(vue.unref(table.MagicTable), {
|
|
3383
3464
|
data: _ctx.model[_ctx.name],
|
|
3384
3465
|
columns: fieldColumns
|
|
@@ -3435,7 +3516,7 @@
|
|
|
3435
3516
|
}
|
|
3436
3517
|
});
|
|
3437
3518
|
|
|
3438
|
-
const _sfc_main$
|
|
3519
|
+
const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
|
|
3439
3520
|
__name: "DataSourceFieldSelect",
|
|
3440
3521
|
props: {
|
|
3441
3522
|
config: {},
|
|
@@ -3489,10 +3570,10 @@
|
|
|
3489
3570
|
}
|
|
3490
3571
|
});
|
|
3491
3572
|
|
|
3492
|
-
const _hoisted_1$
|
|
3573
|
+
const _hoisted_1$s = { style: { "display": "flex", "flex-direction": "column", "line-height": "1.2em" } };
|
|
3493
3574
|
const _hoisted_2$m = { style: { "font-size": "10px", "color": "rgba(0, 0, 0, 0.6)" } };
|
|
3494
3575
|
const _hoisted_3$a = { class: "el-input__inner" };
|
|
3495
|
-
const _sfc_main$
|
|
3576
|
+
const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
|
|
3496
3577
|
...{
|
|
3497
3578
|
name: "MEditorDataSourceInput"
|
|
3498
3579
|
},
|
|
@@ -3681,10 +3762,10 @@
|
|
|
3681
3762
|
}
|
|
3682
3763
|
), {
|
|
3683
3764
|
suffix: vue.withCtx(() => [
|
|
3684
|
-
vue.createVNode(_sfc_main$
|
|
3765
|
+
vue.createVNode(_sfc_main$N, { icon: vue.unref(iconsVue.Coin) }, null, 8, ["icon"])
|
|
3685
3766
|
]),
|
|
3686
3767
|
default: vue.withCtx(({ item }) => [
|
|
3687
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
3768
|
+
vue.createElementVNode("div", _hoisted_1$s, [
|
|
3688
3769
|
vue.createElementVNode("div", null, vue.toDisplayString(item.text), 1),
|
|
3689
3770
|
vue.createElementVNode("span", _hoisted_2$m, vue.toDisplayString(item.value), 1)
|
|
3690
3771
|
])
|
|
@@ -3716,7 +3797,7 @@
|
|
|
3716
3797
|
}, 1032, ["size"])) : vue.createCommentVNode("", true)
|
|
3717
3798
|
], 64);
|
|
3718
3799
|
}), 256)),
|
|
3719
|
-
vue.createVNode(_sfc_main$
|
|
3800
|
+
vue.createVNode(_sfc_main$N, {
|
|
3720
3801
|
class: "tmagic-data-source-input-icon",
|
|
3721
3802
|
icon: vue.unref(iconsVue.Coin)
|
|
3722
3803
|
}, null, 8, ["icon"])
|
|
@@ -3799,9 +3880,9 @@
|
|
|
3799
3880
|
};
|
|
3800
3881
|
};
|
|
3801
3882
|
|
|
3802
|
-
const _hoisted_1$
|
|
3883
|
+
const _hoisted_1$r = { class: "m-editor-data-source-methods" };
|
|
3803
3884
|
const _hoisted_2$l = { class: "m-editor-data-source-methods-footer" };
|
|
3804
|
-
const _sfc_main$
|
|
3885
|
+
const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
|
|
3805
3886
|
...{
|
|
3806
3887
|
name: "MEditorDataSourceMethods"
|
|
3807
3888
|
},
|
|
@@ -3870,7 +3951,7 @@
|
|
|
3870
3951
|
emit("change", props.model[props.name]);
|
|
3871
3952
|
};
|
|
3872
3953
|
return (_ctx, _cache) => {
|
|
3873
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
3954
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$r, [
|
|
3874
3955
|
vue.createVNode(vue.unref(table.MagicTable), {
|
|
3875
3956
|
data: _ctx.model[_ctx.name],
|
|
3876
3957
|
columns: methodColumns
|
|
@@ -3889,7 +3970,7 @@
|
|
|
3889
3970
|
_: 1
|
|
3890
3971
|
}, 8, ["disabled"])
|
|
3891
3972
|
]),
|
|
3892
|
-
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3973
|
+
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$P, {
|
|
3893
3974
|
key: 0,
|
|
3894
3975
|
ref_key: "codeBlockEditor",
|
|
3895
3976
|
ref: codeBlockEditor,
|
|
@@ -3904,9 +3985,9 @@
|
|
|
3904
3985
|
}
|
|
3905
3986
|
});
|
|
3906
3987
|
|
|
3907
|
-
const _hoisted_1$
|
|
3988
|
+
const _hoisted_1$q = { class: "m-fields-data-source-method-select" };
|
|
3908
3989
|
const _hoisted_2$k = { class: "data-source-method-select-container" };
|
|
3909
|
-
const _sfc_main$
|
|
3990
|
+
const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
|
|
3910
3991
|
...{
|
|
3911
3992
|
name: "MEditorDataSourceMethodSelect"
|
|
3912
3993
|
},
|
|
@@ -3988,7 +4069,7 @@
|
|
|
3988
4069
|
};
|
|
3989
4070
|
return (_ctx, _cache) => {
|
|
3990
4071
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
3991
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
4072
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$q, [
|
|
3992
4073
|
vue.createElementVNode("div", _hoisted_2$k, [
|
|
3993
4074
|
vue.createVNode(_component_m_form_container, {
|
|
3994
4075
|
class: "select",
|
|
@@ -3996,14 +4077,14 @@
|
|
|
3996
4077
|
model: _ctx.model,
|
|
3997
4078
|
onChange: onChangeHandler
|
|
3998
4079
|
}, null, 8, ["config", "model"]),
|
|
3999
|
-
_ctx.model[_ctx.name] ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
4080
|
+
_ctx.model[_ctx.name] ? (vue.openBlock(), vue.createBlock(_sfc_main$N, {
|
|
4000
4081
|
key: 0,
|
|
4001
4082
|
class: "icon",
|
|
4002
4083
|
icon: !_ctx.disabled ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
|
|
4003
4084
|
onClick: editCodeHandler
|
|
4004
4085
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true)
|
|
4005
4086
|
]),
|
|
4006
|
-
paramsConfig.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
4087
|
+
paramsConfig.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$O, {
|
|
4007
4088
|
key: 0,
|
|
4008
4089
|
name: "params",
|
|
4009
4090
|
model: _ctx.model,
|
|
@@ -4012,7 +4093,7 @@
|
|
|
4012
4093
|
"params-config": paramsConfig.value,
|
|
4013
4094
|
onChange: onChangeHandler
|
|
4014
4095
|
}, null, 8, ["model", "size", "disabled", "params-config"])) : vue.createCommentVNode("", true),
|
|
4015
|
-
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
4096
|
+
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$P, {
|
|
4016
4097
|
key: 1,
|
|
4017
4098
|
ref_key: "codeBlockEditor",
|
|
4018
4099
|
ref: codeBlockEditor,
|
|
@@ -4025,9 +4106,9 @@
|
|
|
4025
4106
|
}
|
|
4026
4107
|
});
|
|
4027
4108
|
|
|
4028
|
-
const _hoisted_1$
|
|
4109
|
+
const _hoisted_1$p = { class: "m-editor-data-source-fields" };
|
|
4029
4110
|
const _hoisted_2$j = { class: "m-editor-data-source-fields-footer" };
|
|
4030
|
-
const _sfc_main$
|
|
4111
|
+
const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
|
|
4031
4112
|
...{
|
|
4032
4113
|
name: "MEditorDataSourceMocks"
|
|
4033
4114
|
},
|
|
@@ -4113,7 +4194,7 @@
|
|
|
4113
4194
|
const columns = [
|
|
4114
4195
|
{
|
|
4115
4196
|
type: "expand",
|
|
4116
|
-
component: _sfc_main$
|
|
4197
|
+
component: _sfc_main$T,
|
|
4117
4198
|
props: (row) => ({
|
|
4118
4199
|
initValues: row.data,
|
|
4119
4200
|
language: "json",
|
|
@@ -4222,7 +4303,7 @@
|
|
|
4222
4303
|
});
|
|
4223
4304
|
};
|
|
4224
4305
|
return (_ctx, _cache) => {
|
|
4225
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
4306
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$p, [
|
|
4226
4307
|
vue.createVNode(vue.unref(table.MagicTable), {
|
|
4227
4308
|
data: _ctx.model[_ctx.name],
|
|
4228
4309
|
columns
|
|
@@ -4258,7 +4339,7 @@
|
|
|
4258
4339
|
}
|
|
4259
4340
|
});
|
|
4260
4341
|
|
|
4261
|
-
const _sfc_main$
|
|
4342
|
+
const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
4262
4343
|
...{
|
|
4263
4344
|
name: "MEditorDataSourceSelect"
|
|
4264
4345
|
},
|
|
@@ -4313,12 +4394,12 @@
|
|
|
4313
4394
|
}
|
|
4314
4395
|
});
|
|
4315
4396
|
|
|
4316
|
-
const _hoisted_1$
|
|
4397
|
+
const _hoisted_1$o = { class: "m-fields-event-select" };
|
|
4317
4398
|
const _hoisted_2$i = {
|
|
4318
4399
|
key: 1,
|
|
4319
4400
|
class: "fullWidth"
|
|
4320
4401
|
};
|
|
4321
|
-
const _sfc_main$
|
|
4402
|
+
const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
4322
4403
|
...{
|
|
4323
4404
|
name: "MEditorEventSelect"
|
|
4324
4405
|
},
|
|
@@ -4520,7 +4601,7 @@
|
|
|
4520
4601
|
const _component_m_form_table = vue.resolveComponent("m-form-table");
|
|
4521
4602
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
4522
4603
|
const _component_m_form_panel = vue.resolveComponent("m-form-panel");
|
|
4523
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
4604
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$o, [
|
|
4524
4605
|
isOldVersion.value ? (vue.openBlock(), vue.createBlock(_component_m_form_table, {
|
|
4525
4606
|
key: 0,
|
|
4526
4607
|
ref: "eventForm",
|
|
@@ -4580,9 +4661,9 @@
|
|
|
4580
4661
|
}
|
|
4581
4662
|
});
|
|
4582
4663
|
|
|
4583
|
-
const _hoisted_1$
|
|
4664
|
+
const _hoisted_1$n = { class: "m-fields-key-value" };
|
|
4584
4665
|
const _hoisted_2$h = /* @__PURE__ */ vue.createElementVNode("span", { class: "m-fileds-key-value-delimiter" }, ":", -1);
|
|
4585
|
-
const _sfc_main$
|
|
4666
|
+
const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
4586
4667
|
...{
|
|
4587
4668
|
name: "MEditorKeyValue"
|
|
4588
4669
|
},
|
|
@@ -4625,9 +4706,10 @@
|
|
|
4625
4706
|
};
|
|
4626
4707
|
const deleteHandler = (index) => {
|
|
4627
4708
|
records.value.splice(index, 1);
|
|
4709
|
+
emit("change", getValue());
|
|
4628
4710
|
};
|
|
4629
4711
|
return (_ctx, _cache) => {
|
|
4630
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
4712
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$n, [
|
|
4631
4713
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(records.value, (item, index) => {
|
|
4632
4714
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
4633
4715
|
class: "m-fields-key-value-item",
|
|
@@ -4680,12 +4762,12 @@
|
|
|
4680
4762
|
}
|
|
4681
4763
|
});
|
|
4682
4764
|
|
|
4683
|
-
const _hoisted_1$
|
|
4765
|
+
const _hoisted_1$m = {
|
|
4684
4766
|
key: 1,
|
|
4685
4767
|
class: "m-fields-ui-select",
|
|
4686
4768
|
style: { "display": "flex" }
|
|
4687
4769
|
};
|
|
4688
|
-
const _sfc_main$
|
|
4770
|
+
const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
4689
4771
|
...{
|
|
4690
4772
|
name: "MEditorUISelect"
|
|
4691
4773
|
},
|
|
@@ -4774,7 +4856,7 @@
|
|
|
4774
4856
|
]),
|
|
4775
4857
|
_: 1
|
|
4776
4858
|
}, 8, ["icon", "disabled", "size"])
|
|
4777
|
-
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
4859
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$m, [
|
|
4778
4860
|
val.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
4779
4861
|
vue.createVNode(vue.unref(design.TMagicTooltip), {
|
|
4780
4862
|
content: "清除",
|
|
@@ -4871,7 +4953,7 @@
|
|
|
4871
4953
|
};
|
|
4872
4954
|
};
|
|
4873
4955
|
|
|
4874
|
-
const _sfc_main$
|
|
4956
|
+
const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
|
|
4875
4957
|
...{
|
|
4876
4958
|
name: "MEditorResizer"
|
|
4877
4959
|
},
|
|
@@ -4892,7 +4974,7 @@
|
|
|
4892
4974
|
}
|
|
4893
4975
|
});
|
|
4894
4976
|
|
|
4895
|
-
const _sfc_main$
|
|
4977
|
+
const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
|
|
4896
4978
|
...{
|
|
4897
4979
|
name: "MEditorLayout"
|
|
4898
4980
|
},
|
|
@@ -5004,7 +5086,7 @@
|
|
|
5004
5086
|
}, [
|
|
5005
5087
|
vue.renderSlot(_ctx.$slots, "left")
|
|
5006
5088
|
], 6),
|
|
5007
|
-
vue.createVNode(_sfc_main$
|
|
5089
|
+
vue.createVNode(_sfc_main$B, { onChange: changeLeft })
|
|
5008
5090
|
], 64)) : vue.createCommentVNode("", true),
|
|
5009
5091
|
vue.createElementVNode("div", {
|
|
5010
5092
|
class: vue.normalizeClass(["m-editor-layout-center", _ctx.centerClass]),
|
|
@@ -5013,7 +5095,7 @@
|
|
|
5013
5095
|
vue.renderSlot(_ctx.$slots, "center")
|
|
5014
5096
|
], 6),
|
|
5015
5097
|
hasRight.value && _ctx.$slots.right ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
5016
|
-
vue.createVNode(_sfc_main$
|
|
5098
|
+
vue.createVNode(_sfc_main$B, { onChange: changeRight }),
|
|
5017
5099
|
vue.createElementVNode("div", {
|
|
5018
5100
|
class: vue.normalizeClass(["m-editor-layout-right", _ctx.rightClass]),
|
|
5019
5101
|
style: vue.normalizeStyle(`width: ${_ctx.right}px`)
|
|
@@ -5026,10 +5108,10 @@
|
|
|
5026
5108
|
}
|
|
5027
5109
|
});
|
|
5028
5110
|
|
|
5029
|
-
const _hoisted_1$
|
|
5111
|
+
const _hoisted_1$l = { class: "m-editor-empty-panel" };
|
|
5030
5112
|
const _hoisted_2$g = { class: "m-editor-empty-content" };
|
|
5031
5113
|
const _hoisted_3$9 = /* @__PURE__ */ vue.createElementVNode("p", null, "新增页面", -1);
|
|
5032
|
-
const _sfc_main$
|
|
5114
|
+
const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
|
|
5033
5115
|
...{
|
|
5034
5116
|
name: "MEditorAddPageBox"
|
|
5035
5117
|
},
|
|
@@ -5049,14 +5131,14 @@
|
|
|
5049
5131
|
});
|
|
5050
5132
|
};
|
|
5051
5133
|
return (_ctx, _cache) => {
|
|
5052
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
5134
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$l, [
|
|
5053
5135
|
vue.createElementVNode("div", _hoisted_2$g, [
|
|
5054
5136
|
vue.createElementVNode("div", {
|
|
5055
5137
|
class: "m-editor-empty-button",
|
|
5056
5138
|
onClick: clickHandler
|
|
5057
5139
|
}, [
|
|
5058
5140
|
vue.createElementVNode("div", null, [
|
|
5059
|
-
vue.createVNode(_sfc_main$
|
|
5141
|
+
vue.createVNode(_sfc_main$N, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
|
|
5060
5142
|
]),
|
|
5061
5143
|
_hoisted_3$9
|
|
5062
5144
|
])
|
|
@@ -5070,7 +5152,7 @@
|
|
|
5070
5152
|
const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
|
|
5071
5153
|
const LEFT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorLeftColumnWidthData";
|
|
5072
5154
|
const RIGHT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorRightColumnWidthData";
|
|
5073
|
-
const _sfc_main$
|
|
5155
|
+
const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
5074
5156
|
...{
|
|
5075
5157
|
name: "MEditorFramework"
|
|
5076
5158
|
},
|
|
@@ -5147,13 +5229,13 @@
|
|
|
5147
5229
|
vue.renderSlot(_ctx.$slots, "nav"),
|
|
5148
5230
|
vue.renderSlot(_ctx.$slots, "content-before"),
|
|
5149
5231
|
showSrc.value ? vue.renderSlot(_ctx.$slots, "src-code", { key: 0 }, () => [
|
|
5150
|
-
vue.createVNode(_sfc_main$
|
|
5232
|
+
vue.createVNode(_sfc_main$T, {
|
|
5151
5233
|
class: "m-editor-content",
|
|
5152
5234
|
"init-values": root.value,
|
|
5153
5235
|
options: vue.unref(codeOptions),
|
|
5154
5236
|
onSave: saveCode
|
|
5155
5237
|
}, null, 8, ["init-values", "options"])
|
|
5156
|
-
]) : (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5238
|
+
]) : (vue.openBlock(), vue.createBlock(_sfc_main$A, {
|
|
5157
5239
|
key: 1,
|
|
5158
5240
|
class: "m-editor-content",
|
|
5159
5241
|
"left-class": "m-editor-framework-left",
|
|
@@ -5172,7 +5254,7 @@
|
|
|
5172
5254
|
]),
|
|
5173
5255
|
center: vue.withCtx(() => [
|
|
5174
5256
|
pageLength.value > 0 ? vue.renderSlot(_ctx.$slots, "workspace", { key: 0 }) : vue.renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
|
|
5175
|
-
vue.createVNode(_sfc_main$
|
|
5257
|
+
vue.createVNode(_sfc_main$z)
|
|
5176
5258
|
])
|
|
5177
5259
|
]),
|
|
5178
5260
|
_: 2
|
|
@@ -5197,12 +5279,12 @@
|
|
|
5197
5279
|
}
|
|
5198
5280
|
});
|
|
5199
5281
|
|
|
5200
|
-
const _hoisted_1$
|
|
5282
|
+
const _hoisted_1$k = {
|
|
5201
5283
|
key: 1,
|
|
5202
5284
|
class: "menu-item-text"
|
|
5203
5285
|
};
|
|
5204
5286
|
const _hoisted_2$f = { class: "el-dropdown-link menubar-menu-button" };
|
|
5205
|
-
const _sfc_main$
|
|
5287
|
+
const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
|
|
5206
5288
|
...{
|
|
5207
5289
|
name: "MEditorToolButton"
|
|
5208
5290
|
},
|
|
@@ -5281,7 +5363,7 @@
|
|
|
5281
5363
|
_ctx.data.type === "divider" ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicDivider), {
|
|
5282
5364
|
key: 0,
|
|
5283
5365
|
direction: _ctx.data.direction || "vertical"
|
|
5284
|
-
}, null, 8, ["direction"])) : _ctx.data.type === "text" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
5366
|
+
}, null, 8, ["direction"])) : _ctx.data.type === "text" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$k, vue.toDisplayString(_ctx.data.text), 1)) : _ctx.data.type === "button" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
5285
5367
|
_ctx.data.tooltip ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTooltip), {
|
|
5286
5368
|
key: 0,
|
|
5287
5369
|
effect: "dark",
|
|
@@ -5295,7 +5377,7 @@
|
|
|
5295
5377
|
disabled: disabled.value
|
|
5296
5378
|
}, {
|
|
5297
5379
|
default: vue.withCtx(() => [
|
|
5298
|
-
_ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5380
|
+
_ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$N, {
|
|
5299
5381
|
key: 0,
|
|
5300
5382
|
icon: _ctx.data.icon
|
|
5301
5383
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
@@ -5313,7 +5395,7 @@
|
|
|
5313
5395
|
title: _ctx.data.text
|
|
5314
5396
|
}, {
|
|
5315
5397
|
default: vue.withCtx(() => [
|
|
5316
|
-
_ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5398
|
+
_ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$N, {
|
|
5317
5399
|
key: 0,
|
|
5318
5400
|
icon: _ctx.data.icon
|
|
5319
5401
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
@@ -5363,7 +5445,7 @@
|
|
|
5363
5445
|
}
|
|
5364
5446
|
});
|
|
5365
5447
|
|
|
5366
|
-
const _sfc_main$
|
|
5448
|
+
const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
|
|
5367
5449
|
...{
|
|
5368
5450
|
name: "MEditorNavMenu"
|
|
5369
5451
|
},
|
|
@@ -5525,7 +5607,7 @@
|
|
|
5525
5607
|
style: vue.normalizeStyle(`width: ${columnWidth.value?.[key]}px`)
|
|
5526
5608
|
}, [
|
|
5527
5609
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(buttons.value[key], (item, index) => {
|
|
5528
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5610
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
5529
5611
|
data: item,
|
|
5530
5612
|
key: index
|
|
5531
5613
|
}, null, 8, ["data"]);
|
|
@@ -5537,8 +5619,8 @@
|
|
|
5537
5619
|
}
|
|
5538
5620
|
});
|
|
5539
5621
|
|
|
5540
|
-
const _hoisted_1$
|
|
5541
|
-
const _sfc_main$
|
|
5622
|
+
const _hoisted_1$j = { class: "m-editor-props-panel" };
|
|
5623
|
+
const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
5542
5624
|
...{
|
|
5543
5625
|
name: "MEditorPropsPanel"
|
|
5544
5626
|
},
|
|
@@ -5591,7 +5673,7 @@
|
|
|
5591
5673
|
};
|
|
5592
5674
|
__expose({ configForm, submit });
|
|
5593
5675
|
return (_ctx, _cache) => {
|
|
5594
|
-
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
5676
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_1$j, [
|
|
5595
5677
|
vue.renderSlot(_ctx.$slots, "props-panel-header"),
|
|
5596
5678
|
vue.createVNode(vue.unref(form.MForm), {
|
|
5597
5679
|
ref_key: "configForm",
|
|
@@ -5611,7 +5693,7 @@
|
|
|
5611
5693
|
}
|
|
5612
5694
|
});
|
|
5613
5695
|
|
|
5614
|
-
const _sfc_main$
|
|
5696
|
+
const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
5615
5697
|
...{
|
|
5616
5698
|
name: "MEditorSearchInput"
|
|
5617
5699
|
},
|
|
@@ -5650,7 +5732,7 @@
|
|
|
5650
5732
|
}
|
|
5651
5733
|
});
|
|
5652
5734
|
|
|
5653
|
-
const _hoisted_1$
|
|
5735
|
+
const _hoisted_1$i = { xmlns: "http://www.w3.org/2000/svg" };
|
|
5654
5736
|
const _hoisted_2$e = /* @__PURE__ */ vue.createElementVNode("g", {
|
|
5655
5737
|
fill: "#7C878E",
|
|
5656
5738
|
"fill-rule": "evenodd"
|
|
@@ -5664,19 +5746,19 @@
|
|
|
5664
5746
|
const _hoisted_3$8 = [
|
|
5665
5747
|
_hoisted_2$e
|
|
5666
5748
|
];
|
|
5667
|
-
const _sfc_main$
|
|
5749
|
+
const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
5668
5750
|
...{
|
|
5669
5751
|
name: "MEditorAppManageIcon"
|
|
5670
5752
|
},
|
|
5671
5753
|
__name: "AppManageIcon",
|
|
5672
5754
|
setup(__props) {
|
|
5673
5755
|
return (_ctx, _cache) => {
|
|
5674
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
5756
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$i, _hoisted_3$8);
|
|
5675
5757
|
};
|
|
5676
5758
|
}
|
|
5677
5759
|
});
|
|
5678
5760
|
|
|
5679
|
-
const _hoisted_1$
|
|
5761
|
+
const _hoisted_1$h = {
|
|
5680
5762
|
viewBox: "0 0 32 32",
|
|
5681
5763
|
version: "1.1",
|
|
5682
5764
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5686,25 +5768,25 @@
|
|
|
5686
5768
|
const _hoisted_4$6 = [
|
|
5687
5769
|
_hoisted_2$d
|
|
5688
5770
|
];
|
|
5689
|
-
const _sfc_main$
|
|
5771
|
+
const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
5690
5772
|
...{
|
|
5691
5773
|
name: "MEditorCodeIcon"
|
|
5692
5774
|
},
|
|
5693
5775
|
__name: "CodeIcon",
|
|
5694
5776
|
setup(__props) {
|
|
5695
5777
|
return (_ctx, _cache) => {
|
|
5696
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
5778
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$h, _hoisted_4$6);
|
|
5697
5779
|
};
|
|
5698
5780
|
}
|
|
5699
5781
|
});
|
|
5700
5782
|
|
|
5701
|
-
const _hoisted_1$
|
|
5783
|
+
const _hoisted_1$g = ["id"];
|
|
5702
5784
|
const _hoisted_2$c = { class: "list-item" };
|
|
5703
5785
|
const _hoisted_3$7 = {
|
|
5704
5786
|
key: 2,
|
|
5705
5787
|
class: "right-tool"
|
|
5706
5788
|
};
|
|
5707
|
-
const _sfc_main$
|
|
5789
|
+
const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
5708
5790
|
...{
|
|
5709
5791
|
name: "MEditorCodeBlockList"
|
|
5710
5792
|
},
|
|
@@ -5806,11 +5888,11 @@
|
|
|
5806
5888
|
class: "list-container"
|
|
5807
5889
|
}, [
|
|
5808
5890
|
vue.createElementVNode("div", _hoisted_2$c, [
|
|
5809
|
-
data.type === "code" ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5891
|
+
data.type === "code" ? (vue.openBlock(), vue.createBlock(_sfc_main$s, {
|
|
5810
5892
|
key: 0,
|
|
5811
5893
|
class: "codeIcon"
|
|
5812
5894
|
})) : vue.createCommentVNode("", true),
|
|
5813
|
-
data.type === "node" ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5895
|
+
data.type === "node" ? (vue.openBlock(), vue.createBlock(_sfc_main$t, {
|
|
5814
5896
|
key: 1,
|
|
5815
5897
|
class: "compIcon"
|
|
5816
5898
|
})) : vue.createCommentVNode("", true),
|
|
@@ -5824,7 +5906,7 @@
|
|
|
5824
5906
|
placement: "bottom"
|
|
5825
5907
|
}, {
|
|
5826
5908
|
default: vue.withCtx(() => [
|
|
5827
|
-
vue.createVNode(_sfc_main$
|
|
5909
|
+
vue.createVNode(_sfc_main$N, {
|
|
5828
5910
|
icon: editable.value ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
|
|
5829
5911
|
class: "edit-icon",
|
|
5830
5912
|
onClick: vue.withModifiers(($event) => editCode(data.id), ["stop"])
|
|
@@ -5839,7 +5921,7 @@
|
|
|
5839
5921
|
placement: "bottom"
|
|
5840
5922
|
}, {
|
|
5841
5923
|
default: vue.withCtx(() => [
|
|
5842
|
-
vue.createVNode(_sfc_main$
|
|
5924
|
+
vue.createVNode(_sfc_main$N, {
|
|
5843
5925
|
icon: vue.unref(iconsVue.Close),
|
|
5844
5926
|
class: "edit-icon",
|
|
5845
5927
|
onClick: vue.withModifiers(($event) => deleteCode(`${data.id}`), ["stop"])
|
|
@@ -5853,7 +5935,7 @@
|
|
|
5853
5935
|
})
|
|
5854
5936
|
])) : vue.createCommentVNode("", true)
|
|
5855
5937
|
])
|
|
5856
|
-
], 8, _hoisted_1$
|
|
5938
|
+
], 8, _hoisted_1$g)
|
|
5857
5939
|
]),
|
|
5858
5940
|
_: 3
|
|
5859
5941
|
}, 8, ["default-expanded-keys", "data"]);
|
|
@@ -5861,8 +5943,8 @@
|
|
|
5861
5943
|
}
|
|
5862
5944
|
});
|
|
5863
5945
|
|
|
5864
|
-
const _hoisted_1$
|
|
5865
|
-
const _sfc_main$
|
|
5946
|
+
const _hoisted_1$f = { class: "search-wrapper" };
|
|
5947
|
+
const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
5866
5948
|
...{
|
|
5867
5949
|
name: "MEditorCodeBlockListPanel"
|
|
5868
5950
|
},
|
|
@@ -5882,8 +5964,8 @@
|
|
|
5882
5964
|
return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicScrollbar), { class: "m-editor-code-block-list m-editor-dep-list-panel" }, {
|
|
5883
5965
|
default: vue.withCtx(() => [
|
|
5884
5966
|
vue.renderSlot(_ctx.$slots, "code-block-panel-header", {}, () => [
|
|
5885
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
5886
|
-
vue.createVNode(_sfc_main$
|
|
5967
|
+
vue.createElementVNode("div", _hoisted_1$f, [
|
|
5968
|
+
vue.createVNode(_sfc_main$u, { onSearch: filterTextChangeHandler }),
|
|
5887
5969
|
editable.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
|
|
5888
5970
|
key: 0,
|
|
5889
5971
|
class: "create-code-button",
|
|
@@ -5899,7 +5981,7 @@
|
|
|
5899
5981
|
vue.renderSlot(_ctx.$slots, "code-block-panel-search")
|
|
5900
5982
|
])
|
|
5901
5983
|
]),
|
|
5902
|
-
vue.createVNode(_sfc_main$
|
|
5984
|
+
vue.createVNode(_sfc_main$r, {
|
|
5903
5985
|
ref_key: "codeBlockList",
|
|
5904
5986
|
ref: codeBlockList,
|
|
5905
5987
|
"custom-error": _ctx.customError,
|
|
@@ -5914,7 +5996,7 @@
|
|
|
5914
5996
|
]),
|
|
5915
5997
|
_: 3
|
|
5916
5998
|
}, 8, ["custom-error", "onEdit", "onRemove"]),
|
|
5917
|
-
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5999
|
+
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$P, {
|
|
5918
6000
|
key: 0,
|
|
5919
6001
|
ref_key: "codeBlockEditor",
|
|
5920
6002
|
ref: codeBlockEditor,
|
|
@@ -5929,7 +6011,7 @@
|
|
|
5929
6011
|
}
|
|
5930
6012
|
});
|
|
5931
6013
|
|
|
5932
|
-
const _sfc_main$
|
|
6014
|
+
const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
5933
6015
|
...{
|
|
5934
6016
|
name: "MEditorDataSourceConfigPanel"
|
|
5935
6017
|
},
|
|
@@ -5983,13 +6065,13 @@
|
|
|
5983
6065
|
}
|
|
5984
6066
|
});
|
|
5985
6067
|
|
|
5986
|
-
const _hoisted_1$
|
|
6068
|
+
const _hoisted_1$e = ["id"];
|
|
5987
6069
|
const _hoisted_2$b = { class: "list-item" };
|
|
5988
6070
|
const _hoisted_3$6 = {
|
|
5989
6071
|
key: 2,
|
|
5990
6072
|
class: "right-tool"
|
|
5991
6073
|
};
|
|
5992
|
-
const _sfc_main$
|
|
6074
|
+
const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
5993
6075
|
...{
|
|
5994
6076
|
name: "MEditorDataSourceList"
|
|
5995
6077
|
},
|
|
@@ -6085,12 +6167,12 @@
|
|
|
6085
6167
|
class: "list-container"
|
|
6086
6168
|
}, [
|
|
6087
6169
|
vue.createElementVNode("div", _hoisted_2$b, [
|
|
6088
|
-
data.type === "code" ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
6170
|
+
data.type === "code" ? (vue.openBlock(), vue.createBlock(_sfc_main$N, {
|
|
6089
6171
|
key: 0,
|
|
6090
6172
|
class: "codeIcon",
|
|
6091
6173
|
icon: vue.unref(iconsVue.Coin)
|
|
6092
6174
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
6093
|
-
data.type === "node" ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
6175
|
+
data.type === "node" ? (vue.openBlock(), vue.createBlock(_sfc_main$N, {
|
|
6094
6176
|
key: 1,
|
|
6095
6177
|
class: "compIcon",
|
|
6096
6178
|
icon: vue.unref(iconsVue.Aim)
|
|
@@ -6105,7 +6187,7 @@
|
|
|
6105
6187
|
placement: "bottom"
|
|
6106
6188
|
}, {
|
|
6107
6189
|
default: vue.withCtx(() => [
|
|
6108
|
-
vue.createVNode(_sfc_main$
|
|
6190
|
+
vue.createVNode(_sfc_main$N, {
|
|
6109
6191
|
icon: editable.value ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
|
|
6110
6192
|
class: "edit-icon",
|
|
6111
6193
|
onClick: vue.withModifiers(($event) => editHandler(`${data.id}`), ["stop"])
|
|
@@ -6120,7 +6202,7 @@
|
|
|
6120
6202
|
placement: "bottom"
|
|
6121
6203
|
}, {
|
|
6122
6204
|
default: vue.withCtx(() => [
|
|
6123
|
-
vue.createVNode(_sfc_main$
|
|
6205
|
+
vue.createVNode(_sfc_main$N, {
|
|
6124
6206
|
icon: vue.unref(iconsVue.Close),
|
|
6125
6207
|
class: "edit-icon",
|
|
6126
6208
|
onClick: vue.withModifiers(($event) => removeHandler(`${data.id}`), ["stop"])
|
|
@@ -6128,13 +6210,10 @@
|
|
|
6128
6210
|
]),
|
|
6129
6211
|
_: 2
|
|
6130
6212
|
}, 1024)) : vue.createCommentVNode("", true),
|
|
6131
|
-
vue.renderSlot(_ctx.$slots, "data-source-panel-tool", {
|
|
6132
|
-
id: data.id,
|
|
6133
|
-
data: data.codeBlockContent
|
|
6134
|
-
})
|
|
6213
|
+
vue.renderSlot(_ctx.$slots, "data-source-panel-tool", { data })
|
|
6135
6214
|
])) : vue.createCommentVNode("", true)
|
|
6136
6215
|
])
|
|
6137
|
-
], 8, _hoisted_1$
|
|
6216
|
+
], 8, _hoisted_1$e)
|
|
6138
6217
|
]),
|
|
6139
6218
|
_: 3
|
|
6140
6219
|
}, 8, ["data"]);
|
|
@@ -6142,9 +6221,9 @@
|
|
|
6142
6221
|
}
|
|
6143
6222
|
});
|
|
6144
6223
|
|
|
6145
|
-
const _hoisted_1$
|
|
6224
|
+
const _hoisted_1$d = { class: "search-wrapper" };
|
|
6146
6225
|
const _hoisted_2$a = { class: "data-source-list-panel-add-menu" };
|
|
6147
|
-
const _sfc_main$
|
|
6226
|
+
const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
6148
6227
|
...{
|
|
6149
6228
|
name: "MEditorDataSourceListPanel"
|
|
6150
6229
|
},
|
|
@@ -6204,8 +6283,8 @@
|
|
|
6204
6283
|
return (_ctx, _cache) => {
|
|
6205
6284
|
return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicScrollbar), { class: "data-source-list-panel m-editor-dep-list-panel" }, {
|
|
6206
6285
|
default: vue.withCtx(() => [
|
|
6207
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
6208
|
-
vue.createVNode(_sfc_main$
|
|
6286
|
+
vue.createElementVNode("div", _hoisted_1$d, [
|
|
6287
|
+
vue.createVNode(_sfc_main$u, { onSearch: filterTextChangeHandler }),
|
|
6209
6288
|
editable.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicPopover), {
|
|
6210
6289
|
key: 0,
|
|
6211
6290
|
placement: "right"
|
|
@@ -6224,7 +6303,7 @@
|
|
|
6224
6303
|
default: vue.withCtx(() => [
|
|
6225
6304
|
vue.createElementVNode("div", _hoisted_2$a, [
|
|
6226
6305
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(datasourceTypeList.value, (item, index) => {
|
|
6227
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
6306
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
6228
6307
|
data: {
|
|
6229
6308
|
type: "button",
|
|
6230
6309
|
text: item.text,
|
|
@@ -6240,11 +6319,16 @@
|
|
|
6240
6319
|
_: 1
|
|
6241
6320
|
})) : vue.createCommentVNode("", true)
|
|
6242
6321
|
]),
|
|
6243
|
-
vue.createVNode(_sfc_main$
|
|
6322
|
+
vue.createVNode(_sfc_main$o, {
|
|
6244
6323
|
onEdit: editHandler,
|
|
6245
6324
|
onRemove: removeHandler
|
|
6325
|
+
}, {
|
|
6326
|
+
"data-source-panel-tool": vue.withCtx(({ data }) => [
|
|
6327
|
+
vue.renderSlot(_ctx.$slots, "data-source-panel-tool", { data })
|
|
6328
|
+
]),
|
|
6329
|
+
_: 3
|
|
6246
6330
|
}),
|
|
6247
|
-
vue.createVNode(_sfc_main$
|
|
6331
|
+
vue.createVNode(_sfc_main$p, {
|
|
6248
6332
|
ref_key: "editDialog",
|
|
6249
6333
|
ref: editDialog,
|
|
6250
6334
|
disabled: !editable.value,
|
|
@@ -6253,13 +6337,187 @@
|
|
|
6253
6337
|
onSubmit: submitDataSourceHandler
|
|
6254
6338
|
}, null, 8, ["disabled", "values", "title"])
|
|
6255
6339
|
]),
|
|
6256
|
-
_:
|
|
6340
|
+
_: 3
|
|
6257
6341
|
});
|
|
6258
6342
|
};
|
|
6259
6343
|
}
|
|
6260
6344
|
});
|
|
6261
6345
|
|
|
6346
|
+
const updateStatus = (nodeStatusMap, id, status) => {
|
|
6347
|
+
const nodeStatus = nodeStatusMap.get(id);
|
|
6348
|
+
if (!nodeStatus)
|
|
6349
|
+
return;
|
|
6350
|
+
utils.getKeys(status).forEach((key) => {
|
|
6351
|
+
if (nodeStatus[key] !== void 0 && status[key] !== void 0) {
|
|
6352
|
+
nodeStatus[key] = Boolean(status[key]);
|
|
6353
|
+
}
|
|
6354
|
+
});
|
|
6355
|
+
};
|
|
6356
|
+
|
|
6357
|
+
const _hoisted_1$c = ["draggable", "data-node-id", "data-is-container"];
|
|
6358
|
+
const _hoisted_2$9 = { class: "tree-node-label" };
|
|
6359
|
+
const _hoisted_3$5 = { class: "tree-node-tool" };
|
|
6360
|
+
const _hoisted_4$5 = {
|
|
6361
|
+
key: 0,
|
|
6362
|
+
class: "m-editor-tree-node-children"
|
|
6363
|
+
};
|
|
6364
|
+
const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
6365
|
+
...{
|
|
6366
|
+
name: "MEditorTreeNode"
|
|
6367
|
+
},
|
|
6368
|
+
__name: "TreeNode",
|
|
6369
|
+
props: {
|
|
6370
|
+
data: {},
|
|
6371
|
+
nodeStatusMap: {},
|
|
6372
|
+
indent: { default: 0 }
|
|
6373
|
+
},
|
|
6374
|
+
emits: ["node-dragstart", "node-dragleave", "node-dragend", "node-contextmenu", "node-mouseenter", "node-click"],
|
|
6375
|
+
setup(__props, { emit }) {
|
|
6376
|
+
const props = __props;
|
|
6377
|
+
const treeEmit = vue.inject("treeEmit");
|
|
6378
|
+
const nodeStatus = vue.computed(
|
|
6379
|
+
() => props.nodeStatusMap?.get(props.data.id) || {
|
|
6380
|
+
selected: false,
|
|
6381
|
+
expand: false,
|
|
6382
|
+
visible: false,
|
|
6383
|
+
draggable: false
|
|
6384
|
+
}
|
|
6385
|
+
);
|
|
6386
|
+
const expanded = vue.computed(() => nodeStatus.value.expand);
|
|
6387
|
+
const selected = vue.computed(() => nodeStatus.value.selected);
|
|
6388
|
+
const visible = vue.computed(() => nodeStatus.value.visible);
|
|
6389
|
+
const draggable = vue.computed(() => nodeStatus.value.draggable);
|
|
6390
|
+
const hasChilren = vue.computed(() => props.data.items && props.data.items.length > 0);
|
|
6391
|
+
const handleDragStart = (event) => {
|
|
6392
|
+
treeEmit?.("node-dragstart", event, props.data);
|
|
6393
|
+
};
|
|
6394
|
+
const handleDragLeave = (event) => {
|
|
6395
|
+
treeEmit?.("node-dragleave", event, props.data);
|
|
6396
|
+
};
|
|
6397
|
+
const handleDragEnd = (event) => {
|
|
6398
|
+
treeEmit?.("node-dragend", event, props.data);
|
|
6399
|
+
};
|
|
6400
|
+
const nodeContentmenuHandler = (event) => {
|
|
6401
|
+
treeEmit?.("node-contextmenu", event, props.data);
|
|
6402
|
+
};
|
|
6403
|
+
const mouseenterHandler = (event) => {
|
|
6404
|
+
treeEmit?.("node-mouseenter", event, props.data);
|
|
6405
|
+
};
|
|
6406
|
+
const expandHandler = () => {
|
|
6407
|
+
updateStatus(props.nodeStatusMap, props.data.id, {
|
|
6408
|
+
expand: !expanded.value
|
|
6409
|
+
});
|
|
6410
|
+
};
|
|
6411
|
+
const nodeClickHandler = (event) => {
|
|
6412
|
+
treeEmit?.("node-click", event, props.data);
|
|
6413
|
+
};
|
|
6414
|
+
return (_ctx, _cache) => {
|
|
6415
|
+
const _component_TreeNode = vue.resolveComponent("TreeNode", true);
|
|
6416
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
6417
|
+
class: "m-editor-tree-node",
|
|
6418
|
+
draggable: draggable.value,
|
|
6419
|
+
"data-node-id": _ctx.data.id,
|
|
6420
|
+
"data-is-container": Array.isArray(_ctx.data.items),
|
|
6421
|
+
onDragstart: handleDragStart,
|
|
6422
|
+
onDragleave: handleDragLeave,
|
|
6423
|
+
onDragend: handleDragEnd
|
|
6424
|
+
}, [
|
|
6425
|
+
vue.createElementVNode("div", {
|
|
6426
|
+
class: vue.normalizeClass(["tree-node", { selected: selected.value, expanded: expanded.value }]),
|
|
6427
|
+
style: vue.normalizeStyle(`padding-left: ${_ctx.indent}px`),
|
|
6428
|
+
onContextmenu: nodeContentmenuHandler,
|
|
6429
|
+
onMouseenter: mouseenterHandler
|
|
6430
|
+
}, [
|
|
6431
|
+
vue.createVNode(_sfc_main$N, {
|
|
6432
|
+
class: "expand-icon",
|
|
6433
|
+
style: vue.normalizeStyle(hasChilren.value ? "" : "color: transparent; cursor: default"),
|
|
6434
|
+
icon: expanded.value ? vue.unref(iconsVue.ArrowDown) : vue.unref(iconsVue.ArrowRight),
|
|
6435
|
+
onClick: expandHandler
|
|
6436
|
+
}, null, 8, ["style", "icon"]),
|
|
6437
|
+
vue.createElementVNode("div", {
|
|
6438
|
+
class: "tree-node-content",
|
|
6439
|
+
onClick: nodeClickHandler
|
|
6440
|
+
}, [
|
|
6441
|
+
vue.renderSlot(_ctx.$slots, "tree-node-content", { data: _ctx.data }, () => [
|
|
6442
|
+
vue.createElementVNode("div", _hoisted_2$9, vue.toDisplayString(`${_ctx.data.name} (${_ctx.data.id})`), 1),
|
|
6443
|
+
vue.createElementVNode("div", _hoisted_3$5, [
|
|
6444
|
+
vue.renderSlot(_ctx.$slots, "tree-node-tool", { data: _ctx.data })
|
|
6445
|
+
])
|
|
6446
|
+
])
|
|
6447
|
+
])
|
|
6448
|
+
], 38),
|
|
6449
|
+
hasChilren.value && expanded.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$5, [
|
|
6450
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.data.items, (item) => {
|
|
6451
|
+
return vue.openBlock(), vue.createBlock(_component_TreeNode, {
|
|
6452
|
+
key: item.id,
|
|
6453
|
+
data: item,
|
|
6454
|
+
"node-status-map": _ctx.nodeStatusMap,
|
|
6455
|
+
indent: _ctx.indent + 11
|
|
6456
|
+
}, {
|
|
6457
|
+
"tree-node-content": vue.withCtx(({ data: nodeData }) => [
|
|
6458
|
+
vue.renderSlot(_ctx.$slots, "tree-node-content", { data: nodeData })
|
|
6459
|
+
]),
|
|
6460
|
+
"tree-node-tool": vue.withCtx(({ data: nodeData }) => [
|
|
6461
|
+
vue.renderSlot(_ctx.$slots, "tree-node-tool", { data: nodeData })
|
|
6462
|
+
]),
|
|
6463
|
+
_: 2
|
|
6464
|
+
}, 1032, ["data", "node-status-map", "indent"]);
|
|
6465
|
+
}), 128))
|
|
6466
|
+
])) : vue.createCommentVNode("", true)
|
|
6467
|
+
], 40, _hoisted_1$c)), [
|
|
6468
|
+
[vue.vShow, visible.value]
|
|
6469
|
+
]);
|
|
6470
|
+
};
|
|
6471
|
+
}
|
|
6472
|
+
});
|
|
6473
|
+
|
|
6474
|
+
const _hoisted_1$b = { key: 1 };
|
|
6262
6475
|
const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
6476
|
+
...{
|
|
6477
|
+
name: "MEditorTree"
|
|
6478
|
+
},
|
|
6479
|
+
__name: "Tree",
|
|
6480
|
+
props: {
|
|
6481
|
+
data: {},
|
|
6482
|
+
nodeStatusMap: {},
|
|
6483
|
+
indent: { default: 0 },
|
|
6484
|
+
emptyText: { default: "暂无数据" }
|
|
6485
|
+
},
|
|
6486
|
+
emits: ["node-dragover", "node-dragstart", "node-dragleave", "node-dragend", "node-contextmenu", "node-mouseenter", "node-click"],
|
|
6487
|
+
setup(__props, { emit }) {
|
|
6488
|
+
vue.provide("treeEmit", emit);
|
|
6489
|
+
const handleDragOver = (event) => {
|
|
6490
|
+
emit("node-dragover", event);
|
|
6491
|
+
};
|
|
6492
|
+
return (_ctx, _cache) => {
|
|
6493
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
6494
|
+
class: "m-editor-tree",
|
|
6495
|
+
onDragover: handleDragOver
|
|
6496
|
+
}, [
|
|
6497
|
+
_ctx.data?.length ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(_ctx.data, (item) => {
|
|
6498
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$m, {
|
|
6499
|
+
key: item.id,
|
|
6500
|
+
data: item,
|
|
6501
|
+
indent: _ctx.indent,
|
|
6502
|
+
"node-status-map": _ctx.nodeStatusMap
|
|
6503
|
+
}, {
|
|
6504
|
+
"tree-node-content": vue.withCtx(({ data: nodeData }) => [
|
|
6505
|
+
vue.renderSlot(_ctx.$slots, "tree-node-content", { data: nodeData })
|
|
6506
|
+
]),
|
|
6507
|
+
"tree-node-tool": vue.withCtx(({ data: nodeData }) => [
|
|
6508
|
+
vue.renderSlot(_ctx.$slots, "tree-node-tool", { data: nodeData })
|
|
6509
|
+
]),
|
|
6510
|
+
_: 2
|
|
6511
|
+
}, 1032, ["data", "indent", "node-status-map"]);
|
|
6512
|
+
}), 128)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [
|
|
6513
|
+
vue.createElementVNode("p", null, vue.toDisplayString(_ctx.emptyText), 1)
|
|
6514
|
+
]))
|
|
6515
|
+
], 32);
|
|
6516
|
+
};
|
|
6517
|
+
}
|
|
6518
|
+
});
|
|
6519
|
+
|
|
6520
|
+
const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
6263
6521
|
...{
|
|
6264
6522
|
name: "MEditorContentMenu"
|
|
6265
6523
|
},
|
|
@@ -6392,7 +6650,7 @@
|
|
|
6392
6650
|
vue.renderSlot(_ctx.$slots, "title"),
|
|
6393
6651
|
vue.createElementVNode("div", null, [
|
|
6394
6652
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menuData, (item, index) => {
|
|
6395
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
6653
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
6396
6654
|
"event-type": "mouseup",
|
|
6397
6655
|
ref_for: true,
|
|
6398
6656
|
ref_key: "buttons",
|
|
@@ -6427,7 +6685,7 @@
|
|
|
6427
6685
|
}
|
|
6428
6686
|
});
|
|
6429
6687
|
|
|
6430
|
-
const _hoisted_1$
|
|
6688
|
+
const _hoisted_1$a = {
|
|
6431
6689
|
width: "1em",
|
|
6432
6690
|
height: "1em",
|
|
6433
6691
|
viewBox: "0 0 16 16",
|
|
@@ -6435,26 +6693,26 @@
|
|
|
6435
6693
|
fill: "currentColor",
|
|
6436
6694
|
xmlns: "http://www.w3.org/2000/svg"
|
|
6437
6695
|
};
|
|
6438
|
-
const _hoisted_2$
|
|
6696
|
+
const _hoisted_2$8 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
6439
6697
|
"fill-rule": "evenodd",
|
|
6440
6698
|
d: "M9.828 4H2.19a1 1 0 0 0-.996 1.09l.637 7a1 1 0 0 0 .995.91H9v1H2.826a2 2 0 0 1-1.991-1.819l-.637-7a1.99 1.99 0 0 1 .342-1.31L.5 3a2 2 0 0 1 2-2h3.672a2 2 0 0 1 1.414.586l.828.828A2 2 0 0 0 9.828 3h3.982a2 2 0 0 1 1.992 2.181L15.546 8H14.54l.265-2.91A1 1 0 0 0 13.81 4H9.828zm-2.95-1.707L7.587 3H2.19c-.24 0-.47.042-.684.12L1.5 2.98a1 1 0 0 1 1-.98h3.672a1 1 0 0 1 .707.293z"
|
|
6441
6699
|
}, null, -1);
|
|
6442
|
-
const _hoisted_3$
|
|
6700
|
+
const _hoisted_3$4 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
6443
6701
|
"fill-rule": "evenodd",
|
|
6444
6702
|
d: "M11 11.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5z"
|
|
6445
6703
|
}, null, -1);
|
|
6446
|
-
const _hoisted_4$
|
|
6447
|
-
_hoisted_2$
|
|
6448
|
-
_hoisted_3$
|
|
6704
|
+
const _hoisted_4$4 = [
|
|
6705
|
+
_hoisted_2$8,
|
|
6706
|
+
_hoisted_3$4
|
|
6449
6707
|
];
|
|
6450
|
-
const _sfc_main$
|
|
6708
|
+
const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
6451
6709
|
...{
|
|
6452
6710
|
name: "MEditorFolderMinusIcon"
|
|
6453
6711
|
},
|
|
6454
6712
|
__name: "FolderMinusIcon",
|
|
6455
6713
|
setup(__props) {
|
|
6456
6714
|
return (_ctx, _cache) => {
|
|
6457
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
6715
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$a, _hoisted_4$4);
|
|
6458
6716
|
};
|
|
6459
6717
|
}
|
|
6460
6718
|
});
|
|
@@ -6534,7 +6792,7 @@
|
|
|
6534
6792
|
};
|
|
6535
6793
|
};
|
|
6536
6794
|
|
|
6537
|
-
const _sfc_main$
|
|
6795
|
+
const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
6538
6796
|
...{
|
|
6539
6797
|
name: "MEditorLayerMenu"
|
|
6540
6798
|
},
|
|
@@ -6597,7 +6855,7 @@
|
|
|
6597
6855
|
{
|
|
6598
6856
|
type: "button",
|
|
6599
6857
|
text: "全部折叠",
|
|
6600
|
-
icon: _sfc_main$
|
|
6858
|
+
icon: _sfc_main$j,
|
|
6601
6859
|
display: () => utils.isPage(node.value),
|
|
6602
6860
|
handler: () => {
|
|
6603
6861
|
emit("collapse-all");
|
|
@@ -6623,7 +6881,7 @@
|
|
|
6623
6881
|
show
|
|
6624
6882
|
});
|
|
6625
6883
|
return (_ctx, _cache) => {
|
|
6626
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
6884
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$k, {
|
|
6627
6885
|
"menu-data": menuData.value,
|
|
6628
6886
|
ref_key: "menu",
|
|
6629
6887
|
ref: menu,
|
|
@@ -6633,7 +6891,7 @@
|
|
|
6633
6891
|
}
|
|
6634
6892
|
});
|
|
6635
6893
|
|
|
6636
|
-
const _sfc_main$
|
|
6894
|
+
const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
6637
6895
|
__name: "LayerNodeTool",
|
|
6638
6896
|
props: {
|
|
6639
6897
|
data: {}
|
|
@@ -6652,12 +6910,12 @@
|
|
|
6652
6910
|
};
|
|
6653
6911
|
return (_ctx, _cache) => {
|
|
6654
6912
|
return _ctx.data.type !== "page" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
6655
|
-
_ctx.data.visible === false ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
6913
|
+
_ctx.data.visible === false ? (vue.openBlock(), vue.createBlock(_sfc_main$N, {
|
|
6656
6914
|
key: 0,
|
|
6657
6915
|
icon: vue.unref(iconsVue.Hide),
|
|
6658
6916
|
onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => setNodeVisible(true), ["stop"])),
|
|
6659
6917
|
title: "点击显示"
|
|
6660
|
-
}, null, 8, ["icon"])) : (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
6918
|
+
}, null, 8, ["icon"])) : (vue.openBlock(), vue.createBlock(_sfc_main$N, {
|
|
6661
6919
|
key: 1,
|
|
6662
6920
|
icon: vue.unref(iconsVue.View),
|
|
6663
6921
|
onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => setNodeVisible(false), ["stop"])),
|
|
@@ -6669,6 +6927,75 @@
|
|
|
6669
6927
|
}
|
|
6670
6928
|
});
|
|
6671
6929
|
|
|
6930
|
+
const useClick = (services, isCtrlKeyDown, nodeStatusMap) => {
|
|
6931
|
+
const select = async (data) => {
|
|
6932
|
+
if (!data.id) {
|
|
6933
|
+
throw new Error("没有id");
|
|
6934
|
+
}
|
|
6935
|
+
if (isCtrlKeyDown.value) {
|
|
6936
|
+
multiSelect(data);
|
|
6937
|
+
} else {
|
|
6938
|
+
await services?.editorService.select(data);
|
|
6939
|
+
services?.editorService.get("stage")?.select(data.id);
|
|
6940
|
+
}
|
|
6941
|
+
};
|
|
6942
|
+
const multiSelect = async (data) => {
|
|
6943
|
+
const nodes = services?.editorService.get("nodes") || [];
|
|
6944
|
+
const newNodes = [];
|
|
6945
|
+
let isCancel = false;
|
|
6946
|
+
nodes.forEach((node) => {
|
|
6947
|
+
if (node.id === data.id) {
|
|
6948
|
+
isCancel = true;
|
|
6949
|
+
return;
|
|
6950
|
+
}
|
|
6951
|
+
newNodes.push(node.id);
|
|
6952
|
+
});
|
|
6953
|
+
if (!isCancel || newNodes.length === 0) {
|
|
6954
|
+
newNodes.push(data.id);
|
|
6955
|
+
}
|
|
6956
|
+
await services?.editorService.multiSelect(newNodes);
|
|
6957
|
+
services?.editorService.get("stage")?.multiSelect(newNodes);
|
|
6958
|
+
};
|
|
6959
|
+
const throttleTime = 300;
|
|
6960
|
+
const highlightHandler = lodashEs.throttle((event, data) => {
|
|
6961
|
+
highlight(data);
|
|
6962
|
+
}, throttleTime);
|
|
6963
|
+
const highlight = (data) => {
|
|
6964
|
+
services?.editorService?.highlight(data);
|
|
6965
|
+
services?.editorService?.get("stage")?.highlight(data.id);
|
|
6966
|
+
};
|
|
6967
|
+
const nodeClickHandler = (event, data) => {
|
|
6968
|
+
if (!nodeStatusMap?.value)
|
|
6969
|
+
return;
|
|
6970
|
+
if (services?.uiService.get("uiSelectMode")) {
|
|
6971
|
+
document.dispatchEvent(new CustomEvent(UI_SELECT_MODE_EVENT_NAME, { detail: data }));
|
|
6972
|
+
return;
|
|
6973
|
+
}
|
|
6974
|
+
if (data.items && data.items.length > 0 && !isCtrlKeyDown.value) {
|
|
6975
|
+
updateStatus(nodeStatusMap.value, data.id, {
|
|
6976
|
+
expand: true
|
|
6977
|
+
});
|
|
6978
|
+
}
|
|
6979
|
+
vue.nextTick(() => {
|
|
6980
|
+
select(data);
|
|
6981
|
+
});
|
|
6982
|
+
};
|
|
6983
|
+
const menu = vue.ref();
|
|
6984
|
+
return {
|
|
6985
|
+
menu,
|
|
6986
|
+
nodeClickHandler,
|
|
6987
|
+
nodeContentmenuHandler(event, data) {
|
|
6988
|
+
event.preventDefault();
|
|
6989
|
+
const nodes = services?.editorService.get("nodes") || [];
|
|
6990
|
+
if (nodes.length < 2 || !nodes.includes(data)) {
|
|
6991
|
+
nodeClickHandler(event, data);
|
|
6992
|
+
}
|
|
6993
|
+
menu.value?.show(event);
|
|
6994
|
+
},
|
|
6995
|
+
highlightHandler
|
|
6996
|
+
};
|
|
6997
|
+
};
|
|
6998
|
+
|
|
6672
6999
|
const dragState = {
|
|
6673
7000
|
dragOverNodeId: "",
|
|
6674
7001
|
dropType: "",
|
|
@@ -6713,7 +7040,7 @@
|
|
|
6713
7040
|
if (!event.target)
|
|
6714
7041
|
return;
|
|
6715
7042
|
const targetEl = getNodeEl(event.target);
|
|
6716
|
-
if (!targetEl)
|
|
7043
|
+
if (!targetEl?.draggable)
|
|
6717
7044
|
return;
|
|
6718
7045
|
const labelEl = targetEl.children[0];
|
|
6719
7046
|
if (!labelEl)
|
|
@@ -6787,16 +7114,6 @@
|
|
|
6787
7114
|
};
|
|
6788
7115
|
};
|
|
6789
7116
|
|
|
6790
|
-
const updateStatus = (nodeStatusMap, id, status) => {
|
|
6791
|
-
const nodeStatus = nodeStatusMap.get(id);
|
|
6792
|
-
if (!nodeStatus)
|
|
6793
|
-
return;
|
|
6794
|
-
utils.getKeys(status).forEach((key) => {
|
|
6795
|
-
if (nodeStatus[key] !== void 0 && status[key] !== void 0) {
|
|
6796
|
-
nodeStatus[key] = Boolean(status[key]);
|
|
6797
|
-
}
|
|
6798
|
-
});
|
|
6799
|
-
};
|
|
6800
7117
|
const useFilter = (nodeStatusMap, page) => {
|
|
6801
7118
|
const filterIsMatch = (value, data) => {
|
|
6802
7119
|
if (!value) {
|
|
@@ -6841,179 +7158,6 @@
|
|
|
6841
7158
|
};
|
|
6842
7159
|
};
|
|
6843
7160
|
|
|
6844
|
-
const _hoisted_1$a = ["draggable", "data-node-id", "data-is-container"];
|
|
6845
|
-
const _hoisted_2$8 = { class: "layer-node-label" };
|
|
6846
|
-
const _hoisted_3$4 = { class: "layer-node-tool" };
|
|
6847
|
-
const _hoisted_4$4 = {
|
|
6848
|
-
key: 0,
|
|
6849
|
-
class: "magic-editor-layer-node-children"
|
|
6850
|
-
};
|
|
6851
|
-
const throttleTime = 300;
|
|
6852
|
-
const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
6853
|
-
...{
|
|
6854
|
-
name: "MEditorLayerNode"
|
|
6855
|
-
},
|
|
6856
|
-
__name: "LayerNode",
|
|
6857
|
-
props: {
|
|
6858
|
-
data: {},
|
|
6859
|
-
parent: {},
|
|
6860
|
-
indent: { default: 0 },
|
|
6861
|
-
filterText: { default: "" },
|
|
6862
|
-
isCtrlKeyDown: { type: Boolean, default: false }
|
|
6863
|
-
},
|
|
6864
|
-
emits: ["node-contextmenu"],
|
|
6865
|
-
setup(__props, { emit }) {
|
|
6866
|
-
const props = __props;
|
|
6867
|
-
const services = vue.inject("services");
|
|
6868
|
-
const nodeStatusMap = vue.inject("nodeStatusMap");
|
|
6869
|
-
const editorService = services?.editorService;
|
|
6870
|
-
const uiService = services?.uiService;
|
|
6871
|
-
const nodeStatus = vue.computed(
|
|
6872
|
-
() => nodeStatusMap?.value?.get(props.data.id) || {
|
|
6873
|
-
selected: false,
|
|
6874
|
-
expand: false,
|
|
6875
|
-
visible: false
|
|
6876
|
-
}
|
|
6877
|
-
);
|
|
6878
|
-
const expanded = vue.computed(() => nodeStatus.value.expand);
|
|
6879
|
-
const selected = vue.computed(() => nodeStatus.value.selected);
|
|
6880
|
-
const visible = vue.computed(() => nodeStatus.value.visible);
|
|
6881
|
-
const hasChilren = vue.computed(() => props.data.items?.length > 0);
|
|
6882
|
-
const nodeEl = vue.ref();
|
|
6883
|
-
const { handleDragStart, handleDragEnd, handleDragLeave } = useDrag(services);
|
|
6884
|
-
const expandHandler = () => {
|
|
6885
|
-
if (!nodeStatusMap?.value)
|
|
6886
|
-
return;
|
|
6887
|
-
updateStatus(nodeStatusMap.value, props.data.id, {
|
|
6888
|
-
expand: !expanded.value
|
|
6889
|
-
});
|
|
6890
|
-
};
|
|
6891
|
-
const nodeClickHandler = () => {
|
|
6892
|
-
if (!nodeStatusMap?.value)
|
|
6893
|
-
return;
|
|
6894
|
-
if (uiService?.get("uiSelectMode")) {
|
|
6895
|
-
document.dispatchEvent(new CustomEvent(UI_SELECT_MODE_EVENT_NAME, { detail: props.data }));
|
|
6896
|
-
return;
|
|
6897
|
-
}
|
|
6898
|
-
if (hasChilren.value && !props.isCtrlKeyDown) {
|
|
6899
|
-
updateStatus(nodeStatusMap.value, props.data.id, {
|
|
6900
|
-
expand: true
|
|
6901
|
-
});
|
|
6902
|
-
}
|
|
6903
|
-
vue.nextTick(() => {
|
|
6904
|
-
select(props.data);
|
|
6905
|
-
});
|
|
6906
|
-
};
|
|
6907
|
-
const contextmenuHandler = (event) => {
|
|
6908
|
-
event.preventDefault();
|
|
6909
|
-
const nodes = editorService?.get("nodes") || [];
|
|
6910
|
-
if (nodes.length < 2 || !nodes.includes(props.data)) {
|
|
6911
|
-
nodeClickHandler();
|
|
6912
|
-
}
|
|
6913
|
-
emit("node-contextmenu", event, props.data);
|
|
6914
|
-
};
|
|
6915
|
-
const nodeContentmenuHandler = (event, node) => {
|
|
6916
|
-
emit("node-contextmenu", event, node);
|
|
6917
|
-
};
|
|
6918
|
-
const select = async (data) => {
|
|
6919
|
-
if (!data.id) {
|
|
6920
|
-
throw new Error("没有id");
|
|
6921
|
-
}
|
|
6922
|
-
if (props.isCtrlKeyDown) {
|
|
6923
|
-
multiSelect(data);
|
|
6924
|
-
} else {
|
|
6925
|
-
await editorService?.select(data);
|
|
6926
|
-
editorService?.get("stage")?.select(data.id);
|
|
6927
|
-
}
|
|
6928
|
-
};
|
|
6929
|
-
const multiSelect = async (data) => {
|
|
6930
|
-
const nodes = editorService?.get("nodes") || [];
|
|
6931
|
-
const newNodes = [];
|
|
6932
|
-
let isCancel = false;
|
|
6933
|
-
nodes.forEach((node) => {
|
|
6934
|
-
if (node.id === data.id) {
|
|
6935
|
-
isCancel = true;
|
|
6936
|
-
return;
|
|
6937
|
-
}
|
|
6938
|
-
newNodes.push(node.id);
|
|
6939
|
-
});
|
|
6940
|
-
if (!isCancel || newNodes.length === 0) {
|
|
6941
|
-
newNodes.push(data.id);
|
|
6942
|
-
}
|
|
6943
|
-
await editorService?.multiSelect(newNodes);
|
|
6944
|
-
editorService?.get("stage")?.multiSelect(newNodes);
|
|
6945
|
-
};
|
|
6946
|
-
const highlightHandler = lodashEs.throttle(() => {
|
|
6947
|
-
highlight();
|
|
6948
|
-
}, throttleTime);
|
|
6949
|
-
const highlight = () => {
|
|
6950
|
-
editorService?.highlight(props.data);
|
|
6951
|
-
editorService?.get("stage")?.highlight(props.data.id);
|
|
6952
|
-
};
|
|
6953
|
-
return (_ctx, _cache) => {
|
|
6954
|
-
const _component_LayerNode = vue.resolveComponent("LayerNode", true);
|
|
6955
|
-
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
6956
|
-
class: "magic-editor-layer-node",
|
|
6957
|
-
ref_key: "nodeEl",
|
|
6958
|
-
ref: nodeEl,
|
|
6959
|
-
draggable: !vue.unref(utils.isPage)(_ctx.data),
|
|
6960
|
-
"data-node-id": _ctx.data.id,
|
|
6961
|
-
"data-is-container": Array.isArray(_ctx.data.items),
|
|
6962
|
-
onDragstart: _cache[1] || (_cache[1] = //@ts-ignore
|
|
6963
|
-
(...args) => vue.unref(handleDragStart) && vue.unref(handleDragStart)(...args)),
|
|
6964
|
-
onDragleave: _cache[2] || (_cache[2] = //@ts-ignore
|
|
6965
|
-
(...args) => vue.unref(handleDragLeave) && vue.unref(handleDragLeave)(...args)),
|
|
6966
|
-
onDragend: _cache[3] || (_cache[3] = ($event) => vue.unref(handleDragEnd)($event, _ctx.data))
|
|
6967
|
-
}, [
|
|
6968
|
-
vue.createElementVNode("div", {
|
|
6969
|
-
class: vue.normalizeClass(["layer-node", { selected: selected.value, expanded: expanded.value }]),
|
|
6970
|
-
style: vue.normalizeStyle(`padding-left: ${_ctx.indent}px`),
|
|
6971
|
-
onContextmenu: contextmenuHandler,
|
|
6972
|
-
onMouseenter: _cache[0] || (_cache[0] = ($event) => vue.unref(highlightHandler)())
|
|
6973
|
-
}, [
|
|
6974
|
-
vue.createVNode(_sfc_main$M, {
|
|
6975
|
-
class: "expand-icon",
|
|
6976
|
-
style: vue.normalizeStyle(hasChilren.value ? "" : "color: transparent; cursor: default"),
|
|
6977
|
-
icon: expanded.value ? vue.unref(iconsVue.ArrowDown) : vue.unref(iconsVue.ArrowRight),
|
|
6978
|
-
onClick: expandHandler
|
|
6979
|
-
}, null, 8, ["style", "icon"]),
|
|
6980
|
-
vue.createElementVNode("div", {
|
|
6981
|
-
class: "layer-node-content",
|
|
6982
|
-
onClick: nodeClickHandler
|
|
6983
|
-
}, [
|
|
6984
|
-
vue.renderSlot(_ctx.$slots, "layer-node-content", { data: _ctx.data }, () => [
|
|
6985
|
-
vue.createElementVNode("div", _hoisted_2$8, vue.toDisplayString(`${_ctx.data.name} (${_ctx.data.id})`), 1),
|
|
6986
|
-
vue.createElementVNode("div", _hoisted_3$4, [
|
|
6987
|
-
vue.createVNode(_sfc_main$i, { data: _ctx.data }, null, 8, ["data"])
|
|
6988
|
-
])
|
|
6989
|
-
])
|
|
6990
|
-
])
|
|
6991
|
-
], 38),
|
|
6992
|
-
hasChilren.value && expanded.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$4, [
|
|
6993
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.data.items, (item) => {
|
|
6994
|
-
return vue.openBlock(), vue.createBlock(_component_LayerNode, {
|
|
6995
|
-
data: item,
|
|
6996
|
-
parent: _ctx.data,
|
|
6997
|
-
key: item.id,
|
|
6998
|
-
indent: _ctx.indent + 11,
|
|
6999
|
-
"filter-text": _ctx.filterText,
|
|
7000
|
-
"is-ctrl-key-down": _ctx.isCtrlKeyDown,
|
|
7001
|
-
onNodeContextmenu: nodeContentmenuHandler
|
|
7002
|
-
}, {
|
|
7003
|
-
"layer-node-content": vue.withCtx(({ data: nodeData }) => [
|
|
7004
|
-
vue.renderSlot(_ctx.$slots, "layer-node-content", { data: nodeData })
|
|
7005
|
-
]),
|
|
7006
|
-
_: 2
|
|
7007
|
-
}, 1032, ["data", "parent", "indent", "filter-text", "is-ctrl-key-down"]);
|
|
7008
|
-
}), 128))
|
|
7009
|
-
])) : vue.createCommentVNode("", true)
|
|
7010
|
-
], 40, _hoisted_1$a)), [
|
|
7011
|
-
[vue.vShow, visible.value]
|
|
7012
|
-
]);
|
|
7013
|
-
};
|
|
7014
|
-
}
|
|
7015
|
-
});
|
|
7016
|
-
|
|
7017
7161
|
var KeyBindingContainerKey = /* @__PURE__ */ ((KeyBindingContainerKey2) => {
|
|
7018
7162
|
KeyBindingContainerKey2["STAGE"] = "stage";
|
|
7019
7163
|
KeyBindingContainerKey2["LAYER_PANEL"] = "layer-panel";
|
|
@@ -7165,7 +7309,7 @@
|
|
|
7165
7309
|
vue.watchEffect(() => {
|
|
7166
7310
|
if (contianer.value) {
|
|
7167
7311
|
globalThis.addEventListener("blur", windowBlurHandler);
|
|
7168
|
-
keybindingService?.registeEl(KeyBindingContainerKey.LAYER_PANEL, contianer.value);
|
|
7312
|
+
keybindingService?.registeEl(KeyBindingContainerKey.LAYER_PANEL, contianer.value.$el);
|
|
7169
7313
|
} else {
|
|
7170
7314
|
globalThis.removeEventListener("blur", windowBlurHandler);
|
|
7171
7315
|
keybindingService?.unregisteEl(KeyBindingContainerKey.LAYER_PANEL);
|
|
@@ -7181,14 +7325,16 @@
|
|
|
7181
7325
|
map.set(pageId, {
|
|
7182
7326
|
visible: true,
|
|
7183
7327
|
expand: true,
|
|
7184
|
-
selected: true
|
|
7328
|
+
selected: true,
|
|
7329
|
+
draggable: false
|
|
7185
7330
|
});
|
|
7186
7331
|
services?.editorService.getNodeById(pageId)?.items.forEach(
|
|
7187
7332
|
(node) => traverseNode(node, (node2) => {
|
|
7188
7333
|
map.set(node2.id, {
|
|
7189
7334
|
visible: true,
|
|
7190
7335
|
expand: false,
|
|
7191
|
-
selected: false
|
|
7336
|
+
selected: false,
|
|
7337
|
+
draggable: true
|
|
7192
7338
|
});
|
|
7193
7339
|
})
|
|
7194
7340
|
);
|
|
@@ -7238,7 +7384,8 @@
|
|
|
7238
7384
|
nodeStatusMap.value?.set(node2.id, {
|
|
7239
7385
|
visible: true,
|
|
7240
7386
|
expand: Array.isArray(node2.items),
|
|
7241
|
-
selected: true
|
|
7387
|
+
selected: true,
|
|
7388
|
+
draggable: true
|
|
7242
7389
|
});
|
|
7243
7390
|
});
|
|
7244
7391
|
});
|
|
@@ -7267,13 +7414,11 @@
|
|
|
7267
7414
|
setup(__props) {
|
|
7268
7415
|
const services = vue.inject("services");
|
|
7269
7416
|
const editorService = services?.editorService;
|
|
7270
|
-
const
|
|
7417
|
+
const tree = vue.ref();
|
|
7271
7418
|
const page = vue.computed(() => editorService?.get("page"));
|
|
7272
|
-
const root = vue.computed(() => editorService?.get("root"));
|
|
7273
7419
|
const { nodeStatusMap } = useNodeStatus(services, page);
|
|
7274
|
-
const { isCtrlKeyDown } = useKeybinding(services,
|
|
7275
|
-
|
|
7276
|
-
const { filterText, filterTextChangeHandler } = useFilter(nodeStatusMap, page);
|
|
7420
|
+
const { isCtrlKeyDown } = useKeybinding(services, tree);
|
|
7421
|
+
const { filterTextChangeHandler } = useFilter(nodeStatusMap, page);
|
|
7277
7422
|
const collapseAllHandler = () => {
|
|
7278
7423
|
if (!page.value || !nodeStatusMap.value)
|
|
7279
7424
|
return;
|
|
@@ -7285,40 +7430,45 @@
|
|
|
7285
7430
|
status.expand = false;
|
|
7286
7431
|
}
|
|
7287
7432
|
};
|
|
7288
|
-
const
|
|
7289
|
-
const
|
|
7290
|
-
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
|
|
7433
|
+
const { handleDragStart, handleDragEnd, handleDragLeave, handleDragOver } = useDrag(services);
|
|
7434
|
+
const {
|
|
7435
|
+
menu,
|
|
7436
|
+
nodeClickHandler,
|
|
7437
|
+
nodeContentmenuHandler,
|
|
7438
|
+
highlightHandler: mouseenterHandler
|
|
7439
|
+
} = useClick(services, isCtrlKeyDown, nodeStatusMap);
|
|
7294
7440
|
return (_ctx, _cache) => {
|
|
7295
|
-
return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicScrollbar), { class: "
|
|
7441
|
+
return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicScrollbar), { class: "m-editor-layer-panel" }, {
|
|
7296
7442
|
default: vue.withCtx(() => [
|
|
7297
7443
|
vue.renderSlot(_ctx.$slots, "layer-panel-header"),
|
|
7298
|
-
vue.createVNode(_sfc_main$
|
|
7299
|
-
vue.
|
|
7300
|
-
|
|
7301
|
-
ref_key: "layerTreeContainer",
|
|
7302
|
-
ref: layerTreeContainer,
|
|
7444
|
+
vue.createVNode(_sfc_main$u, { onSearch: vue.unref(filterTextChangeHandler) }, null, 8, ["onSearch"]),
|
|
7445
|
+
page.value && vue.unref(nodeStatusMap) ? (vue.openBlock(), vue.createBlock(_sfc_main$l, {
|
|
7446
|
+
key: 0,
|
|
7303
7447
|
tabindex: "-1",
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
|
|
7319
|
-
|
|
7448
|
+
ref_key: "tree",
|
|
7449
|
+
ref: tree,
|
|
7450
|
+
data: [page.value],
|
|
7451
|
+
"node-status-map": vue.unref(nodeStatusMap),
|
|
7452
|
+
onNodeDragover: vue.unref(handleDragOver),
|
|
7453
|
+
onNodeDragstart: vue.unref(handleDragStart),
|
|
7454
|
+
onNodeDragleave: vue.unref(handleDragLeave),
|
|
7455
|
+
onNodeDragend: vue.unref(handleDragEnd),
|
|
7456
|
+
onNodeContextmenu: vue.unref(nodeContentmenuHandler),
|
|
7457
|
+
onNodeMouseenter: vue.unref(mouseenterHandler),
|
|
7458
|
+
onNodeClick: vue.unref(nodeClickHandler)
|
|
7459
|
+
}, {
|
|
7460
|
+
"tree-node-tool": vue.withCtx(({ data: nodeData }) => [
|
|
7461
|
+
vue.renderSlot(_ctx.$slots, "layer-node-tool", { data: nodeData }, () => [
|
|
7462
|
+
vue.createVNode(_sfc_main$h, { data: nodeData }, null, 8, ["data"])
|
|
7463
|
+
])
|
|
7464
|
+
]),
|
|
7465
|
+
"tree-node-content": vue.withCtx(({ data: nodeData }) => [
|
|
7466
|
+
vue.renderSlot(_ctx.$slots, "layer-node-content", { data: nodeData })
|
|
7467
|
+
]),
|
|
7468
|
+
_: 3
|
|
7469
|
+
}, 8, ["data", "node-status-map", "onNodeDragover", "onNodeDragstart", "onNodeDragleave", "onNodeDragend", "onNodeContextmenu", "onNodeMouseenter", "onNodeClick"])) : vue.createCommentVNode("", true),
|
|
7320
7470
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
7321
|
-
vue.createVNode(_sfc_main$
|
|
7471
|
+
vue.createVNode(_sfc_main$i, {
|
|
7322
7472
|
ref_key: "menu",
|
|
7323
7473
|
ref: menu,
|
|
7324
7474
|
"layer-content-menu": _ctx.layerContentMenu,
|
|
@@ -7414,7 +7564,7 @@
|
|
|
7414
7564
|
"model-value": collapseValue.value
|
|
7415
7565
|
}, {
|
|
7416
7566
|
default: vue.withCtx(() => [
|
|
7417
|
-
vue.createVNode(_sfc_main$
|
|
7567
|
+
vue.createVNode(_sfc_main$u, { onSearch: filterTextChangeHandler }),
|
|
7418
7568
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(list.value, (group, index) => {
|
|
7419
7569
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
7420
7570
|
group.items && group.items.length ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicCollapseItem), {
|
|
@@ -7422,7 +7572,7 @@
|
|
|
7422
7572
|
name: `${index}`
|
|
7423
7573
|
}, {
|
|
7424
7574
|
title: vue.withCtx(() => [
|
|
7425
|
-
vue.createVNode(_sfc_main$
|
|
7575
|
+
vue.createVNode(_sfc_main$N, { icon: vue.unref(iconsVue.Grid) }, null, 8, ["icon"]),
|
|
7426
7576
|
vue.createTextVNode(vue.toDisplayString(group.title), 1)
|
|
7427
7577
|
]),
|
|
7428
7578
|
default: vue.withCtx(() => [
|
|
@@ -7443,7 +7593,7 @@
|
|
|
7443
7593
|
content: item.desc
|
|
7444
7594
|
}, {
|
|
7445
7595
|
default: vue.withCtx(() => [
|
|
7446
|
-
vue.createVNode(_sfc_main$
|
|
7596
|
+
vue.createVNode(_sfc_main$N, {
|
|
7447
7597
|
icon: item.icon
|
|
7448
7598
|
}, null, 8, ["icon"])
|
|
7449
7599
|
]),
|
|
@@ -7518,7 +7668,7 @@
|
|
|
7518
7668
|
type: "component",
|
|
7519
7669
|
icon: iconsVue.EditPen,
|
|
7520
7670
|
text: "代码编辑",
|
|
7521
|
-
component: _sfc_main$
|
|
7671
|
+
component: _sfc_main$q,
|
|
7522
7672
|
slots: {}
|
|
7523
7673
|
},
|
|
7524
7674
|
"data-source": {
|
|
@@ -7526,7 +7676,7 @@
|
|
|
7526
7676
|
type: "component",
|
|
7527
7677
|
icon: iconsVue.Coin,
|
|
7528
7678
|
text: "数据源",
|
|
7529
|
-
component: _sfc_main$
|
|
7679
|
+
component: _sfc_main$n,
|
|
7530
7680
|
slots: {}
|
|
7531
7681
|
}
|
|
7532
7682
|
};
|
|
@@ -7551,7 +7701,7 @@
|
|
|
7551
7701
|
key: config.$key ?? index,
|
|
7552
7702
|
onClick: ($event) => activeTabName.value = config.text || `${index}`
|
|
7553
7703
|
}, [
|
|
7554
|
-
config.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7704
|
+
config.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$N, {
|
|
7555
7705
|
key: 0,
|
|
7556
7706
|
icon: config.icon
|
|
7557
7707
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
@@ -7622,6 +7772,29 @@
|
|
|
7622
7772
|
}, null, 8, ["data"])) : vue.createCommentVNode("", true)
|
|
7623
7773
|
]),
|
|
7624
7774
|
key: "5"
|
|
7775
|
+
} : void 0,
|
|
7776
|
+
config.$key === "layer" || config.slots?.layerNodeTool ? {
|
|
7777
|
+
name: "layer-node-tool",
|
|
7778
|
+
fn: vue.withCtx(({ data: nodeData }) => [
|
|
7779
|
+
config.$key === "layer" ? vue.renderSlot(_ctx.$slots, "layer-node-tool", {
|
|
7780
|
+
key: 0,
|
|
7781
|
+
data: nodeData
|
|
7782
|
+
}) : config.slots?.layerNodeTool ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.layerNodeTool), {
|
|
7783
|
+
key: 1,
|
|
7784
|
+
data: nodeData
|
|
7785
|
+
}, null, 8, ["data"])) : vue.createCommentVNode("", true)
|
|
7786
|
+
]),
|
|
7787
|
+
key: "6"
|
|
7788
|
+
} : void 0,
|
|
7789
|
+
config.$key === "data-source" || config.slots?.codeBlockPanelTool ? {
|
|
7790
|
+
name: "data-source-panel-tool",
|
|
7791
|
+
fn: vue.withCtx(({ data }) => [
|
|
7792
|
+
config.$key === "data-source" ? vue.renderSlot(_ctx.$slots, "data-source-panel-tool", {
|
|
7793
|
+
key: 0,
|
|
7794
|
+
data
|
|
7795
|
+
}) : config.slots?.DataSourcePanelTool ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.DataSourcePanelTool), { key: 1 })) : vue.createCommentVNode("", true)
|
|
7796
|
+
]),
|
|
7797
|
+
key: "7"
|
|
7625
7798
|
} : void 0
|
|
7626
7799
|
]), 1040)) : vue.createCommentVNode("", true)
|
|
7627
7800
|
])), [
|
|
@@ -8249,7 +8422,7 @@
|
|
|
8249
8422
|
content: _ctx.pinned ? "取消置于顶层自动隐藏" : "置于顶层不消失"
|
|
8250
8423
|
}, {
|
|
8251
8424
|
default: vue.withCtx(() => [
|
|
8252
|
-
vue.createVNode(_sfc_main$
|
|
8425
|
+
vue.createVNode(_sfc_main$N, {
|
|
8253
8426
|
style: { "margin-left": "10px", "cursor": "pointer" },
|
|
8254
8427
|
icon: _ctx.pinned ? _sfc_main$a : _sfc_main$b,
|
|
8255
8428
|
onClick: pinHandler
|
|
@@ -8265,7 +8438,7 @@
|
|
|
8265
8438
|
onClick: closeHandler
|
|
8266
8439
|
}, {
|
|
8267
8440
|
default: vue.withCtx(() => [
|
|
8268
|
-
vue.createVNode(_sfc_main$
|
|
8441
|
+
vue.createVNode(_sfc_main$N, { icon: vue.unref(iconsVue.Close) }, null, 8, ["icon"])
|
|
8269
8442
|
]),
|
|
8270
8443
|
_: 1
|
|
8271
8444
|
})
|
|
@@ -8392,7 +8565,7 @@
|
|
|
8392
8565
|
menu.value?.hide();
|
|
8393
8566
|
};
|
|
8394
8567
|
return (_ctx, _cache) => {
|
|
8395
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
8568
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$k, {
|
|
8396
8569
|
ref_key: "menu",
|
|
8397
8570
|
ref: menu,
|
|
8398
8571
|
class: "magic-editor-node-list-menu",
|
|
@@ -8578,7 +8751,7 @@
|
|
|
8578
8751
|
};
|
|
8579
8752
|
__expose({ show });
|
|
8580
8753
|
return (_ctx, _cache) => {
|
|
8581
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
8754
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$k, {
|
|
8582
8755
|
"menu-data": menuData.value,
|
|
8583
8756
|
ref_key: "menu",
|
|
8584
8757
|
ref: menu
|
|
@@ -8911,14 +9084,14 @@
|
|
|
8911
9084
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
|
|
8912
9085
|
onClick: addPage
|
|
8913
9086
|
}, [
|
|
8914
|
-
vue.createVNode(_sfc_main$
|
|
9087
|
+
vue.createVNode(_sfc_main$N, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
|
|
8915
9088
|
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2)),
|
|
8916
9089
|
canScroll.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
8917
9090
|
key: 2,
|
|
8918
9091
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
|
|
8919
9092
|
onClick: _cache[0] || (_cache[0] = ($event) => scroll("left"))
|
|
8920
9093
|
}, [
|
|
8921
|
-
vue.createVNode(_sfc_main$
|
|
9094
|
+
vue.createVNode(_sfc_main$N, { icon: vue.unref(iconsVue.ArrowLeftBold) }, null, 8, ["icon"])
|
|
8922
9095
|
])) : vue.createCommentVNode("", true),
|
|
8923
9096
|
pageLength.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
8924
9097
|
key: 3,
|
|
@@ -8934,7 +9107,7 @@
|
|
|
8934
9107
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
|
|
8935
9108
|
onClick: _cache[1] || (_cache[1] = ($event) => scroll("right"))
|
|
8936
9109
|
}, [
|
|
8937
|
-
vue.createVNode(_sfc_main$
|
|
9110
|
+
vue.createVNode(_sfc_main$N, { icon: vue.unref(iconsVue.ArrowRightBold) }, null, 8, ["icon"])
|
|
8938
9111
|
])) : vue.createCommentVNode("", true)
|
|
8939
9112
|
], 512);
|
|
8940
9113
|
};
|
|
@@ -9006,7 +9179,7 @@
|
|
|
9006
9179
|
default: vue.withCtx(() => [
|
|
9007
9180
|
vue.createElementVNode("div", null, [
|
|
9008
9181
|
vue.renderSlot(_ctx.$slots, "page-bar-popover", { page: item }, () => [
|
|
9009
|
-
vue.createVNode(_sfc_main$
|
|
9182
|
+
vue.createVNode(_sfc_main$x, {
|
|
9010
9183
|
data: {
|
|
9011
9184
|
type: "button",
|
|
9012
9185
|
text: "复制",
|
|
@@ -9014,7 +9187,7 @@
|
|
|
9014
9187
|
handler: () => copy(item)
|
|
9015
9188
|
}
|
|
9016
9189
|
}, null, 8, ["data"]),
|
|
9017
|
-
vue.createVNode(_sfc_main$
|
|
9190
|
+
vue.createVNode(_sfc_main$x, {
|
|
9018
9191
|
data: {
|
|
9019
9192
|
type: "button",
|
|
9020
9193
|
text: "删除",
|
|
@@ -10191,13 +10364,13 @@
|
|
|
10191
10364
|
);
|
|
10192
10365
|
__expose(services);
|
|
10193
10366
|
return (_ctx, _cache) => {
|
|
10194
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
10367
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$y, null, {
|
|
10195
10368
|
header: vue.withCtx(() => [
|
|
10196
10369
|
vue.renderSlot(_ctx.$slots, "header")
|
|
10197
10370
|
]),
|
|
10198
10371
|
nav: vue.withCtx(() => [
|
|
10199
10372
|
vue.renderSlot(_ctx.$slots, "nav", { editorService: vue.unref(editorService) }, () => [
|
|
10200
|
-
vue.createVNode(_sfc_main$
|
|
10373
|
+
vue.createVNode(_sfc_main$w, { data: _ctx.menu }, null, 8, ["data"])
|
|
10201
10374
|
])
|
|
10202
10375
|
]),
|
|
10203
10376
|
"content-before": vue.withCtx(() => [
|
|
@@ -10218,6 +10391,9 @@
|
|
|
10218
10391
|
"layer-node-content": vue.withCtx(({ data }) => [
|
|
10219
10392
|
vue.renderSlot(_ctx.$slots, "layer-node-content", { data })
|
|
10220
10393
|
]),
|
|
10394
|
+
"layer-node-tool": vue.withCtx(({ data }) => [
|
|
10395
|
+
vue.renderSlot(_ctx.$slots, "layer-node-tool", { data })
|
|
10396
|
+
]),
|
|
10221
10397
|
"component-list-panel-header": vue.withCtx(() => [
|
|
10222
10398
|
vue.renderSlot(_ctx.$slots, "component-list-panel-header")
|
|
10223
10399
|
]),
|
|
@@ -10233,6 +10409,9 @@
|
|
|
10233
10409
|
data
|
|
10234
10410
|
})
|
|
10235
10411
|
]),
|
|
10412
|
+
"data-source-panel-tool": vue.withCtx(({ data }) => [
|
|
10413
|
+
vue.renderSlot(_ctx.$slots, "data-source-panel-tool", { data })
|
|
10414
|
+
]),
|
|
10236
10415
|
_: 3
|
|
10237
10416
|
}, 8, ["data", "layer-content-menu"])
|
|
10238
10417
|
])
|
|
@@ -10258,7 +10437,7 @@
|
|
|
10258
10437
|
]),
|
|
10259
10438
|
"props-panel": vue.withCtx(() => [
|
|
10260
10439
|
vue.renderSlot(_ctx.$slots, "props-panel", {}, () => [
|
|
10261
|
-
vue.createVNode(_sfc_main$
|
|
10440
|
+
vue.createVNode(_sfc_main$v, {
|
|
10262
10441
|
"extend-state": _ctx.extendFormState,
|
|
10263
10442
|
onMounted: _cache[0] || (_cache[0] = (instance) => _ctx.$emit("props-panel-mounted", instance))
|
|
10264
10443
|
}, {
|
|
@@ -10296,61 +10475,61 @@
|
|
|
10296
10475
|
app.config.globalProperties.$TMAGIC_EDITOR = option;
|
|
10297
10476
|
setConfig(option);
|
|
10298
10477
|
app.component(_sfc_main.name, _sfc_main);
|
|
10299
|
-
app.component("m-fields-ui-select", _sfc_main$
|
|
10300
|
-
app.component("m-fields-code-link", _sfc_main$
|
|
10301
|
-
app.component("m-fields-vs-code", _sfc_main$
|
|
10302
|
-
app.component("magic-code-editor", _sfc_main$
|
|
10303
|
-
app.component("m-fields-code-select", _sfc_main$
|
|
10304
|
-
app.component("m-fields-code-select-col", _sfc_main$
|
|
10305
|
-
app.component("m-fields-event-select", _sfc_main$
|
|
10306
|
-
app.component("m-fields-data-source-fields", _sfc_main$
|
|
10307
|
-
app.component("m-fields-data-source-mocks", _sfc_main$
|
|
10308
|
-
app.component("m-fields-key-value", _sfc_main$
|
|
10309
|
-
app.component("m-fields-data-source-input", _sfc_main$
|
|
10310
|
-
app.component("m-fields-data-source-select", _sfc_main$
|
|
10311
|
-
app.component("m-fields-data-source-methods", _sfc_main$
|
|
10312
|
-
app.component("m-fields-data-source-method-select", _sfc_main$
|
|
10313
|
-
app.component("m-fields-data-source-field-select", _sfc_main$
|
|
10478
|
+
app.component("m-fields-ui-select", _sfc_main$C);
|
|
10479
|
+
app.component("m-fields-code-link", _sfc_main$R);
|
|
10480
|
+
app.component("m-fields-vs-code", _sfc_main$S);
|
|
10481
|
+
app.component("magic-code-editor", _sfc_main$T);
|
|
10482
|
+
app.component("m-fields-code-select", _sfc_main$Q);
|
|
10483
|
+
app.component("m-fields-code-select-col", _sfc_main$M);
|
|
10484
|
+
app.component("m-fields-event-select", _sfc_main$E);
|
|
10485
|
+
app.component("m-fields-data-source-fields", _sfc_main$L);
|
|
10486
|
+
app.component("m-fields-data-source-mocks", _sfc_main$G);
|
|
10487
|
+
app.component("m-fields-key-value", _sfc_main$D);
|
|
10488
|
+
app.component("m-fields-data-source-input", _sfc_main$J);
|
|
10489
|
+
app.component("m-fields-data-source-select", _sfc_main$F);
|
|
10490
|
+
app.component("m-fields-data-source-methods", _sfc_main$I);
|
|
10491
|
+
app.component("m-fields-data-source-method-select", _sfc_main$H);
|
|
10492
|
+
app.component("m-fields-data-source-field-select", _sfc_main$K);
|
|
10314
10493
|
}
|
|
10315
10494
|
};
|
|
10316
10495
|
|
|
10317
10496
|
exports.CODE_DRAFT_STORAGE_KEY = CODE_DRAFT_STORAGE_KEY;
|
|
10318
10497
|
exports.COPY_STORAGE_KEY = COPY_STORAGE_KEY;
|
|
10319
|
-
exports.CodeBlockEditor = _sfc_main$
|
|
10320
|
-
exports.CodeBlockList = _sfc_main$
|
|
10321
|
-
exports.CodeBlockListPanel = _sfc_main$
|
|
10498
|
+
exports.CodeBlockEditor = _sfc_main$P;
|
|
10499
|
+
exports.CodeBlockList = _sfc_main$r;
|
|
10500
|
+
exports.CodeBlockListPanel = _sfc_main$q;
|
|
10322
10501
|
exports.CodeDeleteErrorType = CodeDeleteErrorType;
|
|
10323
|
-
exports.CodeSelect = _sfc_main$
|
|
10324
|
-
exports.CodeSelectCol = _sfc_main$
|
|
10502
|
+
exports.CodeSelect = _sfc_main$Q;
|
|
10503
|
+
exports.CodeSelectCol = _sfc_main$M;
|
|
10325
10504
|
exports.ColumnLayout = ColumnLayout;
|
|
10326
10505
|
exports.ComponentListPanel = _sfc_main$f;
|
|
10327
|
-
exports.ContentMenu = _sfc_main$
|
|
10328
|
-
exports.DataSourceFieldSelect = _sfc_main$
|
|
10329
|
-
exports.DataSourceFields = _sfc_main$
|
|
10330
|
-
exports.DataSourceInput = _sfc_main$
|
|
10331
|
-
exports.DataSourceMethodSelect = _sfc_main$
|
|
10332
|
-
exports.DataSourceMethods = _sfc_main$
|
|
10333
|
-
exports.DataSourceMocks = _sfc_main$
|
|
10334
|
-
exports.DataSourceSelect = _sfc_main$
|
|
10506
|
+
exports.ContentMenu = _sfc_main$k;
|
|
10507
|
+
exports.DataSourceFieldSelect = _sfc_main$K;
|
|
10508
|
+
exports.DataSourceFields = _sfc_main$L;
|
|
10509
|
+
exports.DataSourceInput = _sfc_main$J;
|
|
10510
|
+
exports.DataSourceMethodSelect = _sfc_main$H;
|
|
10511
|
+
exports.DataSourceMethods = _sfc_main$I;
|
|
10512
|
+
exports.DataSourceMocks = _sfc_main$G;
|
|
10513
|
+
exports.DataSourceSelect = _sfc_main$F;
|
|
10335
10514
|
exports.DepTargetType = DepTargetType;
|
|
10336
10515
|
exports.DragType = DragType;
|
|
10337
|
-
exports.EventSelect = _sfc_main$
|
|
10516
|
+
exports.EventSelect = _sfc_main$E;
|
|
10338
10517
|
exports.Fixed2Other = Fixed2Other;
|
|
10339
10518
|
exports.H_GUIDE_LINE_STORAGE_KEY = H_GUIDE_LINE_STORAGE_KEY;
|
|
10340
|
-
exports.Icon = _sfc_main$
|
|
10519
|
+
exports.Icon = _sfc_main$N;
|
|
10341
10520
|
exports.KeyBindingCommand = KeyBindingCommand;
|
|
10342
|
-
exports.KeyValue = _sfc_main$
|
|
10521
|
+
exports.KeyValue = _sfc_main$D;
|
|
10343
10522
|
exports.Keys = Keys;
|
|
10344
10523
|
exports.LayerOffset = LayerOffset;
|
|
10345
10524
|
exports.LayerPanel = _sfc_main$g;
|
|
10346
10525
|
exports.Layout = Layout;
|
|
10347
|
-
exports.LayoutContainer = _sfc_main$
|
|
10348
|
-
exports.PropsPanel = _sfc_main$
|
|
10349
|
-
exports.Resizer = _sfc_main$
|
|
10350
|
-
exports.SplitView = _sfc_main$
|
|
10351
|
-
exports.TMagicCodeEditor = _sfc_main$
|
|
10526
|
+
exports.LayoutContainer = _sfc_main$A;
|
|
10527
|
+
exports.PropsPanel = _sfc_main$v;
|
|
10528
|
+
exports.Resizer = _sfc_main$B;
|
|
10529
|
+
exports.SplitView = _sfc_main$A;
|
|
10530
|
+
exports.TMagicCodeEditor = _sfc_main$T;
|
|
10352
10531
|
exports.TMagicEditor = _sfc_main;
|
|
10353
|
-
exports.ToolButton = _sfc_main$
|
|
10532
|
+
exports.ToolButton = _sfc_main$x;
|
|
10354
10533
|
exports.UI_SELECT_MODE_EVENT_NAME = UI_SELECT_MODE_EVENT_NAME;
|
|
10355
10534
|
exports.V_GUIDE_LINE_STORAGE_KEY = V_GUIDE_LINE_STORAGE_KEY;
|
|
10356
10535
|
exports.advancedTabConfig = advancedTabConfig;
|
|
@@ -10376,6 +10555,7 @@
|
|
|
10376
10555
|
exports.getDefaultConfig = getDefaultConfig;
|
|
10377
10556
|
exports.getDisplayField = getDisplayField;
|
|
10378
10557
|
exports.getFormConfig = getFormConfig;
|
|
10558
|
+
exports.getFormValue = getFormValue;
|
|
10379
10559
|
exports.getGuideLineFromCache = getGuideLineFromCache;
|
|
10380
10560
|
exports.getInitPositionStyle = getInitPositionStyle;
|
|
10381
10561
|
exports.getNodeIndex = getNodeIndex;
|