star-horse-lowcode 2.8.4 → 2.8.5

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/index.es.js CHANGED
@@ -69175,11 +69175,7 @@ const useDesignFormStore = defineStore("designForm", () => {
69175
69175
  }
69176
69176
  return compListNoLayer.value?.find((item) => item.id == itemId);
69177
69177
  };
69178
- const loadCompNames = () => {
69179
- if (!isCompListUpdated.value && cachedSelectList.value.length > 0) {
69180
- compListNoLayer.value = cachedCompListNoLayer.value;
69181
- return cachedSelectList.value;
69182
- }
69178
+ const forceLoadCompNames = () => {
69183
69179
  const selectList = [];
69184
69180
  const compListResult = [];
69185
69181
  const stack = [];
@@ -69301,6 +69297,13 @@ const useDesignFormStore = defineStore("designForm", () => {
69301
69297
  isCompListUpdated.value = false;
69302
69298
  return selectList;
69303
69299
  };
69300
+ const loadCompNames = () => {
69301
+ if (!isCompListUpdated.value && cachedSelectList.value.length > 0) {
69302
+ compListNoLayer.value = cachedCompListNoLayer.value;
69303
+ return cachedSelectList.value;
69304
+ }
69305
+ return forceLoadCompNames();
69306
+ };
69304
69307
  const addComp = (comp) => {
69305
69308
  if (Array.isArray(comp)) {
69306
69309
  compList.value = [...compList.value, ...comp];
@@ -69459,6 +69462,7 @@ const useDesignFormStore = defineStore("designForm", () => {
69459
69462
  setSubItemId,
69460
69463
  setFormInfo,
69461
69464
  setCompList,
69465
+ forceLoadCompNames,
69462
69466
  loadCompNames,
69463
69467
  addComp,
69464
69468
  setIsDragging,
@@ -69513,73 +69517,59 @@ const fieldAssign = (props, relationFields, values) => {
69513
69517
  });
69514
69518
  };
69515
69519
  const dataLinkage = async (props, item, e) => {
69516
- if (item.isWorking) {
69520
+ let { relationFields, params, matchFieldValue } = item;
69521
+ if (!Array.isArray(matchFieldValue)) {
69522
+ matchFieldValue = matchFieldValue ? [matchFieldValue] : [];
69523
+ }
69524
+ if (matchFieldValue.length > 0 && !matchFieldValue.includes(e)) {
69517
69525
  return;
69518
69526
  }
69519
- item.isWorking = true;
69520
- try {
69521
- let { relationFields, params, matchFieldValue } = item;
69522
- if (!Array.isArray(matchFieldValue)) {
69523
- matchFieldValue = matchFieldValue ? [matchFieldValue] : [];
69524
- }
69525
- if (matchFieldValue.length > 0 && !matchFieldValue.includes(item.controlCondition)) {
69526
- return;
69527
- }
69528
- if (!Array.isArray(relationFields)) {
69529
- relationFields = [relationFields];
69530
- }
69531
- const tempParams = { ...params };
69532
- if (item.controlCondition == "asParamDataLinkage") {
69533
- tempParams.queryParams = tempParams.queryParams || [];
69534
- tempParams.queryParams.push(
69535
- createCondition(item.matchFieldName, e, item.matchType)
69536
- );
69537
- }
69538
- const resultData = await dynamicUrlOperation({
69539
- preps: {
69540
- ...tempParams
69541
- }
69542
- });
69543
- fieldAssign(props, relationFields, resultData);
69544
- } finally {
69545
- item.isWorking = false;
69527
+ if (!Array.isArray(relationFields)) {
69528
+ relationFields = [relationFields];
69529
+ }
69530
+ const tempParams = JSON.parse(JSON.stringify(params));
69531
+ if (item.controlCondition == "asParamDataLinkage") {
69532
+ tempParams.queryParams = tempParams.queryParams || [];
69533
+ tempParams.queryParams.push(
69534
+ createCondition(item.matchFieldName, e, item.matchType)
69535
+ );
69546
69536
  }
69537
+ const resultData = await dynamicUrlOperation({
69538
+ preps: {
69539
+ ...tempParams
69540
+ }
69541
+ });
69542
+ fieldAssign(props, relationFields, resultData);
69547
69543
  };
69548
69544
  const eqDisableOrEditable = (props, item, e) => {
69549
69545
  let { relationFields, matchFieldValue } = item;
69550
- if (item.isWorking) {
69551
- return;
69552
- }
69553
69546
  if (!Array.isArray(matchFieldValue)) {
69554
69547
  matchFieldValue = matchFieldValue ? [matchFieldValue] : [];
69555
69548
  }
69556
- try {
69557
- item.isWorking = true;
69558
- if (!Array.isArray(relationFields)) {
69559
- relationFields = [relationFields];
69560
- }
69561
- relationFields?.forEach(async (sitem) => {
69562
- const field = props.formInfo?.find(
69563
- (field2) => field2.fieldName == sitem
69564
- );
69565
- if (field) {
69566
- if (!field.preps) {
69567
- field.preps = {};
69568
- }
69569
- if (item.controlCondition == "eqHide") {
69570
- field.formVisible = !matchFieldValue.includes(e);
69571
- } else if (item.controlCondition == "eqVisible") {
69572
- field.formVisible = matchFieldValue.includes(e);
69573
- } else if (item.controlCondition == "eqEditable") {
69574
- field.preps["disabled"] = !matchFieldValue.includes(e);
69575
- } else if (item.controlCondition == "eqDisable") {
69576
- field.preps["disabled"] = matchFieldValue.includes(e);
69577
- }
69578
- }
69579
- });
69580
- } finally {
69581
- item.isWorking = false;
69549
+ if (!Array.isArray(relationFields)) {
69550
+ relationFields = [relationFields];
69582
69551
  }
69552
+ relationFields?.forEach(async (sitem) => {
69553
+ const field = props.formInfo?.find(
69554
+ (field2) => field2.fieldName == sitem
69555
+ );
69556
+ if (field) {
69557
+ if (!field.preps) {
69558
+ field.preps = {};
69559
+ }
69560
+ if (item.controlCondition == "eqHide") {
69561
+ field.formVisible = !matchFieldValue.includes(e);
69562
+ } else if (item.controlCondition == "eqVisible") {
69563
+ field.formVisible = matchFieldValue.includes(e);
69564
+ } else if (item.controlCondition == "eqEditable") {
69565
+ field.preps["disabled"] = !matchFieldValue.includes(e);
69566
+ } else if (item.controlCondition == "eqDisable") {
69567
+ field.preps["disabled"] = matchFieldValue.includes(e);
69568
+ } else if (item.controlCondition == "eqRequired") {
69569
+ field.required = matchFieldValue.includes(e);
69570
+ }
69571
+ }
69572
+ });
69583
69573
  };
69584
69574
  const assignValue = (props, item, e) => {
69585
69575
  let { relationFields, staticDatas } = item;
@@ -69603,12 +69593,12 @@ const changeType = (props, item, e) => {
69603
69593
  });
69604
69594
  };
69605
69595
  const relationEvent = (props, relationDetails, e, actionName) => {
69606
- relationDetails?.forEach((item) => {
69596
+ relationDetails?.forEach(async (item) => {
69607
69597
  let { controlCondition, relationFields, matchFieldValue } = item;
69608
69598
  if (!Array.isArray(matchFieldValue)) {
69609
69599
  matchFieldValue = matchFieldValue ? [matchFieldValue] : [];
69610
69600
  }
69611
- if (!relationFields) {
69601
+ if (!relationFields || item.isWorking) {
69612
69602
  return;
69613
69603
  }
69614
69604
  switch (controlCondition) {
@@ -69621,6 +69611,7 @@ const relationEvent = (props, relationDetails, e, actionName) => {
69621
69611
  case "eqHide":
69622
69612
  case "eqEditable":
69623
69613
  case "eqVisible":
69614
+ case "eqRequired":
69624
69615
  eqDisableOrEditable(props, item, e);
69625
69616
  break;
69626
69617
  case "assignValue":
@@ -69632,6 +69623,8 @@ const relationEvent = (props, relationDetails, e, actionName) => {
69632
69623
  default:
69633
69624
  console.log("未处理的事件:" + controlCondition);
69634
69625
  }
69626
+ await nextTick();
69627
+ item.isWorking = false;
69635
69628
  });
69636
69629
  };
69637
69630
  const allAction = (context, emits, formData, actionName, isInit = false) => {
@@ -70607,11 +70600,6 @@ const _sfc_main$1P = /* @__PURE__ */ defineComponent({
70607
70600
  }
70608
70601
  });
70609
70602
 
70610
- const help = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
70611
- __proto__: null,
70612
- default: _sfc_main$1P
70613
- }, Symbol.toStringTag, { value: 'Module' }));
70614
-
70615
70603
  const _hoisted_1$Y = {
70616
70604
  key: 2,
70617
70605
  style: { "width": "15px" }
@@ -70817,10 +70805,11 @@ const _sfc_main$1O = /* @__PURE__ */ defineComponent({
70817
70805
  ref: componentRef,
70818
70806
  isSearch: __props.source == 4,
70819
70807
  bareFlag: __props.bareFlag,
70808
+ source: __props.source,
70820
70809
  field: __props.item,
70821
70810
  formData: dataForm.value,
70822
70811
  "onUpdate:formData": _cache[0] || (_cache[0] = ($event) => dataForm.value = $event)
70823
- }, null, 40, ["formInfo", "isSearch", "bareFlag", "field", "formData"])),
70812
+ }, null, 40, ["formInfo", "isSearch", "bareFlag", "source", "field", "formData"])),
70824
70813
  __props.item.brotherNodes ? (openBlock(), createElementBlock("div", _hoisted_1$Y)) : createCommentVNode("", true),
70825
70814
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.item.brotherNodes, (temp, key) => {
70826
70815
  return openBlock(), createElementBlock(Fragment, {
@@ -70846,7 +70835,7 @@ const _sfc_main$1O = /* @__PURE__ */ defineComponent({
70846
70835
 
70847
70836
  /* unplugin-vue-components disabled */
70848
70837
 
70849
- const __unplugin_components_0$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1O, [["__scopeId", "data-v-292ccc85"]]);
70838
+ const __unplugin_components_0$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1O, [["__scopeId", "data-v-88f8539b"]]);
70850
70839
 
70851
70840
  const StarHorseItem = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
70852
70841
  __proto__: null,
@@ -76342,7 +76331,7 @@ const _sfc_main$1B = /* @__PURE__ */ defineComponent({
76342
76331
  const starHorseFormListRef = ref(null);
76343
76332
  const handleAddDetails = (row, type) => {
76344
76333
  if (props.staticColumn == "Y" && type != 2) {
76345
- dynamicHandleAddForm(row);
76334
+ dynamicHandleAddForm(row, "add");
76346
76335
  } else {
76347
76336
  dynamicHandleAddRow(row, type);
76348
76337
  }
@@ -76354,7 +76343,11 @@ const _sfc_main$1B = /* @__PURE__ */ defineComponent({
76354
76343
  if (!dataForm.value[props.batchName]) {
76355
76344
  dataForm.value[props.batchName] = [];
76356
76345
  }
76346
+ if (type == "edit") {
76347
+ row["starHorseEditing"] = "yes";
76348
+ }
76357
76349
  await nextTick();
76350
+ rowDataFormRef.value.setSource("edit" == type ? 2 : 1);
76358
76351
  rowDataFormRef.value.setFormData(row);
76359
76352
  };
76360
76353
  const mergeData = async (type) => {
@@ -76364,11 +76357,18 @@ const _sfc_main$1B = /* @__PURE__ */ defineComponent({
76364
76357
  if (!flag) {
76365
76358
  return;
76366
76359
  }
76360
+ const batchArray = dataForm.value[props.batchName];
76367
76361
  let formData = rowDataFormRef.value.getFormData().value;
76368
- if (formData.xh) {
76369
- dataForm.value[props.batchName][formData.xh - 1] = formData;
76362
+ if (formData.starHorseEditing == "yes") {
76363
+ batchArray.forEach((item, index) => {
76364
+ if (item.xh == formData.xh) {
76365
+ formData.starHorseEditing = "no";
76366
+ batchArray[index] = { ...formData };
76367
+ }
76368
+ });
76369
+ console.log(batchArray);
76370
76370
  } else {
76371
- dataForm.value[props.batchName].push(formData);
76371
+ dataForm.value[props.batchName].push({ ...formData });
76372
76372
  }
76373
76373
  if (type == "close") {
76374
76374
  closeAction();
@@ -76775,7 +76775,7 @@ const _sfc_main$1B = /* @__PURE__ */ defineComponent({
76775
76775
  __props.staticColumn == "Y" ? (openBlock(), createBlock(__unplugin_components_0$a, {
76776
76776
  key: 0,
76777
76777
  "icon-class": "edit",
76778
- onClick: ($event) => dynamicHandleAddForm(scope.row),
76778
+ onClick: ($event) => dynamicHandleAddForm(scope.row, "edit"),
76779
76779
  title: "编辑"
76780
76780
  }, null, 8, ["onClick"])) : createCommentVNode("", true),
76781
76781
  createVNode(__unplugin_components_0$a, {
@@ -76812,7 +76812,7 @@ const _sfc_main$1B = /* @__PURE__ */ defineComponent({
76812
76812
 
76813
76813
  /* unplugin-vue-components disabled */
76814
76814
 
76815
- const __unplugin_components_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1B, [["__scopeId", "data-v-0d923809"]]);
76815
+ const __unplugin_components_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1B, [["__scopeId", "data-v-42d7d5a1"]]);
76816
76816
 
76817
76817
  const StarHorseFormList = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
76818
76818
  __proto__: null,
@@ -77302,6 +77302,9 @@ const _sfc_main$1x = /* @__PURE__ */ defineComponent({
77302
77302
  let defaultDatas = mappingData.defaultDatas;
77303
77303
  dataForm.value = { ...defaultDatas, ...data };
77304
77304
  };
77305
+ const setSource = (dataSource) => {
77306
+ source.value = dataSource;
77307
+ };
77305
77308
  const updateFormData = (data) => {
77306
77309
  dataForm.value = { ...dataForm.value, ...data };
77307
77310
  };
@@ -77363,13 +77366,17 @@ const _sfc_main$1x = /* @__PURE__ */ defineComponent({
77363
77366
  watch(
77364
77367
  () => dialogProps.ids,
77365
77368
  (val) => {
77366
- console.log("ids", val);
77367
- if (!val || val == -1) {
77368
- source.value = 1;
77369
- setFormData(dataForm.value);
77369
+ if (val === void 0 || val == null || val == "") {
77370
+ console.log("ids 未定义", val);
77371
+ return;
77370
77372
  } else {
77371
- source.value = 2;
77372
- loadData();
77373
+ if (val == -1) {
77374
+ source.value = 1;
77375
+ setFormData(dataForm.value);
77376
+ } else {
77377
+ source.value = 2;
77378
+ loadData();
77379
+ }
77373
77380
  }
77374
77381
  },
77375
77382
  {
@@ -77388,7 +77395,8 @@ const _sfc_main$1x = /* @__PURE__ */ defineComponent({
77388
77395
  tableListRef,
77389
77396
  getFields,
77390
77397
  getFormFields,
77391
- validate
77398
+ validate,
77399
+ setSource
77392
77400
  });
77393
77401
  return (_ctx, _cache) => {
77394
77402
  const _component_el_form = ElForm;
@@ -129145,7 +129153,8 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
129145
129153
  parentField: {},
129146
129154
  formInfo: {},
129147
129155
  parentId: {},
129148
- callBack: {}
129156
+ callBack: {},
129157
+ source: {}
129149
129158
  },
129150
129159
  setup(__props) {
129151
129160
  const props = __props;
@@ -129428,7 +129437,8 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
129428
129437
  parentField: {},
129429
129438
  formInfo: {},
129430
129439
  parentId: {},
129431
- callBack: {}
129440
+ callBack: {},
129441
+ source: {}
129432
129442
  }, {
129433
129443
  "formData": {},
129434
129444
  "formDataModifiers": {}
@@ -129532,7 +129542,8 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
129532
129542
  parentField: {},
129533
129543
  formInfo: {},
129534
129544
  parentId: {},
129535
- callBack: {}
129545
+ callBack: {},
129546
+ source: {}
129536
129547
  },
129537
129548
  emits: ["selfFunc", "selectItem"],
129538
129549
  setup(__props, { emit: __emit }) {
@@ -129652,7 +129663,8 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
129652
129663
  parentField: {},
129653
129664
  formInfo: {},
129654
129665
  parentId: {},
129655
- callBack: {}
129666
+ callBack: {},
129667
+ source: {}
129656
129668
  }, {
129657
129669
  "formData": {},
129658
129670
  "formDataModifiers": {}
@@ -129750,7 +129762,8 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
129750
129762
  parentField: {},
129751
129763
  formInfo: {},
129752
129764
  parentId: {},
129753
- callBack: {}
129765
+ callBack: {},
129766
+ source: {}
129754
129767
  }, {
129755
129768
  "formData": {},
129756
129769
  "formDataModifiers": {}
@@ -129960,7 +129973,8 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
129960
129973
  parentField: {},
129961
129974
  formInfo: {},
129962
129975
  parentId: {},
129963
- callBack: {}
129976
+ callBack: {},
129977
+ source: {}
129964
129978
  }, {
129965
129979
  "formData": {},
129966
129980
  "formDataModifiers": {}
@@ -130217,7 +130231,8 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
130217
130231
  parentField: {},
130218
130232
  formInfo: {},
130219
130233
  parentId: {},
130220
- callBack: {}
130234
+ callBack: {},
130235
+ source: {}
130221
130236
  }, {
130222
130237
  "formData": {},
130223
130238
  "formDataModifiers": {}
@@ -130311,7 +130326,8 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
130311
130326
  parentField: {},
130312
130327
  formInfo: {},
130313
130328
  parentId: {},
130314
- callBack: {}
130329
+ callBack: {},
130330
+ source: {}
130315
130331
  }, {
130316
130332
  "formData": {},
130317
130333
  "formDataModifiers": {}
@@ -133090,7 +133106,8 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
133090
133106
  parentField: {},
133091
133107
  formInfo: {},
133092
133108
  parentId: {},
133093
- callBack: {}
133109
+ callBack: {},
133110
+ source: {}
133094
133111
  }, {
133095
133112
  "formData": {},
133096
133113
  "formDataModifiers": {}
@@ -133212,7 +133229,8 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
133212
133229
  parentField: {},
133213
133230
  formInfo: {},
133214
133231
  parentId: {},
133215
- callBack: {}
133232
+ callBack: {},
133233
+ source: {}
133216
133234
  }, {
133217
133235
  "formData": {},
133218
133236
  "formDataModifiers": {}
@@ -133302,7 +133320,8 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
133302
133320
  parentField: {},
133303
133321
  formInfo: {},
133304
133322
  parentId: {},
133305
- callBack: {}
133323
+ callBack: {},
133324
+ source: {}
133306
133325
  },
133307
133326
  emits: ["selfFunc", "selectItem"],
133308
133327
  setup(__props, { emit: __emit }) {
@@ -133345,7 +133364,8 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
133345
133364
  parentField: {},
133346
133365
  formInfo: {},
133347
133366
  parentId: {},
133348
- callBack: {}
133367
+ callBack: {},
133368
+ source: {}
133349
133369
  }, {
133350
133370
  "formData": {},
133351
133371
  "formDataModifiers": {}
@@ -133545,7 +133565,8 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
133545
133565
  parentField: {},
133546
133566
  formInfo: {},
133547
133567
  parentId: {},
133548
- callBack: {}
133568
+ callBack: {},
133569
+ source: {}
133549
133570
  }, {
133550
133571
  "formData": {},
133551
133572
  "formDataModifiers": {}
@@ -133608,7 +133629,8 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
133608
133629
  parentField: {},
133609
133630
  formInfo: {},
133610
133631
  parentId: {},
133611
- callBack: {}
133632
+ callBack: {},
133633
+ source: {}
133612
133634
  }, {
133613
133635
  "formData": {},
133614
133636
  "formDataModifiers": {}
@@ -150735,7 +150757,8 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
150735
150757
  parentField: {},
150736
150758
  formInfo: {},
150737
150759
  parentId: {},
150738
- callBack: {}
150760
+ callBack: {},
150761
+ source: {}
150739
150762
  }, {
150740
150763
  "formData": {},
150741
150764
  "formDataModifiers": {}
@@ -150828,7 +150851,8 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
150828
150851
  parentField: {},
150829
150852
  formInfo: {},
150830
150853
  parentId: {},
150831
- callBack: {}
150854
+ callBack: {},
150855
+ source: {}
150832
150856
  }, {
150833
150857
  "formData": {},
150834
150858
  "formDataModifiers": {}
@@ -151013,7 +151037,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
151013
151037
  parentField: {},
151014
151038
  formInfo: {},
151015
151039
  parentId: {},
151016
- callBack: {}
151040
+ callBack: {},
151041
+ source: {}
151017
151042
  }, {
151018
151043
  "formData": {},
151019
151044
  "formDataModifiers": {}
@@ -151295,7 +151320,8 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
151295
151320
  parentField: {},
151296
151321
  formInfo: {},
151297
151322
  parentId: {},
151298
- callBack: { type: Function }
151323
+ callBack: { type: Function },
151324
+ source: {}
151299
151325
  }, {
151300
151326
  "formData": {},
151301
151327
  "formDataModifiers": {}
@@ -151651,7 +151677,8 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
151651
151677
  parentField: {},
151652
151678
  formInfo: {},
151653
151679
  parentId: {},
151654
- callBack: {}
151680
+ callBack: {},
151681
+ source: {}
151655
151682
  }, {
151656
151683
  "formData": {},
151657
151684
  "formDataModifiers": {}
@@ -151708,7 +151735,8 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
151708
151735
  parentField: {},
151709
151736
  formInfo: {},
151710
151737
  parentId: {},
151711
- callBack: {}
151738
+ callBack: {},
151739
+ source: {}
151712
151740
  }, {
151713
151741
  "formData": {},
151714
151742
  "formDataModifiers": {}
@@ -203237,7 +203265,8 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
203237
203265
  parentField: {},
203238
203266
  formInfo: {},
203239
203267
  parentId: {},
203240
- callBack: {}
203268
+ callBack: {},
203269
+ source: {}
203241
203270
  }, {
203242
203271
  "formData": {},
203243
203272
  "formDataModifiers": {}
@@ -203305,7 +203334,8 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
203305
203334
  parentField: {},
203306
203335
  formInfo: {},
203307
203336
  parentId: {},
203308
- callBack: {}
203337
+ callBack: {},
203338
+ source: {}
203309
203339
  }, {
203310
203340
  "formData": {},
203311
203341
  "formDataModifiers": {}
@@ -203390,7 +203420,8 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
203390
203420
  parentField: {},
203391
203421
  formInfo: {},
203392
203422
  parentId: {},
203393
- callBack: {}
203423
+ callBack: {},
203424
+ source: {}
203394
203425
  }, {
203395
203426
  "formData": {},
203396
203427
  "formDataModifiers": {}
@@ -203533,7 +203564,8 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
203533
203564
  parentField: {},
203534
203565
  formInfo: {},
203535
203566
  parentId: {},
203536
- callBack: {}
203567
+ callBack: {},
203568
+ source: {}
203537
203569
  }, {
203538
203570
  "formData": {},
203539
203571
  "formDataModifiers": {}
@@ -203930,7 +203962,8 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
203930
203962
  parentField: {},
203931
203963
  formInfo: {},
203932
203964
  parentId: {},
203933
- callBack: {}
203965
+ callBack: {},
203966
+ source: {}
203934
203967
  }, {
203935
203968
  "formData": {},
203936
203969
  "formDataModifiers": {}
@@ -203991,7 +204024,8 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
203991
204024
  parentField: {},
203992
204025
  formInfo: {},
203993
204026
  parentId: {},
203994
- callBack: {}
204027
+ callBack: {},
204028
+ source: {}
203995
204029
  }, {
203996
204030
  "formData": {},
203997
204031
  "formDataModifiers": {}
@@ -204098,7 +204132,8 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
204098
204132
  parentField: {},
204099
204133
  formInfo: {},
204100
204134
  parentId: {},
204101
- callBack: {}
204135
+ callBack: {},
204136
+ source: {}
204102
204137
  }, {
204103
204138
  "formData": {},
204104
204139
  "formDataModifiers": {}
@@ -204165,7 +204200,8 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
204165
204200
  parentField: {},
204166
204201
  formInfo: {},
204167
204202
  parentId: {},
204168
- callBack: {}
204203
+ callBack: {},
204204
+ source: {}
204169
204205
  }, {
204170
204206
  "formData": {},
204171
204207
  "formDataModifiers": {}
@@ -204794,7 +204830,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
204794
204830
  parentField: {},
204795
204831
  formInfo: {},
204796
204832
  parentId: {},
204797
- callBack: {}
204833
+ callBack: {},
204834
+ source: {}
204798
204835
  },
204799
204836
  emits: ["selfFunc", "selectItem"],
204800
204837
  setup(__props, { emit: __emit }) {
@@ -204961,7 +204998,8 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
204961
204998
  parentField: {},
204962
204999
  formInfo: {},
204963
205000
  parentId: {},
204964
- callBack: {}
205001
+ callBack: {},
205002
+ source: {}
204965
205003
  }, {
204966
205004
  "formData": {},
204967
205005
  "formDataModifiers": {}
@@ -205024,7 +205062,8 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
205024
205062
  parentField: {},
205025
205063
  formInfo: {},
205026
205064
  parentId: {},
205027
- callBack: {}
205065
+ callBack: {},
205066
+ source: {}
205028
205067
  }, {
205029
205068
  "formData": {},
205030
205069
  "formDataModifiers": {}
@@ -205092,7 +205131,8 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
205092
205131
  parentField: {},
205093
205132
  formInfo: {},
205094
205133
  parentId: {},
205095
- callBack: {}
205134
+ callBack: {},
205135
+ source: {}
205096
205136
  }, {
205097
205137
  "formData": {},
205098
205138
  "formDataModifiers": {}
@@ -205158,7 +205198,8 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
205158
205198
  parentField: {},
205159
205199
  formInfo: {},
205160
205200
  parentId: {},
205161
- callBack: {}
205201
+ callBack: {},
205202
+ source: {}
205162
205203
  }, {
205163
205204
  "formData": {},
205164
205205
  "formDataModifiers": {}
@@ -205228,7 +205269,8 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
205228
205269
  parentField: {},
205229
205270
  formInfo: {},
205230
205271
  parentId: {},
205231
- callBack: {}
205272
+ callBack: {},
205273
+ source: {}
205232
205274
  }, {
205233
205275
  "formData": {},
205234
205276
  "formDataModifiers": {}
@@ -205306,7 +205348,8 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
205306
205348
  parentField: {},
205307
205349
  formInfo: {},
205308
205350
  parentId: {},
205309
- callBack: {}
205351
+ callBack: {},
205352
+ source: {}
205310
205353
  }, {
205311
205354
  "formData": {},
205312
205355
  "formDataModifiers": {}
@@ -205374,7 +205417,8 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
205374
205417
  parentField: {},
205375
205418
  formInfo: {},
205376
205419
  parentId: {},
205377
- callBack: {}
205420
+ callBack: {},
205421
+ source: {}
205378
205422
  }, {
205379
205423
  "formData": {},
205380
205424
  "formDataModifiers": {}
@@ -205439,7 +205483,8 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
205439
205483
  parentField: {},
205440
205484
  formInfo: {},
205441
205485
  parentId: {},
205442
- callBack: {}
205486
+ callBack: {},
205487
+ source: {}
205443
205488
  }, {
205444
205489
  "formData": {},
205445
205490
  "formDataModifiers": {}
@@ -205527,7 +205572,8 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
205527
205572
  parentField: {},
205528
205573
  formInfo: {},
205529
205574
  parentId: {},
205530
- callBack: {}
205575
+ callBack: {},
205576
+ source: {}
205531
205577
  }, {
205532
205578
  "formData": {},
205533
205579
  "formDataModifiers": {}
@@ -205756,7 +205802,8 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
205756
205802
  parentField: {},
205757
205803
  formInfo: {},
205758
205804
  parentId: {},
205759
- callBack: {}
205805
+ callBack: {},
205806
+ source: {}
205760
205807
  },
205761
205808
  emits: ["selfFunc", "selectItem"],
205762
205809
  setup(__props, { emit: __emit }) {
@@ -205802,7 +205849,8 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
205802
205849
  parentField: {},
205803
205850
  formInfo: {},
205804
205851
  parentId: {},
205805
- callBack: {}
205852
+ callBack: {},
205853
+ source: {}
205806
205854
  }, {
205807
205855
  "formData": {},
205808
205856
  "formDataModifiers": {}
@@ -205933,7 +205981,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
205933
205981
  parentField: {},
205934
205982
  formInfo: {},
205935
205983
  parentId: {},
205936
- callBack: {}
205984
+ callBack: {},
205985
+ source: {}
205937
205986
  }, {
205938
205987
  "formData": {},
205939
205988
  "formDataModifiers": {}
@@ -206093,14 +206142,6 @@ const userItem = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
206093
206142
  default: _sfc_main$m
206094
206143
  }, Symbol.toStringTag, { value: 'Module' }));
206095
206144
 
206096
- const __variableDynamicImportRuntimeHelper = (glob$1, path$13, segs) => {
206097
- const v = glob$1[path$13];
206098
- if (v) return typeof v === "function" ? v() : Promise.resolve(v);
206099
- return new Promise((_, reject) => {
206100
- (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + path$13 + (path$13.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : ""))));
206101
- });
206102
- };
206103
-
206104
206145
  const _sfc_main$l = /* @__PURE__ */ defineComponent({
206105
206146
  __name: "usercomp-item",
206106
206147
  props: /* @__PURE__ */ mergeModels({
@@ -206113,7 +206154,8 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
206113
206154
  parentField: {},
206114
206155
  formInfo: {},
206115
206156
  parentId: {},
206116
- callBack: {}
206157
+ callBack: {},
206158
+ source: { default: 0 }
206117
206159
  }, {
206118
206160
  "formData": {},
206119
206161
  "formDataModifiers": {}
@@ -206122,33 +206164,12 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
206122
206164
  setup(__props, { emit: __emit }) {
206123
206165
  const props = __props;
206124
206166
  const formData = useModel(__props, "formData");
206125
- const currentComponent = shallowRef(null);
206167
+ const currentComponent = computed(() => props.field["preps"].compName);
206126
206168
  const loadComponent = async () => {
206127
- let compOption = props.field["preps"].compName;
206128
- if (typeof compOption === "object" && compOption?.__name) {
206129
- currentComponent.value = compOption;
206130
- } else if (typeof compOption === "string") {
206131
- try {
206132
- let comp = await __variableDynamicImportRuntimeHelper((/* #__PURE__ */ Object.assign({"../../help.vue": () => Promise.resolve().then(() => help)})), `../../${compOption}.vue`, 3);
206133
- currentComponent.value = comp.default;
206134
- } catch (e) {
206135
- console.log(e.message);
206136
- currentComponent.value = null;
206137
- }
206138
- } else {
206139
- currentComponent.value = null;
206140
- }
206141
206169
  };
206142
206170
  onMounted(() => {
206143
206171
  loadComponent();
206144
206172
  });
206145
- watch(
206146
- () => props.field.preps?.compName,
206147
- () => {
206148
- loadComponent();
206149
- },
206150
- { immediate: false }
206151
- );
206152
206173
  return (_ctx, _cache) => {
206153
206174
  const _component_starhorse_form_item = __unplugin_components_0$3;
206154
206175
  return openBlock(), createBlock(_component_starhorse_form_item, {
@@ -206167,8 +206188,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
206167
206188
  bareFlag: _ctx.bareFlag
206168
206189
  }, _ctx.field["preps"], {
206169
206190
  dataForm: formData.value,
206170
- "onUpdate:dataForm": _cache[0] || (_cache[0] = ($event) => formData.value = $event)
206171
- }), null, 16, ["showFormItem", "isDesign", "disabled", "bareFlag", "dataForm"]))
206191
+ "onUpdate:dataForm": _cache[0] || (_cache[0] = ($event) => formData.value = $event),
206192
+ source: _ctx.source
206193
+ }), null, 16, ["showFormItem", "isDesign", "disabled", "bareFlag", "dataForm", "source"]))
206172
206194
  ]),
206173
206195
  _: 1
206174
206196
  }, 8, ["showFormItem", "isDesign", "disabled", "bareFlag", "field", "parentField"]);
@@ -206194,7 +206216,8 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
206194
206216
  parentField: {},
206195
206217
  formInfo: {},
206196
206218
  parentId: {},
206197
- callBack: {}
206219
+ callBack: {},
206220
+ source: {}
206198
206221
  }, {
206199
206222
  "formData": {},
206200
206223
  "formDataModifiers": {}
@@ -207509,7 +207532,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
207509
207532
  parentField: {},
207510
207533
  formInfo: {},
207511
207534
  parentId: {},
207512
- callBack: {}
207535
+ callBack: {},
207536
+ source: {}
207513
207537
  }, {
207514
207538
  "formData": {},
207515
207539
  "formDataModifiers": {}
@@ -218285,7 +218309,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
218285
218309
  parentField: {},
218286
218310
  formInfo: {},
218287
218311
  parentId: {},
218288
- callBack: {}
218312
+ callBack: {},
218313
+ source: {}
218289
218314
  }, {
218290
218315
  "formData": {},
218291
218316
  "formDataModifiers": {}
@@ -249108,7 +249133,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
249108
249133
  parentField: {},
249109
249134
  formInfo: {},
249110
249135
  parentId: {},
249111
- callBack: {}
249136
+ callBack: {},
249137
+ source: {}
249112
249138
  }, {
249113
249139
  "formData": {},
249114
249140
  "formDataModifiers": {}