element-less 0.0.75 → 0.0.77

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.
@@ -59372,7 +59372,7 @@ const property_array = [
59372
59372
  },
59373
59373
  "arrayConfig": {}
59374
59374
  },
59375
- "defaultValue": ""
59375
+ "defaultValue": "border1"
59376
59376
  },
59377
59377
  {
59378
59378
  "keyID": "key_2064",
@@ -75055,7 +75055,7 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
75055
75055
  emits: /* @__PURE__ */ mergeModels(["removeItem"], ["update:children"]),
75056
75056
  setup(__props, { emit: __emit }) {
75057
75057
  const DynamicDesignerInnerItem = defineAsyncComponent(() => {
75058
- return import("./innerItem-DxZoiM2C.js");
75058
+ return import("./innerItem-BFdmxDC0.js");
75059
75059
  });
75060
75060
  const { getValue: getValue2 } = useProps();
75061
75061
  const tagID = getValue2("tagID");
@@ -76093,10 +76093,10 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
76093
76093
  emits: ["update:modelValue"],
76094
76094
  setup(__props, { expose: __expose, emit: __emit }) {
76095
76095
  const DynamicRenderInner = defineAsyncComponent(() => {
76096
- return import("./inner-PWU9A8AN.js").then((n) => n.i);
76096
+ return import("./inner-CuvCSjal.js").then((n) => n.i);
76097
76097
  });
76098
76098
  const DynamicRenderForm = defineAsyncComponent(() => {
76099
- return import("./inner-PWU9A8AN.js").then((n) => n.f);
76099
+ return import("./inner-CuvCSjal.js").then((n) => n.f);
76100
76100
  });
76101
76101
  const props2 = __props;
76102
76102
  const { getValue: getValue2, setValue, formNodeProps } = useProps(props2);
@@ -76336,10 +76336,10 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
76336
76336
  emits: ["update:modelValue"],
76337
76337
  setup(__props, { expose: __expose, emit: __emit }) {
76338
76338
  const DynamicRenderInnerAsync = defineAsyncComponent(() => {
76339
- return import("./inner-PWU9A8AN.js").then((n) => n.i);
76339
+ return import("./inner-CuvCSjal.js").then((n) => n.i);
76340
76340
  });
76341
76341
  const DynamicRenderFormAsync = defineAsyncComponent(() => {
76342
- return import("./inner-PWU9A8AN.js").then((n) => n.f);
76342
+ return import("./inner-CuvCSjal.js").then((n) => n.f);
76343
76343
  });
76344
76344
  const props2 = __props;
76345
76345
  const { getValue: getValue2, setValue, formNodeProps } = useProps(props2);
@@ -79721,8 +79721,8 @@ Table 节点格式:
79721
79721
  ## formConfig(字段级表单配置)
79722
79722
  - re_required: 必填表达式("" 不必填,"true" 始终必填,"currNode['field']?.value=='A'" 条件必填)
79723
79723
  - requiredMessage: 必填提示文字
79724
- - validType: 内置验证(email/phone/idcard/url)
79725
- - validExpression: 自定义验证表达式
79724
+ - validType: 内置验证类型,优先使用(Number-数字 | Float-浮点数 | Price-金额 | Date-日期 | Datetime-日期时间 | Time-时间 | Url-网址 | Email-邮箱 | Phone-手机号 | Character-字符)
79725
+ - validExpression: 仅在 validType 无法满足时使用,填正则表达式字符串(如 "^\\d{6}$")
79726
79726
  - validMessage: 验证失败提示
79727
79727
  - tip: 字段提示文字
79728
79728
  - tipPosition: 提示位置(left/right/top)
@@ -80985,6 +80985,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
80985
80985
  const aiGenerating = ref(false);
80986
80986
  const showAiDialog = ref(false);
80987
80987
  const aiTargetNode = ref(null);
80988
+ const aiOverwrite = ref("overwrite");
80988
80989
  function handleAiGenerate(targetNode) {
80989
80990
  aiTargetNode.value = targetNode;
80990
80991
  showAiDialog.value = true;
@@ -80993,7 +80994,9 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
80993
80994
  if (!aiPrompt.value.trim()) return;
80994
80995
  aiGenerating.value = true;
80995
80996
  try {
80996
- const nodes = await callAI(props2.aiUrl, aiPrompt.value, {
80997
+ const currChildren = aiTargetNode.value ? aiTargetNode.value.children : renderData.value;
80998
+ const existingJson = aiOverwrite.value !== "overwrite" && currChildren.length ? "\n\n当前已有配置(请在此基础上修改,返回完整的修改后配置):\n" + JSON.stringify(utils.cloneObj(currChildren)) : "";
80999
+ const nodes = await callAI(props2.aiUrl, aiPrompt.value + existingJson, {
80997
81000
  systemPrompt: props2.aiSystemPrompt,
80998
81001
  buildRequest: props2.aiBuildRequest,
80999
81002
  pickResponse: props2.aiPickResponse
@@ -81002,9 +81005,10 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81002
81005
  dynamicHandler.initConfig(processed);
81003
81006
  dynamicHandler.initConfigType(processed);
81004
81007
  if (aiTargetNode.value) {
81008
+ if (aiOverwrite.value !== "append") aiTargetNode.value.children.length = 0;
81005
81009
  aiTargetNode.value.children.push(...processed);
81006
81010
  } else {
81007
- renderData.value.length = 0;
81011
+ if (aiOverwrite.value !== "append") renderData.value.length = 0;
81008
81012
  renderData.value.push(...processed);
81009
81013
  }
81010
81014
  showAiDialog.value = false;
@@ -81065,6 +81069,8 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81065
81069
  const _component_els_dialog = resolveComponent("els-dialog");
81066
81070
  const _component_els_menu_context = resolveComponent("els-menu-context");
81067
81071
  const _component_el_input = resolveComponent("el-input");
81072
+ const _component_el_radio = resolveComponent("el-radio");
81073
+ const _component_el_radio_group = resolveComponent("el-radio-group");
81068
81074
  const _component_el_dialog = resolveComponent("el-dialog");
81069
81075
  return openBlock(), createElementBlock(Fragment$1, null, [
81070
81076
  createElementVNode("div", mergeProps({
@@ -81413,13 +81419,13 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81413
81419
  }, {
81414
81420
  default: withCtx(() => [
81415
81421
  createVNode(_component_els_option, null, {
81416
- default: withCtx(() => [..._cache[25] || (_cache[25] = [
81422
+ default: withCtx(() => [..._cache[26] || (_cache[26] = [
81417
81423
  createTextVNode("PC", -1)
81418
81424
  ])]),
81419
81425
  _: 1
81420
81426
  }),
81421
81427
  createVNode(_component_els_option, null, {
81422
- default: withCtx(() => [..._cache[26] || (_cache[26] = [
81428
+ default: withCtx(() => [..._cache[27] || (_cache[27] = [
81423
81429
  createTextVNode("H5", -1)
81424
81430
  ])]),
81425
81431
  _: 1
@@ -81441,7 +81447,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81441
81447
  ]),
81442
81448
  _: 1
81443
81449
  }),
81444
- _cache[27] || (_cache[27] = createTextVNode("返回 ", -1))
81450
+ _cache[28] || (_cache[28] = createTextVNode("返回 ", -1))
81445
81451
  ]),
81446
81452
  _: 1
81447
81453
  })) : createCommentVNode("", true),
@@ -81457,7 +81463,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81457
81463
  ]),
81458
81464
  _: 1
81459
81465
  }),
81460
- _cache[28] || (_cache[28] = createTextVNode("清空 ", -1))
81466
+ _cache[29] || (_cache[29] = createTextVNode("清空 ", -1))
81461
81467
  ]),
81462
81468
  _: 1
81463
81469
  })) : createCommentVNode("", true),
@@ -81473,7 +81479,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81473
81479
  ]),
81474
81480
  _: 1
81475
81481
  }),
81476
- _cache[29] || (_cache[29] = createTextVNode("AI生成 ", -1))
81482
+ _cache[30] || (_cache[30] = createTextVNode("AI生成 ", -1))
81477
81483
  ]),
81478
81484
  _: 1
81479
81485
  })) : createCommentVNode("", true),
@@ -81509,7 +81515,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81509
81515
  ]),
81510
81516
  _: 1
81511
81517
  }),
81512
- _cache[30] || (_cache[30] = createTextVNode("预览 ", -1))
81518
+ _cache[31] || (_cache[31] = createTextVNode("预览 ", -1))
81513
81519
  ]),
81514
81520
  _: 1
81515
81521
  })) : createCommentVNode("", true),
@@ -81525,7 +81531,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81525
81531
  ]),
81526
81532
  _: 1
81527
81533
  }),
81528
- _cache[31] || (_cache[31] = createTextVNode("保存 ", -1))
81534
+ _cache[32] || (_cache[32] = createTextVNode("保存 ", -1))
81529
81535
  ]),
81530
81536
  _: 1
81531
81537
  })) : createCommentVNode("", true)
@@ -81554,7 +81560,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81554
81560
  })
81555
81561
  ]),
81556
81562
  createElementVNode("div", _hoisted_15$2, [
81557
- _cache[33] || (_cache[33] = createElementVNode("div", null, "页面已有Form表单", -1)),
81563
+ _cache[34] || (_cache[34] = createElementVNode("div", null, "页面已有Form表单", -1)),
81558
81564
  createElementVNode("div", null, [
81559
81565
  createVNode(_component_el_button, {
81560
81566
  type: "info",
@@ -81562,7 +81568,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81562
81568
  startCreate.value = true;
81563
81569
  })
81564
81570
  }, {
81565
- default: withCtx(() => [..._cache[32] || (_cache[32] = [
81571
+ default: withCtx(() => [..._cache[33] || (_cache[33] = [
81566
81572
  createTextVNode("直接进入", -1)
81567
81573
  ])]),
81568
81574
  _: 1
@@ -81583,13 +81589,13 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81583
81589
  })
81584
81590
  ]),
81585
81591
  createElementVNode("div", _hoisted_17$1, [
81586
- _cache[35] || (_cache[35] = createElementVNode("div", null, " 没有Form表单创建一个 ", -1)),
81592
+ _cache[36] || (_cache[36] = createElementVNode("div", null, " 没有Form表单创建一个 ", -1)),
81587
81593
  createElementVNode("div", null, [
81588
81594
  createVNode(_component_el_button, {
81589
81595
  type: "primary",
81590
81596
  onClick: createRootForm
81591
81597
  }, {
81592
- default: withCtx(() => [..._cache[34] || (_cache[34] = [
81598
+ default: withCtx(() => [..._cache[35] || (_cache[35] = [
81593
81599
  createTextVNode("创建表单", -1)
81594
81600
  ])]),
81595
81601
  _: 1
@@ -81612,7 +81618,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81612
81618
  renderData: renderData.value
81613
81619
  }, null, 8, ["type", "renderData"])),
81614
81620
  !renderData.value.length || renderData.value.length && renderData.value[0].componentType === "Form" && !renderData.value[0].children.length ? (openBlock(), createBlock(_component_el_empty, { key: 2 }, {
81615
- description: withCtx(() => [..._cache[36] || (_cache[36] = [
81621
+ description: withCtx(() => [..._cache[37] || (_cache[37] = [
81616
81622
  createTextVNode("请点击拖动", -1),
81617
81623
  createElementVNode("span", { class: "txt-red" }, "左侧", -1),
81618
81624
  createTextVNode("组件到此处", -1)
@@ -81785,7 +81791,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81785
81791
  }, {
81786
81792
  header: withCtx(() => [
81787
81793
  createElementVNode("div", _hoisted_20$1, [
81788
- _cache[39] || (_cache[39] = createElementVNode("div", null, null, -1)),
81794
+ _cache[40] || (_cache[40] = createElementVNode("div", null, null, -1)),
81789
81795
  createElementVNode("div", _hoisted_21$1, [
81790
81796
  createElementVNode("div", {
81791
81797
  class: normalizeClass(["tab-item", { active: previewTab.value === "preview" }]),
@@ -81797,7 +81803,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81797
81803
  ]),
81798
81804
  _: 1
81799
81805
  }),
81800
- _cache[37] || (_cache[37] = createTextVNode(" 效果预览 ", -1))
81806
+ _cache[38] || (_cache[38] = createTextVNode(" 效果预览 ", -1))
81801
81807
  ], 2),
81802
81808
  createElementVNode("div", {
81803
81809
  class: normalizeClass(["tab-item", { active: previewTab.value === "properties" }]),
@@ -81809,10 +81815,10 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81809
81815
  ]),
81810
81816
  _: 1
81811
81817
  }),
81812
- _cache[38] || (_cache[38] = createTextVNode(" 数据模型 ", -1))
81818
+ _cache[39] || (_cache[39] = createTextVNode(" 数据模型 ", -1))
81813
81819
  ], 2)
81814
81820
  ]),
81815
- _cache[40] || (_cache[40] = createElementVNode("div", { class: "header-actions" }, null, -1))
81821
+ _cache[41] || (_cache[41] = createElementVNode("div", { class: "header-actions" }, null, -1))
81816
81822
  ])
81817
81823
  ]),
81818
81824
  default: withCtx(() => [
@@ -81823,8 +81829,8 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81823
81829
  withDirectives(createElementVNode("div", _hoisted_23, [
81824
81830
  deviceType.value === "H5" ? (openBlock(), createElementBlock("div", _hoisted_24, [
81825
81831
  createElementVNode("div", _hoisted_25, [
81826
- _cache[41] || (_cache[41] = createElementVNode("span", { class: "time" }, "10:40", -1)),
81827
- _cache[42] || (_cache[42] = createElementVNode("div", { class: "camera" }, null, -1)),
81832
+ _cache[42] || (_cache[42] = createElementVNode("span", { class: "time" }, "10:40", -1)),
81833
+ _cache[43] || (_cache[43] = createElementVNode("div", { class: "camera" }, null, -1)),
81828
81834
  createElementVNode("div", _hoisted_26, [
81829
81835
  createVNode(_component_el_icon, null, {
81830
81836
  default: withCtx(() => [
@@ -81856,7 +81862,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81856
81862
  _: 1
81857
81863
  })
81858
81864
  ]),
81859
- _cache[43] || (_cache[43] = createElementVNode("div", { class: "mobile-home-bar" }, null, -1))
81865
+ _cache[44] || (_cache[44] = createElementVNode("div", { class: "mobile-home-bar" }, null, -1))
81860
81866
  ])) : (openBlock(), createElementBlock("div", _hoisted_28, [
81861
81867
  createElementVNode("div", _hoisted_29, [
81862
81868
  createVNode(_component_el_scrollbar, null, {
@@ -81909,7 +81915,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81909
81915
  }, null, 8, ["data", "modelValue", "positionLeft", "positionTop"]),
81910
81916
  createVNode(_component_el_dialog, {
81911
81917
  modelValue: showAiDialog.value,
81912
- "onUpdate:modelValue": _cache[24] || (_cache[24] = ($event) => showAiDialog.value = $event),
81918
+ "onUpdate:modelValue": _cache[25] || (_cache[25] = ($event) => showAiDialog.value = $event),
81913
81919
  title: "AI 生成表单",
81914
81920
  width: "500px",
81915
81921
  "close-on-click-modal": false,
@@ -81917,9 +81923,9 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81917
81923
  }, {
81918
81924
  footer: withCtx(() => [
81919
81925
  createVNode(_component_el_button, {
81920
- onClick: _cache[23] || (_cache[23] = ($event) => showAiDialog.value = false)
81926
+ onClick: _cache[24] || (_cache[24] = ($event) => showAiDialog.value = false)
81921
81927
  }, {
81922
- default: withCtx(() => [..._cache[44] || (_cache[44] = [
81928
+ default: withCtx(() => [..._cache[48] || (_cache[48] = [
81923
81929
  createTextVNode("取消", -1)
81924
81930
  ])]),
81925
81931
  _: 1
@@ -81929,7 +81935,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81929
81935
  loading: aiGenerating.value,
81930
81936
  onClick: confirmAiGenerate
81931
81937
  }, {
81932
- default: withCtx(() => [..._cache[45] || (_cache[45] = [
81938
+ default: withCtx(() => [..._cache[49] || (_cache[49] = [
81933
81939
  createTextVNode("生成", -1)
81934
81940
  ])]),
81935
81941
  _: 1
@@ -81942,7 +81948,34 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81942
81948
  type: "textarea",
81943
81949
  rows: 5,
81944
81950
  placeholder: "描述要生成的表单,例如:用户注册表单,包含姓名、手机号、邮箱、密码字段,其中手机号和邮箱必填"
81945
- }, null, 8, ["modelValue"])
81951
+ }, null, 8, ["modelValue"]),
81952
+ createVNode(_component_el_radio_group, {
81953
+ modelValue: aiOverwrite.value,
81954
+ "onUpdate:modelValue": _cache[23] || (_cache[23] = ($event) => aiOverwrite.value = $event),
81955
+ style: { "margin-top": "12px" }
81956
+ }, {
81957
+ default: withCtx(() => [
81958
+ createVNode(_component_el_radio, { value: "overwrite" }, {
81959
+ default: withCtx(() => [..._cache[45] || (_cache[45] = [
81960
+ createTextVNode("覆盖", -1)
81961
+ ])]),
81962
+ _: 1
81963
+ }),
81964
+ createVNode(_component_el_radio, { value: "modify" }, {
81965
+ default: withCtx(() => [..._cache[46] || (_cache[46] = [
81966
+ createTextVNode("修改", -1)
81967
+ ])]),
81968
+ _: 1
81969
+ }),
81970
+ createVNode(_component_el_radio, { value: "append" }, {
81971
+ default: withCtx(() => [..._cache[47] || (_cache[47] = [
81972
+ createTextVNode("追加", -1)
81973
+ ])]),
81974
+ _: 1
81975
+ })
81976
+ ]),
81977
+ _: 1
81978
+ }, 8, ["modelValue"])
81946
81979
  ]),
81947
81980
  _: 1
81948
81981
  }, 8, ["modelValue"])
@@ -81950,7 +81983,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
81950
81983
  };
81951
81984
  }
81952
81985
  });
81953
- const DesignerView = /* @__PURE__ */ _export_sfc$1(_sfc_main$t, [["__scopeId", "data-v-4d6c4873"]]);
81986
+ const DesignerView = /* @__PURE__ */ _export_sfc$1(_sfc_main$t, [["__scopeId", "data-v-222c7a89"]]);
81954
81987
  const ElsDesignerView = withInstall$1(DesignerView);
81955
81988
  (function(Prism2) {
81956
81989
  var string = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
@@ -82689,31 +82722,31 @@ let AceEditor$1 = class AceEditor extends TBaseFormItem {
82689
82722
  __publicField(this, "editor", ref());
82690
82723
  onMounted(() => {
82691
82724
  if (props2.language === "json") {
82692
- const currModule = import("./mode-json-DvMBn-gb.js").then((n) => n.m);
82725
+ const currModule = import("./mode-json-Bx2niN3u.js").then((n) => n.m);
82693
82726
  currModule.then((res) => {
82694
82727
  ace.config.setModuleUrl("ace/mode/json", res);
82695
82728
  this.init();
82696
82729
  });
82697
82730
  } else if (props2.language === "javascript") {
82698
- const currModule = import("./mode-javascript-BA7c9L6f.js").then((n) => n.m);
82731
+ const currModule = import("./mode-javascript-D_rGVM-B.js").then((n) => n.m);
82699
82732
  currModule.then((res) => {
82700
82733
  ace.config.setModuleUrl("ace/mode/javascript", res);
82701
82734
  this.init();
82702
82735
  });
82703
82736
  } else if (props2.language === "csharp") {
82704
- const currModule = import("./mode-csharp-ujSwp4Ss.js").then((n) => n.m);
82737
+ const currModule = import("./mode-csharp-CGqJy6DA.js").then((n) => n.m);
82705
82738
  currModule.then((res) => {
82706
82739
  ace.config.setModuleUrl("ace/mode/csharp", res);
82707
82740
  this.init();
82708
82741
  });
82709
82742
  } else if (props2.language === "mysql") {
82710
- const currModule = import("./mode-mysql-68NS3DBE.js").then((n) => n.m);
82743
+ const currModule = import("./mode-mysql-Brm26WL3.js").then((n) => n.m);
82711
82744
  currModule.then((res) => {
82712
82745
  ace.config.setModuleUrl("ace/mode/mysql", res);
82713
82746
  this.init();
82714
82747
  });
82715
82748
  } else if (props2.language === "css") {
82716
- const currModule = import("./mode-css-BE9lm-IQ.js").then((n) => n.m);
82749
+ const currModule = import("./mode-css-PnYbyxm6.js").then((n) => n.m);
82717
82750
  currModule.then((res) => {
82718
82751
  ace.config.setModuleUrl("ace/mode/css", res);
82719
82752
  this.init();