@tmagic/editor 1.3.0-alpha.21 → 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.
@@ -3,7 +3,7 @@ import { FullScreen, Edit, View, Coin, Delete, Plus, Close, ArrowDown, Grid, Mem
3
3
  import { throttle, isEmpty, cloneDeep, mergeWith, isObject, uniq, map, has, difference, union, pick, keys } from 'lodash-es';
4
4
  import * as monaco from 'monaco-editor';
5
5
  import serialize from 'serialize-javascript';
6
- import { TMagicButton, TMagicCard, tMagicMessage, TMagicIcon, tMagicMessageBox, getConfig as getConfig$1, TMagicTag, TMagicInput, TMagicTooltip, TMagicScrollbar, TMagicDivider, TMagicDropdown, TMagicDropdownMenu, TMagicDropdownItem, TMagicTree, TMagicCollapse, TMagicCollapseItem, TMagicPopover } from '@tmagic/design';
6
+ import { TMagicButton, TMagicCard, tMagicMessage, TMagicIcon, tMagicMessageBox, getConfig as getConfig$1, TMagicTag, TMagicInput, TMagicTooltip, TMagicScrollbar, TMagicDivider, TMagicDropdown, TMagicDropdownMenu, TMagicDropdownItem, TMagicTree, TMagicPopover, TMagicCollapse, TMagicCollapseItem } from '@tmagic/design';
7
7
  import { HookType, NodeType, ActionType } from '@tmagic/schema';
8
8
  import { MFormDrawer, MForm, createValues, MSelect } from '@tmagic/form';
9
9
  import { MagicTable } from '@tmagic/table';
@@ -534,7 +534,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
534
534
  }
535
535
  });
536
536
 
537
- function BaseFormConfig(datasourceTypeList = []) {
537
+ function BaseFormConfig() {
538
538
  return [
539
539
  {
540
540
  name: "id",
@@ -543,12 +543,7 @@ function BaseFormConfig(datasourceTypeList = []) {
543
543
  {
544
544
  name: "type",
545
545
  text: "类型",
546
- type: "select",
547
- options: [
548
- { text: "基础", value: "base" },
549
- { text: "HTTP", value: "http" },
550
- ...datasourceTypeList.map((item) => ({ text: item.text, value: item.type }))
551
- ],
546
+ type: "hidden",
552
547
  defaultValue: "base"
553
548
  },
554
549
  {
@@ -617,8 +612,8 @@ const HttpFormConfig = [
617
612
  }
618
613
  ];
619
614
 
620
- const fillConfig$1 = (config, datasourceTypeList) => [
621
- ...BaseFormConfig(datasourceTypeList),
615
+ const fillConfig$1 = (config) => [
616
+ ...BaseFormConfig(),
622
617
  ...config,
623
618
  {
624
619
  type: "panel",
@@ -627,7 +622,7 @@ const fillConfig$1 = (config, datasourceTypeList) => [
627
622
  {
628
623
  name: "fields",
629
624
  type: "data-source-fields",
630
- defaultValue: []
625
+ defaultValue: () => []
631
626
  }
632
627
  ]
633
628
  },
@@ -638,19 +633,19 @@ const fillConfig$1 = (config, datasourceTypeList) => [
638
633
  {
639
634
  name: "methods",
640
635
  type: "data-source-methods",
641
- defaultValue: []
636
+ defaultValue: () => []
642
637
  }
643
638
  ]
644
639
  }
645
640
  ];
646
- const getFormConfig = (type, datasourceTypeList, configs) => {
641
+ const getFormConfig = (type, configs) => {
647
642
  switch (type) {
648
643
  case "base":
649
- return fillConfig$1([], datasourceTypeList);
644
+ return fillConfig$1([]);
650
645
  case "http":
651
- return fillConfig$1(HttpFormConfig, datasourceTypeList);
646
+ return fillConfig$1(HttpFormConfig);
652
647
  default:
653
- return fillConfig$1(configs[type] || [], datasourceTypeList);
648
+ return fillConfig$1(configs[type] || []);
654
649
  }
655
650
  };
656
651
  const getDisplayField = (dataSources, key) => {
@@ -830,7 +825,7 @@ class DataSource extends BaseService {
830
825
  return this.state[name];
831
826
  }
832
827
  getFormConfig(type = "base") {
833
- return getFormConfig(type, this.get("datasourceTypeList"), this.get("configs"));
828
+ return getFormConfig(type, this.get("configs"));
834
829
  }
835
830
  setFormConfig(type, config) {
836
831
  this.get("configs")[type] = config;
@@ -2306,12 +2301,14 @@ let Editor$1 = class Editor extends BaseService {
2306
2301
  const doc = stage?.renderer.contentWindow?.document;
2307
2302
  if (doc) {
2308
2303
  const el = doc.getElementById(`${node.id}`);
2309
- const parentEl = el?.offsetParent;
2304
+ const parentEl = layout === Layout.FIXED ? doc.body : el?.offsetParent;
2310
2305
  if (parentEl && el) {
2311
2306
  node.style.left = (parentEl.clientWidth - el.clientWidth) / 2;
2307
+ node.style.right = "";
2312
2308
  }
2313
2309
  } else if (parent.style && isNumber(parent.style?.width) && isNumber(node.style?.width)) {
2314
2310
  node.style.left = (parent.style.width - node.style.width) / 2;
2311
+ node.style.right = "";
2315
2312
  }
2316
2313
  return node;
2317
2314
  }
@@ -2423,21 +2420,43 @@ let Editor$1 = class Editor extends BaseService {
2423
2420
  if (!node || isPage(node))
2424
2421
  return;
2425
2422
  const { style, id, type } = node;
2426
- if (!style || style.position !== "absolute")
2427
- return;
2428
- if (top && !isNumber(style.top))
2423
+ if (!style || !["absolute", "fixed"].includes(style.position))
2429
2424
  return;
2430
- if (left && !isNumber(style.left))
2431
- return;
2432
- this.update({
2425
+ const update = (style2) => this.update({
2433
2426
  id,
2434
2427
  type,
2435
- style: {
2436
- ...style,
2437
- left: Number(style.left) + left,
2438
- top: Number(style.top) + top
2439
- }
2428
+ style: style2
2440
2429
  });
2430
+ if (top) {
2431
+ if (isNumber(style.top)) {
2432
+ update({
2433
+ ...style,
2434
+ top: Number(style.top) + Number(top),
2435
+ bottom: ""
2436
+ });
2437
+ } else if (isNumber(style.bottom)) {
2438
+ update({
2439
+ ...style,
2440
+ bottom: Number(style.bottom) - Number(top),
2441
+ top: ""
2442
+ });
2443
+ }
2444
+ }
2445
+ if (left) {
2446
+ if (isNumber(style.left)) {
2447
+ update({
2448
+ ...style,
2449
+ left: Number(style.left) + Number(left),
2450
+ right: ""
2451
+ });
2452
+ } else if (isNumber(style.right)) {
2453
+ update({
2454
+ ...style,
2455
+ right: Number(style.right) - Number(left),
2456
+ left: ""
2457
+ });
2458
+ }
2459
+ }
2441
2460
  }
2442
2461
  resetState() {
2443
2462
  this.set("root", null);
@@ -2748,7 +2767,7 @@ const useCodeBlockEdit = (codeBlockService) => {
2748
2767
  };
2749
2768
 
2750
2769
  const _hoisted_1$p = { class: "m-fields-code-select-col" };
2751
- const _hoisted_2$g = { class: "code-select-container" };
2770
+ const _hoisted_2$i = { class: "code-select-container" };
2752
2771
  const _sfc_main$E = /* @__PURE__ */ defineComponent({
2753
2772
  ...{
2754
2773
  name: "MEditorCodeSelectCol"
@@ -2816,7 +2835,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
2816
2835
  return (_ctx, _cache) => {
2817
2836
  const _component_m_form_container = resolveComponent("m-form-container");
2818
2837
  return openBlock(), createElementBlock("div", _hoisted_1$p, [
2819
- createElementVNode("div", _hoisted_2$g, [
2838
+ createElementVNode("div", _hoisted_2$i, [
2820
2839
  createVNode(_component_m_form_container, {
2821
2840
  class: "select",
2822
2841
  config: selectConfig,
@@ -2852,7 +2871,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
2852
2871
  });
2853
2872
 
2854
2873
  const _hoisted_1$o = { class: "m-editor-data-source-fields" };
2855
- const _hoisted_2$f = { class: "m-editor-data-source-fields-footer" };
2874
+ const _hoisted_2$h = { class: "m-editor-data-source-fields-footer" };
2856
2875
  const _sfc_main$D = /* @__PURE__ */ defineComponent({
2857
2876
  ...{
2858
2877
  name: "MEditorDataSourceFields"
@@ -2872,9 +2891,11 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
2872
2891
  emits: ["change"],
2873
2892
  setup(__props, { emit }) {
2874
2893
  const props = __props;
2894
+ const services = inject("services");
2875
2895
  const addDialog = ref();
2876
2896
  const fieldValues = ref({});
2877
2897
  const filedTitle = ref("");
2898
+ const width = computed(() => globalThis.document.body.clientWidth - (services?.uiService.get("columnWidth").left || 0));
2878
2899
  const newHandler = () => {
2879
2900
  fieldValues.value = {};
2880
2901
  filedTitle.value = "新增属性";
@@ -3007,7 +3028,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
3007
3028
  data: _ctx.model[_ctx.name],
3008
3029
  columns: fieldColumns
3009
3030
  }, null, 8, ["data"]),
3010
- createElementVNode("div", _hoisted_2$f, [
3031
+ createElementVNode("div", _hoisted_2$h, [
3011
3032
  createVNode(unref(TMagicButton), {
3012
3033
  size: "small",
3013
3034
  type: "primary",
@@ -3030,8 +3051,9 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
3030
3051
  values: fieldValues.value,
3031
3052
  parentValues: _ctx.model[_ctx.name],
3032
3053
  disabled: _ctx.disabled,
3054
+ width: width.value,
3033
3055
  onSubmit: fieldChange
3034
- }, null, 8, ["title", "values", "parentValues", "disabled"])
3056
+ }, null, 8, ["title", "values", "parentValues", "disabled", "width"])
3035
3057
  ]);
3036
3058
  };
3037
3059
  }
@@ -3085,8 +3107,8 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
3085
3107
  });
3086
3108
 
3087
3109
  const _hoisted_1$n = { style: { "display": "flex", "flex-direction": "column", "line-height": "1.2em" } };
3088
- const _hoisted_2$e = { style: { "font-size": "10px", "color": "rgba(0, 0, 0, 0.6)" } };
3089
- const _hoisted_3$5 = { class: "el-input__inner" };
3110
+ const _hoisted_2$g = { style: { "font-size": "10px", "color": "rgba(0, 0, 0, 0.6)" } };
3111
+ const _hoisted_3$6 = { class: "el-input__inner" };
3090
3112
  const _sfc_main$B = /* @__PURE__ */ defineComponent({
3091
3113
  ...{
3092
3114
  name: "MEditorDataSourceInput"
@@ -3132,6 +3154,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
3132
3154
  const blurHandler = () => {
3133
3155
  isFocused.value = false;
3134
3156
  setDisplayState();
3157
+ emit("change", state.value);
3135
3158
  };
3136
3159
  const changeHandler = (v) => {
3137
3160
  emit("change", v);
@@ -3248,6 +3271,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
3248
3271
  newSelectionStart = dotIndex + suggestText.length + 1;
3249
3272
  }
3250
3273
  input.value?.setSelectionRange(newSelectionStart, newSelectionStart);
3274
+ changeHandler(state.value);
3251
3275
  };
3252
3276
  return (_ctx, _cache) => {
3253
3277
  return _ctx.disabled || isFocused.value ? (openBlock(), createBlock(resolveDynamicComponent(unref(getConfig$1)("components")?.autocomplete.component || "el-autocomplete"), mergeProps(
@@ -3269,7 +3293,6 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
3269
3293
  {
3270
3294
  style: { "width": "100%" },
3271
3295
  onBlur: blurHandler,
3272
- onChange: changeHandler,
3273
3296
  onInput: inputHandler,
3274
3297
  onSelect: selectHandler
3275
3298
  }
@@ -3280,7 +3303,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
3280
3303
  default: withCtx(({ item }) => [
3281
3304
  createElementVNode("div", _hoisted_1$n, [
3282
3305
  createElementVNode("div", null, toDisplayString(item.text), 1),
3283
- createElementVNode("span", _hoisted_2$e, toDisplayString(item.value), 1)
3306
+ createElementVNode("span", _hoisted_2$g, toDisplayString(item.value), 1)
3284
3307
  ])
3285
3308
  ]),
3286
3309
  _: 1
@@ -3292,7 +3315,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
3292
3315
  createElementVNode("div", {
3293
3316
  class: normalizeClass(`tmagic-data-source-input-text-wrapper el-input__wrapper ${isFocused.value ? " is-focus" : ""}`)
3294
3317
  }, [
3295
- createElementVNode("div", _hoisted_3$5, [
3318
+ createElementVNode("div", _hoisted_3$6, [
3296
3319
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayState.value, (item, index) => {
3297
3320
  return openBlock(), createElementBlock(Fragment, null, [
3298
3321
  item.type === "text" ? (openBlock(), createElementBlock("span", {
@@ -3394,7 +3417,7 @@ const useDataSourceMethod = () => {
3394
3417
  };
3395
3418
 
3396
3419
  const _hoisted_1$m = { class: "m-editor-data-source-methods" };
3397
- const _hoisted_2$d = { class: "m-editor-data-source-methods-footer" };
3420
+ const _hoisted_2$f = { class: "m-editor-data-source-methods-footer" };
3398
3421
  const _sfc_main$A = /* @__PURE__ */ defineComponent({
3399
3422
  ...{
3400
3423
  name: "MEditorDataSourceMethods"
@@ -3469,7 +3492,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
3469
3492
  data: _ctx.model[_ctx.name],
3470
3493
  columns: methodColumns
3471
3494
  }, null, 8, ["data"]),
3472
- createElementVNode("div", _hoisted_2$d, [
3495
+ createElementVNode("div", _hoisted_2$f, [
3473
3496
  createVNode(unref(TMagicButton), {
3474
3497
  size: "small",
3475
3498
  type: "primary",
@@ -3498,7 +3521,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
3498
3521
  });
3499
3522
 
3500
3523
  const _hoisted_1$l = { class: "m-fields-data-source-method-select" };
3501
- const _hoisted_2$c = { class: "data-source-method-select-container" };
3524
+ const _hoisted_2$e = { class: "data-source-method-select-container" };
3502
3525
  const _sfc_main$z = /* @__PURE__ */ defineComponent({
3503
3526
  ...{
3504
3527
  name: "MEditorDataSourceMethodSelect"
@@ -3578,7 +3601,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
3578
3601
  return (_ctx, _cache) => {
3579
3602
  const _component_m_form_container = resolveComponent("m-form-container");
3580
3603
  return openBlock(), createElementBlock("div", _hoisted_1$l, [
3581
- createElementVNode("div", _hoisted_2$c, [
3604
+ createElementVNode("div", _hoisted_2$e, [
3582
3605
  createVNode(_component_m_form_container, {
3583
3606
  class: "select",
3584
3607
  config: cascaderConfig,
@@ -3670,7 +3693,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
3670
3693
  });
3671
3694
 
3672
3695
  const _hoisted_1$k = { class: "m-fields-event-select" };
3673
- const _hoisted_2$b = {
3696
+ const _hoisted_2$d = {
3674
3697
  key: 1,
3675
3698
  class: "fullWidth"
3676
3699
  };
@@ -3874,7 +3897,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
3874
3897
  model: _ctx.model,
3875
3898
  config: tableConfig.value,
3876
3899
  onChange: onChangeHandler
3877
- }, null, 8, ["size", "disabled", "model", "config"])) : (openBlock(), createElementBlock("div", _hoisted_2$b, [
3900
+ }, null, 8, ["size", "disabled", "model", "config"])) : (openBlock(), createElementBlock("div", _hoisted_2$d, [
3878
3901
  createVNode(unref(TMagicButton), {
3879
3902
  class: "create-button",
3880
3903
  type: "primary",
@@ -3924,7 +3947,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
3924
3947
  });
3925
3948
 
3926
3949
  const _hoisted_1$j = { class: "m-fields-key-value" };
3927
- const _hoisted_2$a = /* @__PURE__ */ createElementVNode("span", { class: "m-fileds-key-value-delimiter" }, ":", -1);
3950
+ const _hoisted_2$c = /* @__PURE__ */ createElementVNode("span", { class: "m-fileds-key-value-delimiter" }, ":", -1);
3928
3951
  const _sfc_main$w = /* @__PURE__ */ defineComponent({
3929
3952
  ...{
3930
3953
  name: "MEditorKeyValue"
@@ -3984,7 +4007,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
3984
4007
  size: _ctx.size,
3985
4008
  onChange: keyChangeHandler
3986
4009
  }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "size"]),
3987
- _hoisted_2$a,
4010
+ _hoisted_2$c,
3988
4011
  createVNode(unref(TMagicInput), {
3989
4012
  placeholder: "value",
3990
4013
  modelValue: records.value[index][1],
@@ -4363,8 +4386,8 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
4363
4386
  });
4364
4387
 
4365
4388
  const _hoisted_1$h = { class: "m-editor-empty-panel" };
4366
- const _hoisted_2$9 = { class: "m-editor-empty-content" };
4367
- const _hoisted_3$4 = /* @__PURE__ */ createElementVNode("p", null, "新增页面", -1);
4389
+ const _hoisted_2$b = { class: "m-editor-empty-content" };
4390
+ const _hoisted_3$5 = /* @__PURE__ */ createElementVNode("p", null, "新增页面", -1);
4368
4391
  const _sfc_main$s = /* @__PURE__ */ defineComponent({
4369
4392
  ...{
4370
4393
  name: "MEditorAddPageBox"
@@ -4386,7 +4409,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
4386
4409
  };
4387
4410
  return (_ctx, _cache) => {
4388
4411
  return openBlock(), createElementBlock("div", _hoisted_1$h, [
4389
- createElementVNode("div", _hoisted_2$9, [
4412
+ createElementVNode("div", _hoisted_2$b, [
4390
4413
  createElementVNode("div", {
4391
4414
  class: "m-editor-empty-button",
4392
4415
  onClick: clickHandler
@@ -4394,7 +4417,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
4394
4417
  createElementVNode("div", null, [
4395
4418
  createVNode(_sfc_main$F, { icon: unref(Plus) }, null, 8, ["icon"])
4396
4419
  ]),
4397
- _hoisted_3$4
4420
+ _hoisted_3$5
4398
4421
  ])
4399
4422
  ])
4400
4423
  ]);
@@ -4537,7 +4560,7 @@ const _hoisted_1$g = {
4537
4560
  key: 1,
4538
4561
  class: "menu-item-text"
4539
4562
  };
4540
- const _hoisted_2$8 = { class: "el-dropdown-link menubar-menu-button" };
4563
+ const _hoisted_2$a = { class: "el-dropdown-link menubar-menu-button" };
4541
4564
  const _sfc_main$q = /* @__PURE__ */ defineComponent({
4542
4565
  ...{
4543
4566
  name: "MEditorToolButton"
@@ -4681,7 +4704,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
4681
4704
  })) : createCommentVNode("", true)
4682
4705
  ]),
4683
4706
  default: withCtx(() => [
4684
- createElementVNode("span", _hoisted_2$8, [
4707
+ createElementVNode("span", _hoisted_2$a, [
4685
4708
  createTextVNode(toDisplayString(_ctx.data.text), 1),
4686
4709
  createVNode(unref(TMagicIcon), { class: "el-icon--right" }, {
4687
4710
  default: withCtx(() => [
@@ -4982,7 +5005,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
4982
5005
  });
4983
5006
 
4984
5007
  const _hoisted_1$e = { xmlns: "http://www.w3.org/2000/svg" };
4985
- const _hoisted_2$7 = /* @__PURE__ */ createElementVNode("g", {
5008
+ const _hoisted_2$9 = /* @__PURE__ */ createElementVNode("g", {
4986
5009
  fill: "#7C878E",
4987
5010
  "fill-rule": "evenodd"
4988
5011
  }, [
@@ -4992,8 +5015,8 @@ const _hoisted_2$7 = /* @__PURE__ */ createElementVNode("g", {
4992
5015
  }),
4993
5016
  /* @__PURE__ */ createElementVNode("path", { d: "M8 13.5L2.3 9.2 0.7 10.5 8 16 15.3 10.5 13.7 9.2z" })
4994
5017
  ], -1);
4995
- const _hoisted_3$3 = [
4996
- _hoisted_2$7
5018
+ const _hoisted_3$4 = [
5019
+ _hoisted_2$9
4997
5020
  ];
4998
5021
  const _sfc_main$m = /* @__PURE__ */ defineComponent({
4999
5022
  ...{
@@ -5002,7 +5025,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
5002
5025
  __name: "AppManageIcon",
5003
5026
  setup(__props) {
5004
5027
  return (_ctx, _cache) => {
5005
- return openBlock(), createElementBlock("svg", _hoisted_1$e, _hoisted_3$3);
5028
+ return openBlock(), createElementBlock("svg", _hoisted_1$e, _hoisted_3$4);
5006
5029
  };
5007
5030
  }
5008
5031
  });
@@ -5013,9 +5036,9 @@ const _hoisted_1$d = {
5013
5036
  xmlns: "http://www.w3.org/2000/svg",
5014
5037
  "xmlns:xlink": "http://www.w3.org/1999/xlink"
5015
5038
  };
5016
- const _hoisted_2$6 = /* @__PURE__ */ createStaticVNode('<defs><rect id="path-1" x="0" y="0" width="32" height="32"></rect></defs><g id="组件规范" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="03图标" transform="translate(-561.000000, -2356.000000)"><g id="icon/line/Universal/code" transform="translate(561.000000, 2356.000000)"><g id="路径"><mask id="mask-2" fill="white"><use xlink:href="#path-1"></use></mask><use id="蒙版" fill="#D8D8D8" opacity="0" xlink:href="#path-1"></use><path d="M21.9284587,7.9482233 L29.8079004,15.827665 C29.9055315,15.9252961 29.9055315,16.0835874 29.8079004,16.1812184 L21.9284587,24.0606602 C21.8308276,24.1582912 21.6725364,24.1582912 21.5749053,24.0606602 L20.3374684,22.8232233 C20.2419143,22.7276698 20.2398813,22.5740096 20.331369,22.4759832 L20.3374687,22.4696702 L26.8027181,16.0044417 L20.3374687,9.53921328 C20.2398372,9.44158265 20.2398369,9.2832914 20.3374679,9.18566017 L21.5749053,7.9482233 C21.6725364,7.85059223 21.8308276,7.85059223 21.9284587,7.9482233 Z M10.3999684,7.9482233 L11.6374053,9.18566017 C11.7329594,9.28121371 11.7349925,9.43487387 11.6435048,9.53290029 L11.637405,9.53921328 L5.17215562,16.0044417 L11.637405,22.4696702 C11.7329593,22.5652236 11.7349926,22.7188837 11.643505,22.8169103 L11.6374053,22.8232233 L10.3999684,24.0606602 C10.3023374,24.1582912 10.1440461,24.1582912 10.046415,24.0606602 L2.1669733,16.1812184 C2.06934223,16.0835874 2.06934223,15.9252961 2.1669733,15.827665 L10.046415,7.9482233 C10.1440461,7.85059223 10.3023374,7.85059223 10.3999684,7.9482233 Z M17.2612532,9.29310422 L18.9262468,9.83189578 C19.0576112,9.87440526 19.1296423,10.0153579 19.0871328,10.1467222 L15.0848232,22.514807 C15.0423138,22.6461714 14.9013612,22.7182025 14.7699968,22.675693 L13.1050032,22.1369014 C12.9736388,22.0943919 12.9016077,21.9534393 12.9441172,21.822075 L16.9464268,9.45399022 C16.9889362,9.32262585 17.1298888,9.25059474 17.2612532,9.29310422 Z" id="形状" fill="#1D1F24" mask="url(#mask-2)"></path></g></g><g id="icon切图" transform="translate(226.000000, 1782.000000)"></g></g></g>', 2);
5017
- const _hoisted_4$1 = [
5018
- _hoisted_2$6
5039
+ const _hoisted_2$8 = /* @__PURE__ */ createStaticVNode('<defs><rect id="path-1" x="0" y="0" width="32" height="32"></rect></defs><g id="组件规范" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="03图标" transform="translate(-561.000000, -2356.000000)"><g id="icon/line/Universal/code" transform="translate(561.000000, 2356.000000)"><g id="路径"><mask id="mask-2" fill="white"><use xlink:href="#path-1"></use></mask><use id="蒙版" fill="#D8D8D8" opacity="0" xlink:href="#path-1"></use><path d="M21.9284587,7.9482233 L29.8079004,15.827665 C29.9055315,15.9252961 29.9055315,16.0835874 29.8079004,16.1812184 L21.9284587,24.0606602 C21.8308276,24.1582912 21.6725364,24.1582912 21.5749053,24.0606602 L20.3374684,22.8232233 C20.2419143,22.7276698 20.2398813,22.5740096 20.331369,22.4759832 L20.3374687,22.4696702 L26.8027181,16.0044417 L20.3374687,9.53921328 C20.2398372,9.44158265 20.2398369,9.2832914 20.3374679,9.18566017 L21.5749053,7.9482233 C21.6725364,7.85059223 21.8308276,7.85059223 21.9284587,7.9482233 Z M10.3999684,7.9482233 L11.6374053,9.18566017 C11.7329594,9.28121371 11.7349925,9.43487387 11.6435048,9.53290029 L11.637405,9.53921328 L5.17215562,16.0044417 L11.637405,22.4696702 C11.7329593,22.5652236 11.7349926,22.7188837 11.643505,22.8169103 L11.6374053,22.8232233 L10.3999684,24.0606602 C10.3023374,24.1582912 10.1440461,24.1582912 10.046415,24.0606602 L2.1669733,16.1812184 C2.06934223,16.0835874 2.06934223,15.9252961 2.1669733,15.827665 L10.046415,7.9482233 C10.1440461,7.85059223 10.3023374,7.85059223 10.3999684,7.9482233 Z M17.2612532,9.29310422 L18.9262468,9.83189578 C19.0576112,9.87440526 19.1296423,10.0153579 19.0871328,10.1467222 L15.0848232,22.514807 C15.0423138,22.6461714 14.9013612,22.7182025 14.7699968,22.675693 L13.1050032,22.1369014 C12.9736388,22.0943919 12.9016077,21.9534393 12.9441172,21.822075 L16.9464268,9.45399022 C16.9889362,9.32262585 17.1298888,9.25059474 17.2612532,9.29310422 Z" id="形状" fill="#1D1F24" mask="url(#mask-2)"></path></g></g><g id="icon切图" transform="translate(226.000000, 1782.000000)"></g></g></g>', 2);
5040
+ const _hoisted_4$2 = [
5041
+ _hoisted_2$8
5019
5042
  ];
5020
5043
  const _sfc_main$l = /* @__PURE__ */ defineComponent({
5021
5044
  ...{
@@ -5024,14 +5047,14 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
5024
5047
  __name: "CodeIcon",
5025
5048
  setup(__props) {
5026
5049
  return (_ctx, _cache) => {
5027
- return openBlock(), createElementBlock("svg", _hoisted_1$d, _hoisted_4$1);
5050
+ return openBlock(), createElementBlock("svg", _hoisted_1$d, _hoisted_4$2);
5028
5051
  };
5029
5052
  }
5030
5053
  });
5031
5054
 
5032
5055
  const _hoisted_1$c = ["id"];
5033
- const _hoisted_2$5 = { class: "list-item" };
5034
- const _hoisted_3$2 = {
5056
+ const _hoisted_2$7 = { class: "list-item" };
5057
+ const _hoisted_3$3 = {
5035
5058
  key: 2,
5036
5059
  class: "right-tool"
5037
5060
  };
@@ -5136,7 +5159,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
5136
5159
  id: data.id,
5137
5160
  class: "list-container"
5138
5161
  }, [
5139
- createElementVNode("div", _hoisted_2$5, [
5162
+ createElementVNode("div", _hoisted_2$7, [
5140
5163
  data.type === "code" ? (openBlock(), createBlock(_sfc_main$l, {
5141
5164
  key: 0,
5142
5165
  class: "codeIcon"
@@ -5148,7 +5171,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
5148
5171
  createElementVNode("span", {
5149
5172
  class: normalizeClass(["name", { code: data.type === "code", hook: data.type === "key" }])
5150
5173
  }, toDisplayString(data.name) + " (" + toDisplayString(data.id) + ")", 3),
5151
- data.type === "code" ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
5174
+ data.type === "code" ? (openBlock(), createElementBlock("div", _hoisted_3$3, [
5152
5175
  createVNode(unref(TMagicTooltip), {
5153
5176
  effect: "dark",
5154
5177
  content: editable.value ? "编辑" : "查看",
@@ -5226,7 +5249,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
5226
5249
  createTextVNode("新增")
5227
5250
  ]),
5228
5251
  _: 1
5229
- }, 8, ["onClick"])) : createCommentVNode("", true)
5252
+ }, 8, ["onClick"])) : createCommentVNode("", true),
5253
+ renderSlot(_ctx.$slots, "code-block-panel-search")
5230
5254
  ])
5231
5255
  ]),
5232
5256
  createVNode(_sfc_main$k, {
@@ -5331,8 +5355,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
5331
5355
  });
5332
5356
 
5333
5357
  const _hoisted_1$a = ["id"];
5334
- const _hoisted_2$4 = { class: "list-item" };
5335
- const _hoisted_3$1 = {
5358
+ const _hoisted_2$6 = { class: "list-item" };
5359
+ const _hoisted_3$2 = {
5336
5360
  key: 2,
5337
5361
  class: "right-tool"
5338
5362
  };
@@ -5431,7 +5455,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
5431
5455
  id: data.id,
5432
5456
  class: "list-container"
5433
5457
  }, [
5434
- createElementVNode("div", _hoisted_2$4, [
5458
+ createElementVNode("div", _hoisted_2$6, [
5435
5459
  data.type === "code" ? (openBlock(), createBlock(_sfc_main$F, {
5436
5460
  key: 0,
5437
5461
  class: "codeIcon",
@@ -5445,7 +5469,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
5445
5469
  createElementVNode("span", {
5446
5470
  class: normalizeClass(["name", { code: data.type === "ds", hook: data.type === "key" }])
5447
5471
  }, toDisplayString(data.type === "key" ? data.name : `${data.name}(${data.id})`), 3),
5448
- data.type === "ds" ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
5472
+ data.type === "ds" ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
5449
5473
  createVNode(unref(TMagicTooltip), {
5450
5474
  effect: "dark",
5451
5475
  content: editable.value ? "编辑" : "查看",
@@ -5490,6 +5514,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
5490
5514
  });
5491
5515
 
5492
5516
  const _hoisted_1$9 = { class: "search-wrapper" };
5517
+ const _hoisted_2$5 = { class: "data-source-list-panel-add-menu" };
5493
5518
  const _sfc_main$g = /* @__PURE__ */ defineComponent({
5494
5519
  ...{
5495
5520
  name: "MEditorDataSourceListPanel"
@@ -5499,11 +5524,22 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
5499
5524
  const { dataSourceService } = inject("services") || {};
5500
5525
  const editDialog = ref();
5501
5526
  const dataSourceValues = ref({});
5527
+ const dialogTitle = ref("");
5502
5528
  const editable = computed(() => dataSourceService?.get("editable") ?? true);
5503
- const addHandler = () => {
5529
+ const datasourceTypeList = computed(
5530
+ () => [
5531
+ { text: "基础", type: "base" },
5532
+ { text: "HTTP", type: "http" }
5533
+ ].concat(dataSourceService?.get("datasourceTypeList") ?? [])
5534
+ );
5535
+ const addHandler = (type) => {
5504
5536
  if (!editDialog.value)
5505
5537
  return;
5506
- dataSourceValues.value = {};
5538
+ dataSourceValues.value = {
5539
+ type
5540
+ };
5541
+ const datasourceType = datasourceTypeList.value.find((item) => item.type === type);
5542
+ dialogTitle.value = `新增${datasourceType?.text || ""}`;
5507
5543
  editDialog.value.show();
5508
5544
  };
5509
5545
  const editHandler = (id) => {
@@ -5512,6 +5548,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
5512
5548
  dataSourceValues.value = {
5513
5549
  ...dataSourceService?.getDataSourceById(id)
5514
5550
  };
5551
+ dialogTitle.value = `新增${dataSourceValues.value.title || ""}`;
5515
5552
  editDialog.value.show();
5516
5553
  };
5517
5554
  const removeHandler = (id) => {
@@ -5534,14 +5571,36 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
5534
5571
  default: withCtx(() => [
5535
5572
  createElementVNode("div", _hoisted_1$9, [
5536
5573
  createVNode(_sfc_main$n, { onSearch: filterTextChangeHandler }),
5537
- editable.value ? (openBlock(), createBlock(unref(TMagicButton), {
5574
+ editable.value ? (openBlock(), createBlock(unref(TMagicPopover), {
5538
5575
  key: 0,
5539
- type: "primary",
5540
- size: "small",
5541
- onClick: addHandler
5576
+ placement: "right"
5542
5577
  }, {
5578
+ reference: withCtx(() => [
5579
+ createVNode(unref(TMagicButton), {
5580
+ type: "primary",
5581
+ size: "small"
5582
+ }, {
5583
+ default: withCtx(() => [
5584
+ createTextVNode("新增")
5585
+ ]),
5586
+ _: 1
5587
+ })
5588
+ ]),
5543
5589
  default: withCtx(() => [
5544
- createTextVNode("新增")
5590
+ createElementVNode("div", _hoisted_2$5, [
5591
+ (openBlock(true), createElementBlock(Fragment, null, renderList(datasourceTypeList.value, (item, index) => {
5592
+ return openBlock(), createBlock(_sfc_main$q, {
5593
+ data: {
5594
+ type: "button",
5595
+ text: item.text,
5596
+ handler: () => {
5597
+ addHandler(item.type);
5598
+ }
5599
+ },
5600
+ key: index
5601
+ }, null, 8, ["data"]);
5602
+ }), 128))
5603
+ ])
5545
5604
  ]),
5546
5605
  _: 1
5547
5606
  })) : createCommentVNode("", true)
@@ -5555,7 +5614,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
5555
5614
  ref: editDialog,
5556
5615
  disabled: !editable.value,
5557
5616
  values: dataSourceValues.value,
5558
- title: typeof dataSourceValues.value.id !== "undefined" ? `编辑${dataSourceValues.value.title}` : "新增",
5617
+ title: dialogTitle.value,
5559
5618
  onSubmit: submitDataSourceHandler
5560
5619
  }, null, 8, ["disabled", "values", "title"])
5561
5620
  ]),
@@ -5566,7 +5625,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
5566
5625
  });
5567
5626
 
5568
5627
  const _hoisted_1$8 = ["onClick", "onDragstart"];
5569
- const _hoisted_2$3 = ["title"];
5628
+ const _hoisted_2$4 = ["title"];
5570
5629
  const _sfc_main$f = /* @__PURE__ */ defineComponent({
5571
5630
  ...{
5572
5631
  name: "MEditorComponentListPanel"
@@ -5675,7 +5734,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
5675
5734
  }, null, 8, ["title", "icon"]),
5676
5735
  createElementVNode("span", {
5677
5736
  title: item.text
5678
- }, toDisplayString(item.text), 9, _hoisted_2$3)
5737
+ }, toDisplayString(item.text), 9, _hoisted_2$4)
5679
5738
  ])
5680
5739
  ], 40, _hoisted_1$8);
5681
5740
  }), 128))
@@ -6343,6 +6402,12 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
6343
6402
  });
6344
6403
 
6345
6404
  const _hoisted_1$5 = {
6405
+ key: 0,
6406
+ class: "m-editor-sidebar"
6407
+ };
6408
+ const _hoisted_2$3 = { class: "m-editor-sidebar-header" };
6409
+ const _hoisted_3$1 = ["onClick"];
6410
+ const _hoisted_4$1 = {
6346
6411
  key: 1,
6347
6412
  class: "magic-editor-tab-panel-title"
6348
6413
  };
@@ -6357,8 +6422,6 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
6357
6422
  },
6358
6423
  setup(__props, { expose: __expose }) {
6359
6424
  const props = __props;
6360
- const tabPaneComponent = getConfig$1("components")?.tabPane;
6361
- const tabsComponent = getConfig$1("components")?.tabs;
6362
6425
  const activeTabName = ref(props.data?.status);
6363
6426
  const getItemConfig = (data) => {
6364
6427
  const map = {
@@ -6411,98 +6474,94 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
6411
6474
  activeTabName
6412
6475
  });
6413
6476
  return (_ctx, _cache) => {
6414
- return _ctx.data.type === "tabs" && _ctx.data.items.length ? (openBlock(), createBlock(resolveDynamicComponent(unref(tabsComponent)?.component || "el-tabs"), mergeProps({
6415
- key: 0,
6416
- modelValue: activeTabName.value,
6417
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeTabName.value = $event),
6418
- class: "m-editor-sidebar tmagic-design-tabs"
6419
- }, unref(tabsComponent)?.props({ type: "card", tabPosition: "left" }) || {}), {
6420
- default: withCtx(() => [
6477
+ return _ctx.data.type === "tabs" && _ctx.data.items.length ? (openBlock(), createElementBlock("div", _hoisted_1$5, [
6478
+ createElementVNode("div", _hoisted_2$3, [
6421
6479
  (openBlock(true), createElementBlock(Fragment, null, renderList(sideBarItems.value, (config, index) => {
6422
- return openBlock(), createBlock(resolveDynamicComponent(unref(tabPaneComponent)?.component || "el-tab-pane"), mergeProps(unref(tabPaneComponent)?.props({ name: config.text, lazy: config.lazy }) || {}, {
6423
- key: config.$key || index
6424
- }), {
6425
- label: withCtx(() => [
6426
- (openBlock(), createElementBlock("div", {
6427
- key: config.text
6428
- }, [
6429
- config.icon ? (openBlock(), createBlock(_sfc_main$F, {
6430
- key: 0,
6431
- icon: config.icon
6432
- }, null, 8, ["icon"])) : createCommentVNode("", true),
6433
- config.text ? (openBlock(), createElementBlock("div", _hoisted_1$5, toDisplayString(config.text), 1)) : createCommentVNode("", true)
6434
- ]))
6435
- ]),
6436
- default: withCtx(() => [
6437
- config ? (openBlock(), createBlock(resolveDynamicComponent(config.component), mergeProps({ key: 0 }, config.props || {}, toHandlers(config?.listeners || {})), createSlots({ _: 2 }, [
6438
- config.$key === "component-list" || config.slots?.componentListPanelHeader ? {
6439
- name: "component-list-panel-header",
6440
- fn: withCtx(() => [
6441
- config.$key === "component-list" ? renderSlot(_ctx.$slots, "component-list-panel-header", { key: 0 }) : config.slots?.componentListPanelHeader ? (openBlock(), createBlock(resolveDynamicComponent(config.slots.componentListPanelHeader), { key: 1 })) : createCommentVNode("", true)
6442
- ]),
6443
- key: "0"
6444
- } : void 0,
6445
- config.$key === "component-list" || config.slots?.componentListItem ? {
6446
- name: "component-list-item",
6447
- fn: withCtx(({ component }) => [
6448
- config.$key === "component-list" ? renderSlot(_ctx.$slots, "component-list-item", {
6449
- key: 0,
6450
- component
6451
- }) : config.slots?.componentListItem ? (openBlock(), createBlock(resolveDynamicComponent(config.slots.componentListItem), {
6452
- key: 1,
6453
- component
6454
- }, null, 8, ["component"])) : createCommentVNode("", true)
6455
- ]),
6456
- key: "1"
6457
- } : void 0,
6458
- config.$key === "layer" || config.slots?.layerPanelHeader ? {
6459
- name: "layer-panel-header",
6460
- fn: withCtx(() => [
6461
- config.$key === "layer" ? renderSlot(_ctx.$slots, "layer-panel-header", { key: 0 }) : config.slots?.layerPanelHeader ? (openBlock(), createBlock(resolveDynamicComponent(config.slots.layerPanelHeader), { key: 1 })) : createCommentVNode("", true)
6462
- ]),
6463
- key: "2"
6464
- } : void 0,
6465
- config.$key === "code-block" || config.slots?.codeBlockPanelHeader ? {
6466
- name: "code-block-panel-header",
6467
- fn: withCtx(() => [
6468
- config.$key === "code-block" ? renderSlot(_ctx.$slots, "code-block-panel-header", { key: 0 }) : config.slots?.codeBlockPanelHeader ? (openBlock(), createBlock(resolveDynamicComponent(config.slots.codeBlockPanelHeader), { key: 1 })) : createCommentVNode("", true)
6469
- ]),
6470
- key: "3"
6471
- } : void 0,
6472
- config.$key === "code-block" || config.slots?.codeBlockPanelTool ? {
6473
- name: "code-block-panel-tool",
6474
- fn: withCtx(({ id, data }) => [
6475
- config.$key === "code-block" ? renderSlot(_ctx.$slots, "code-block-panel-tool", {
6476
- key: 0,
6477
- id,
6478
- data
6479
- }) : config.slots?.codeBlockPanelTool ? (openBlock(), createBlock(resolveDynamicComponent(config.slots.codeBlockPanelTool), { key: 1 })) : createCommentVNode("", true)
6480
- ]),
6481
- key: "4"
6482
- } : void 0,
6483
- config.$key === "layer" || config.slots?.layerNodeContent ? {
6484
- name: "layer-node-content",
6485
- fn: withCtx(({ data: nodeData, node }) => [
6486
- config.$key === "layer" ? renderSlot(_ctx.$slots, "layer-node-content", {
6487
- key: 0,
6488
- data: nodeData,
6489
- node
6490
- }) : config.slots?.layerNodeContent ? (openBlock(), createBlock(resolveDynamicComponent(config.slots.layerNodeContent), {
6491
- key: 1,
6492
- data: nodeData,
6493
- node
6494
- }, null, 8, ["data", "node"])) : createCommentVNode("", true)
6495
- ]),
6496
- key: "5"
6497
- } : void 0
6498
- ]), 1040)) : createCommentVNode("", true)
6499
- ]),
6500
- _: 2
6501
- }, 1040);
6480
+ return openBlock(), createElementBlock("div", {
6481
+ class: normalizeClass(["m-editor-sidebar-header-item", { "is-active": activeTabName.value === config.text }]),
6482
+ key: config.$key ?? index,
6483
+ onClick: ($event) => activeTabName.value = config.text || `${index}`
6484
+ }, [
6485
+ config.icon ? (openBlock(), createBlock(_sfc_main$F, {
6486
+ key: 0,
6487
+ icon: config.icon
6488
+ }, null, 8, ["icon"])) : createCommentVNode("", true),
6489
+ config.text ? (openBlock(), createElementBlock("div", _hoisted_4$1, toDisplayString(config.text), 1)) : createCommentVNode("", true)
6490
+ ], 10, _hoisted_3$1);
6502
6491
  }), 128))
6503
6492
  ]),
6504
- _: 3
6505
- }, 16, ["modelValue"])) : createCommentVNode("", true);
6493
+ (openBlock(true), createElementBlock(Fragment, null, renderList(sideBarItems.value, (config, index) => {
6494
+ return withDirectives((openBlock(), createElementBlock("div", {
6495
+ class: "m-editor-sidebar-content",
6496
+ key: config.$key ?? index
6497
+ }, [
6498
+ config ? (openBlock(), createBlock(resolveDynamicComponent(config.component), mergeProps({ key: 0 }, config.props || {}, toHandlers(config?.listeners || {})), createSlots({ _: 2 }, [
6499
+ config.$key === "component-list" || config.slots?.componentListPanelHeader ? {
6500
+ name: "component-list-panel-header",
6501
+ fn: withCtx(() => [
6502
+ config.$key === "component-list" ? renderSlot(_ctx.$slots, "component-list-panel-header", { key: 0 }) : config.slots?.componentListPanelHeader ? (openBlock(), createBlock(resolveDynamicComponent(config.slots.componentListPanelHeader), { key: 1 })) : createCommentVNode("", true)
6503
+ ]),
6504
+ key: "0"
6505
+ } : void 0,
6506
+ config.$key === "component-list" || config.slots?.componentListItem ? {
6507
+ name: "component-list-item",
6508
+ fn: withCtx(({ component }) => [
6509
+ config.$key === "component-list" ? renderSlot(_ctx.$slots, "component-list-item", {
6510
+ key: 0,
6511
+ component
6512
+ }) : config.slots?.componentListItem ? (openBlock(), createBlock(resolveDynamicComponent(config.slots.componentListItem), {
6513
+ key: 1,
6514
+ component
6515
+ }, null, 8, ["component"])) : createCommentVNode("", true)
6516
+ ]),
6517
+ key: "1"
6518
+ } : void 0,
6519
+ config.$key === "layer" || config.slots?.layerPanelHeader ? {
6520
+ name: "layer-panel-header",
6521
+ fn: withCtx(() => [
6522
+ config.$key === "layer" ? renderSlot(_ctx.$slots, "layer-panel-header", { key: 0 }) : config.slots?.layerPanelHeader ? (openBlock(), createBlock(resolveDynamicComponent(config.slots.layerPanelHeader), { key: 1 })) : createCommentVNode("", true)
6523
+ ]),
6524
+ key: "2"
6525
+ } : void 0,
6526
+ config.$key === "code-block" || config.slots?.codeBlockPanelHeader ? {
6527
+ name: "code-block-panel-header",
6528
+ fn: withCtx(() => [
6529
+ config.$key === "code-block" ? renderSlot(_ctx.$slots, "code-block-panel-header", { key: 0 }) : config.slots?.codeBlockPanelHeader ? (openBlock(), createBlock(resolveDynamicComponent(config.slots.codeBlockPanelHeader), { key: 1 })) : createCommentVNode("", true)
6530
+ ]),
6531
+ key: "3"
6532
+ } : void 0,
6533
+ config.$key === "code-block" || config.slots?.codeBlockPanelTool ? {
6534
+ name: "code-block-panel-tool",
6535
+ fn: withCtx(({ id, data }) => [
6536
+ config.$key === "code-block" ? renderSlot(_ctx.$slots, "code-block-panel-tool", {
6537
+ key: 0,
6538
+ id,
6539
+ data
6540
+ }) : config.slots?.codeBlockPanelTool ? (openBlock(), createBlock(resolveDynamicComponent(config.slots.codeBlockPanelTool), { key: 1 })) : createCommentVNode("", true)
6541
+ ]),
6542
+ key: "4"
6543
+ } : void 0,
6544
+ config.$key === "layer" || config.slots?.layerNodeContent ? {
6545
+ name: "layer-node-content",
6546
+ fn: withCtx(({ data: nodeData, node }) => [
6547
+ config.$key === "layer" ? renderSlot(_ctx.$slots, "layer-node-content", {
6548
+ key: 0,
6549
+ data: nodeData,
6550
+ node
6551
+ }) : config.slots?.layerNodeContent ? (openBlock(), createBlock(resolveDynamicComponent(config.slots.layerNodeContent), {
6552
+ key: 1,
6553
+ data: nodeData,
6554
+ node
6555
+ }, null, 8, ["data", "node"])) : createCommentVNode("", true)
6556
+ ]),
6557
+ key: "5"
6558
+ } : void 0
6559
+ ]), 1040)) : createCommentVNode("", true)
6560
+ ])), [
6561
+ [vShow, activeTabName.value === config.text]
6562
+ ]);
6563
+ }), 128))
6564
+ ])) : createCommentVNode("", true);
6506
6565
  };
6507
6566
  }
6508
6567
  });