element-less 0.0.74 → 0.0.75

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.
@@ -31349,7 +31349,7 @@ const useFormValidation = (props2, attrs) => {
31349
31349
  };
31350
31350
  function useSelect(props2 = {}, defaultEmits, formNode, componentName) {
31351
31351
  const { setValue } = useProps(props2);
31352
- const { $codeField, $messageField, $dataField, $success } = utils.getApiConfig();
31352
+ const { $codeField: $codeField2, $messageField: $messageField2, $dataField: $dataField2, $success: $success2 } = utils.getApiConfig();
31353
31353
  const {
31354
31354
  currModelValue,
31355
31355
  returnModelValue
@@ -31660,16 +31660,16 @@ function useSelect(props2 = {}, defaultEmits, formNode, componentName) {
31660
31660
  let currUrl = ((_b = props2.url) == null ? void 0 : _b.replacePowerUrl()) ?? "";
31661
31661
  return new Promise((resolve2, reject) => {
31662
31662
  currUrl.postWithCancel(queryData, readDataCancel).then((res) => {
31663
- if (res[$codeField] == $success) {
31663
+ if (res[$codeField2] == $success2) {
31664
31664
  options2.length = 0;
31665
- const resData = res[$dataField];
31665
+ const resData = res[$dataField2];
31666
31666
  initData(resData);
31667
31667
  initSelectValue();
31668
31668
  initAbsendData();
31669
31669
  initSelectIndex();
31670
31670
  defaultEmits("readdataed", options2);
31671
31671
  } else {
31672
- ProxyElsMessage.error(res[$messageField]);
31672
+ ProxyElsMessage.error(res[$messageField2]);
31673
31673
  }
31674
31674
  remoteLoading.value = false;
31675
31675
  resolve2(true);
@@ -31806,7 +31806,7 @@ function useSelect(props2 = {}, defaultEmits, formNode, componentName) {
31806
31806
  };
31807
31807
  }
31808
31808
  function useTree(props2 = {}, dataTree, defaultEmits, componentName) {
31809
- const { $codeField, $messageField, $dataField, $success } = utils.getApiConfig();
31809
+ const { $codeField: $codeField2, $messageField: $messageField2, $dataField: $dataField2, $success: $success2 } = utils.getApiConfig();
31810
31810
  const {
31811
31811
  currModelValue,
31812
31812
  returnModelValue
@@ -32091,13 +32091,13 @@ function useTree(props2 = {}, dataTree, defaultEmits, componentName) {
32091
32091
  }
32092
32092
  remoteLoading.value = true;
32093
32093
  currUrl.post({}).then((res) => {
32094
- if (res[$codeField] == $success) {
32095
- optionData.value = res[$dataField];
32094
+ if (res[$codeField2] == $success2) {
32095
+ optionData.value = res[$dataField2];
32096
32096
  options2.value = [];
32097
32097
  toTreeData();
32098
32098
  initSelectValue();
32099
32099
  } else {
32100
- ProxyElsMessage.error(res[$messageField]);
32100
+ ProxyElsMessage.error(res[$messageField2]);
32101
32101
  }
32102
32102
  remoteLoading.value = false;
32103
32103
  resolve2(true);
@@ -40860,7 +40860,7 @@ const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
40860
40860
  var _a;
40861
40861
  return ((_a = container == null ? void 0 : container.$transferParams) == null ? void 0 : _a.value) || {};
40862
40862
  });
40863
- const { $codeField, $messageField, $dataField, $success } = utils.getApiConfig();
40863
+ const { $codeField: $codeField2, $messageField: $messageField2, $dataField: $dataField2, $success: $success2 } = utils.getApiConfig();
40864
40864
  const { $idField, $actionField } = utils.getMenuConfig();
40865
40865
  const { $pageDataField, $menuField, $pageSizeField, $currentPageField, $totalField, $pageCountField, $avgDayField } = utils.getTableConfig();
40866
40866
  const { getValue: getValue2, setValue, attrProps } = useProps(props2);
@@ -41557,8 +41557,8 @@ const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
41557
41557
  tableData.forEach((ele) => {
41558
41558
  ele.saveDataLoading = false;
41559
41559
  });
41560
- if (res[$codeField] != "0") {
41561
- ElMessage.error(res[$messageField]);
41560
+ if (res[$codeField2] != "0") {
41561
+ ElMessage.error(res[$messageField2]);
41562
41562
  } else {
41563
41563
  if (!res.EventActionData) {
41564
41564
  ElMessage.success("保存成功");
@@ -41663,8 +41663,8 @@ const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
41663
41663
  }
41664
41664
  function handleTableRowMoveHere(url) {
41665
41665
  url.post({ selectID: sortSelectRow[dataKey.value], moveID: rowData[dataKey.value] }).then((res) => {
41666
- if (!res || res[$codeField] != "0") {
41667
- ElMessage.error(res[$messageField]);
41666
+ if (!res || res[$codeField2] != "0") {
41667
+ ElMessage.error(res[$messageField2]);
41668
41668
  } else {
41669
41669
  ElMessage.success("移动成功");
41670
41670
  readData();
@@ -41673,8 +41673,8 @@ const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
41673
41673
  }
41674
41674
  function handleTableRowExchangeMove(url) {
41675
41675
  url.post({ selectID: sortSelectRow[dataKey.value], moveID: rowData[dataKey.value] }).then((res) => {
41676
- if (!res || res[$codeField] != "0") {
41677
- ElMessage.error(res[$messageField]);
41676
+ if (!res || res[$codeField2] != "0") {
41677
+ ElMessage.error(res[$messageField2]);
41678
41678
  } else {
41679
41679
  ElMessage.success("移动成功");
41680
41680
  readData();
@@ -41924,19 +41924,19 @@ const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
41924
41924
  let currQueryData = utils.getQueryParameters(searchQueryData);
41925
41925
  const requestUrl = props2.url.setPowerPublicQuery().setTransferParams(transferParams.value);
41926
41926
  return requestUrl.postWithCancel(currQueryData, readDataCancel).then((res) => {
41927
- if (res[$codeField] === $success) {
41928
- if (res[$dataField][$pageSizeField] != void 0) {
41927
+ if (res[$codeField2] === $success2) {
41928
+ if (res[$dataField2][$pageSizeField] != void 0) {
41929
41929
  sourceTableData.length = 0;
41930
- sourceTableData.push(...res[$dataField][$pageDataField]);
41930
+ sourceTableData.push(...res[$dataField2][$pageDataField]);
41931
41931
  if (!props2.isClientPage) {
41932
- currPageSize.value = res[$dataField][$pageSizeField];
41932
+ currPageSize.value = res[$dataField2][$pageSizeField];
41933
41933
  }
41934
- currPageIndex.value = res[$dataField][$currentPageField] + 1;
41935
- currRecourdCount.value = res[$dataField][$totalField];
41936
- currPageTotal.value = res[$dataField][$pageCountField];
41934
+ currPageIndex.value = res[$dataField2][$currentPageField] + 1;
41935
+ currRecourdCount.value = res[$dataField2][$totalField];
41936
+ currPageTotal.value = res[$dataField2][$pageCountField];
41937
41937
  } else {
41938
41938
  sourceTableData.length = 0;
41939
- sourceTableData.push(...res[$dataField]);
41939
+ sourceTableData.push(...res[$dataField2]);
41940
41940
  }
41941
41941
  if (props2.isClientSearch || props2.isClientPage) {
41942
41942
  clientTableData();
@@ -41945,11 +41945,11 @@ const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
41945
41945
  tableData.push(...sourceTableData);
41946
41946
  }
41947
41947
  editSourceTableData = utils.cloneObj(sourceTableData);
41948
- if ($avgDayField && res[$dataField][$avgDayField]) {
41949
- provideData.avgDay = res[$dataField][$avgDayField];
41948
+ if ($avgDayField && res[$dataField2][$avgDayField]) {
41949
+ provideData.avgDay = res[$dataField2][$avgDayField];
41950
41950
  }
41951
41951
  } else {
41952
- ElMessage.error(res[$messageField]);
41952
+ ElMessage.error(res[$messageField2]);
41953
41953
  }
41954
41954
  dataLoading.value = false;
41955
41955
  if (props2.afterReadData) {
@@ -42373,12 +42373,12 @@ const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
42373
42373
  background: "rgba(0, 0, 0, 0.7)"
42374
42374
  });
42375
42375
  currUrl.post(currQueryData).then((res) => {
42376
- if (res[$codeField] === "0") {
42376
+ if (res[$codeField2] === "0") {
42377
42377
  tableData.length = 0;
42378
- if (res[$dataField][$pageSizeField] != void 0) {
42379
- tableData.push(...res[$dataField][$pageDataField]);
42378
+ if (res[$dataField2][$pageSizeField] != void 0) {
42379
+ tableData.push(...res[$dataField2][$pageDataField]);
42380
42380
  } else {
42381
- tableData.push(...res[$dataField]);
42381
+ tableData.push(...res[$dataField2]);
42382
42382
  }
42383
42383
  nextTick(() => {
42384
42384
  exportDataHtml();
@@ -42387,7 +42387,7 @@ const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
42387
42387
  });
42388
42388
  } else {
42389
42389
  exportLoading.close();
42390
- ElMessage.error(res[$messageField]);
42390
+ ElMessage.error(res[$messageField2]);
42391
42391
  }
42392
42392
  }).catch((action) => {
42393
42393
  exportLoading.close();
@@ -43295,7 +43295,7 @@ const _sfc_main$1X = /* @__PURE__ */ defineComponent({
43295
43295
  const emits2 = __emit;
43296
43296
  const props2 = __props;
43297
43297
  const { setValue, attrProps } = useProps(props2);
43298
- const { $codeField, $messageField, $dataField, $success } = utils.getApiConfig();
43298
+ const { $codeField: $codeField2, $messageField: $messageField2, $dataField: $dataField2, $success: $success2 } = utils.getApiConfig();
43299
43299
  const searchKey = ref("");
43300
43300
  const isCollapse = ref(props2.collapse);
43301
43301
  let hiddenMenuIds = ref([]);
@@ -43398,12 +43398,12 @@ const _sfc_main$1X = /* @__PURE__ */ defineComponent({
43398
43398
  function readData() {
43399
43399
  if (props2.url) {
43400
43400
  props2.url.post({}).then((res) => {
43401
- if (res[$codeField] == $success) {
43401
+ if (res[$codeField2] == $success2) {
43402
43402
  optionData.length = 0;
43403
- optionData.push(...res[$dataField]);
43403
+ optionData.push(...res[$dataField2]);
43404
43404
  converToData();
43405
43405
  } else {
43406
- ElMessage.error(res[$messageField]);
43406
+ ElMessage.error(res[$messageField2]);
43407
43407
  }
43408
43408
  });
43409
43409
  }
@@ -44104,10 +44104,10 @@ class Autocomplete extends TBaseFormItem {
44104
44104
  pcRender() {
44105
44105
  var _a;
44106
44106
  const {
44107
- $codeField,
44108
- $messageField,
44109
- $dataField,
44110
- $success
44107
+ $codeField: $codeField2,
44108
+ $messageField: $messageField2,
44109
+ $dataField: $dataField2,
44110
+ $success: $success2
44111
44111
  } = utils.getApiConfig();
44112
44112
  const queryMethod = (searchValue, cb) => {
44113
44113
  if (this._props.fetchSuggestions) {
@@ -44128,11 +44128,11 @@ class Autocomplete extends TBaseFormItem {
44128
44128
  return new Promise((resolve2) => {
44129
44129
  if (this._props.url) {
44130
44130
  this._props.url.post(this.queryData).then((res) => {
44131
- if (res[$codeField] == $success) {
44131
+ if (res[$codeField2] == $success2) {
44132
44132
  this.tableData.length = 0;
44133
- this.tableData.push(...res[$dataField]);
44133
+ this.tableData.push(...res[$dataField2]);
44134
44134
  } else {
44135
- ProxyElsMessage.error(res[$messageField]);
44135
+ ProxyElsMessage.error(res[$messageField2]);
44136
44136
  }
44137
44137
  });
44138
44138
  } else {
@@ -44474,7 +44474,7 @@ const _sfc_main$1P = /* @__PURE__ */ defineComponent({
44474
44474
  emits: ["update:modelValue"],
44475
44475
  setup(__props, { expose: __expose, emit: __emit }) {
44476
44476
  const emits2 = __emit;
44477
- const { $codeField, $success } = utils.getApiConfig();
44477
+ const { $codeField: $codeField2, $success: $success2 } = utils.getApiConfig();
44478
44478
  const slots = useSlots();
44479
44479
  const props2 = __props;
44480
44480
  const { getValue: getValue2 } = useProps(props2);
@@ -44517,7 +44517,7 @@ const _sfc_main$1P = /* @__PURE__ */ defineComponent({
44517
44517
  if (action === "confirm") {
44518
44518
  if (props2.confirm) {
44519
44519
  props2.confirm().then((res) => {
44520
- if (res === true || res[$codeField] == $success) {
44520
+ if (res === true || res[$codeField2] == $success2) {
44521
44521
  resolve2(true);
44522
44522
  } else {
44523
44523
  resolve2(false);
@@ -44529,7 +44529,7 @@ const _sfc_main$1P = /* @__PURE__ */ defineComponent({
44529
44529
  } else {
44530
44530
  if (props2.cancel) {
44531
44531
  props2.cancel().then((res) => {
44532
- if (res === true || res[$codeField] == $success) {
44532
+ if (res === true || res[$codeField2] == $success2) {
44533
44533
  resolve2(true);
44534
44534
  } else {
44535
44535
  resolve2(false);
@@ -44551,7 +44551,7 @@ const _sfc_main$1P = /* @__PURE__ */ defineComponent({
44551
44551
  if (props2.cancel) {
44552
44552
  cancelLoading.value = true;
44553
44553
  props2.cancel().then((res) => {
44554
- if (res === true || res[$codeField] == $success) {
44554
+ if (res === true || res[$codeField2] == $success2) {
44555
44555
  dialogVisible.value = false;
44556
44556
  }
44557
44557
  cancelLoading.value = false;
@@ -44564,7 +44564,7 @@ const _sfc_main$1P = /* @__PURE__ */ defineComponent({
44564
44564
  if (props2.confirm) {
44565
44565
  confirmLoading.value = true;
44566
44566
  props2.confirm().then((res) => {
44567
- if (res === true || res[$codeField] == $success) {
44567
+ if (res === true || res[$codeField2] == $success2) {
44568
44568
  dialogVisible.value = false;
44569
44569
  }
44570
44570
  confirmLoading.value = false;
@@ -44719,7 +44719,7 @@ const _sfc_main$1O = /* @__PURE__ */ defineComponent({
44719
44719
  const emits2 = __emit;
44720
44720
  const slots = useSlots();
44721
44721
  const props2 = __props;
44722
- const { $codeField, $success } = utils.getApiConfig();
44722
+ const { $codeField: $codeField2, $success: $success2 } = utils.getApiConfig();
44723
44723
  const cancelLoading = ref(false);
44724
44724
  const confirmLoading = ref(false);
44725
44725
  const tagID = "less_drawer_" + utils.shortid();
@@ -44745,7 +44745,7 @@ const _sfc_main$1O = /* @__PURE__ */ defineComponent({
44745
44745
  if (props2.cancel) {
44746
44746
  cancelLoading.value = true;
44747
44747
  props2.cancel().then((res) => {
44748
- if (res === true || res[$codeField] == $success) {
44748
+ if (res === true || res[$codeField2] == $success2) {
44749
44749
  drawerVisible.value = false;
44750
44750
  }
44751
44751
  cancelLoading.value = false;
@@ -44758,7 +44758,7 @@ const _sfc_main$1O = /* @__PURE__ */ defineComponent({
44758
44758
  if (props2.confirm) {
44759
44759
  confirmLoading.value = true;
44760
44760
  props2.confirm().then((res) => {
44761
- if (res === true || res[$codeField] == $success) {
44761
+ if (res === true || res[$codeField2] == $success2) {
44762
44762
  drawerVisible.value = false;
44763
44763
  }
44764
44764
  confirmLoading.value = false;
@@ -45363,7 +45363,7 @@ let Upload$2 = class Upload extends TBaseFormItem {
45363
45363
  __publicField(this, "handleSuccess", (res, file, fileList) => {
45364
45364
  const apiConfig = utils.getApiConfig();
45365
45365
  const {
45366
- $dataField,
45366
+ $dataField: $dataField2,
45367
45367
  $pathField,
45368
45368
  $md5Field
45369
45369
  } = utils.getUploadConfig();
@@ -45379,8 +45379,8 @@ let Upload$2 = class Upload extends TBaseFormItem {
45379
45379
  file.message = "上传成功";
45380
45380
  let currUrl = "";
45381
45381
  let currRes = res[apiConfig.$dataField];
45382
- if ($dataField) {
45383
- currRes = res[apiConfig.$dataField][$dataField];
45382
+ if ($dataField2) {
45383
+ currRes = res[apiConfig.$dataField][$dataField2];
45384
45384
  }
45385
45385
  currUrl = currRes[$pathField];
45386
45386
  if (this._props.hasMd5Parameter) {
@@ -48387,7 +48387,7 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
48387
48387
  const getFormLabelPosition = getValue2("getFormLabelPosition", () => "");
48388
48388
  const getFormLabelWidth = getValue2("getFormLabelWidth", () => "");
48389
48389
  const getFormLabelSuffix = getValue2("getFormLabelSuffix", () => "");
48390
- const { $codeField, $messageField, $dataField, $success } = utils.getApiConfig();
48390
+ const { $codeField: $codeField2, $messageField: $messageField2, $dataField: $dataField2, $success: $success2 } = utils.getApiConfig();
48391
48391
  const modelValue = useModel$1(__props, "modelValue");
48392
48392
  const loading = ref(false);
48393
48393
  const sseAbort = ref(null);
@@ -48476,14 +48476,14 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
48476
48476
  }
48477
48477
  function handleResponse(res) {
48478
48478
  const append2 = props2.requestMethod === "SSE";
48479
- if (res && res[$codeField] !== void 0) {
48480
- if (res[$codeField] != $success) {
48481
- ProxyElsMessage.error(res[$messageField]);
48479
+ if (res && res[$codeField2] !== void 0) {
48480
+ if (res[$codeField2] != $success2) {
48481
+ ProxyElsMessage.error(res[$messageField2]);
48482
48482
  setResult(res, "error", append2);
48483
48483
  emit("error", res);
48484
48484
  return;
48485
48485
  }
48486
- const data = res[$dataField];
48486
+ const data = res[$dataField2];
48487
48487
  applyResult(data);
48488
48488
  setResult(res, "success", append2);
48489
48489
  emit("success", data);
@@ -48497,7 +48497,7 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
48497
48497
  }
48498
48498
  function extractErrorMessage(err) {
48499
48499
  var _a, _b, _c;
48500
- return ((_a = err == null ? void 0 : err.data) == null ? void 0 : _a[$messageField]) || ((_c = (_b = err == null ? void 0 : err.response) == null ? void 0 : _b.data) == null ? void 0 : _c[$messageField]) || (err == null ? void 0 : err.message) || "请求失败";
48500
+ return ((_a = err == null ? void 0 : err.data) == null ? void 0 : _a[$messageField2]) || ((_c = (_b = err == null ? void 0 : err.response) == null ? void 0 : _b.data) == null ? void 0 : _c[$messageField2]) || (err == null ? void 0 : err.message) || "请求失败";
48501
48501
  }
48502
48502
  function normalizeError(err) {
48503
48503
  var _a;
@@ -74029,7 +74029,7 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
74029
74029
  const { setContainer } = useProps(props2);
74030
74030
  const tagID = "els-container" + utils.shortid();
74031
74031
  const { ctx } = getCurrentInstance();
74032
- const { $codeField, $messageField, $success, $eventData } = utils.getApiConfig();
74032
+ const { $codeField: $codeField2, $messageField: $messageField2, $success: $success2, $eventData } = utils.getApiConfig();
74033
74033
  const { $actionTypeField, $confirmField, $confirmPasswordField, $urlField, $nameField } = utils.getMenuConfig();
74034
74034
  const elsPageStore = ref({
74035
74035
  validates: [],
@@ -74325,7 +74325,7 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
74325
74325
  menu.IsLoading = false;
74326
74326
  resolve2({ menu, res: true });
74327
74327
  if (!res) return;
74328
- if (res[$codeField] == "0") {
74328
+ if (res[$codeField2] == "0") {
74329
74329
  var currUrl = res.Data;
74330
74330
  if (currUrl.indexOf("txt") > -1) {
74331
74331
  utils.downLoadTxt(currUrl);
@@ -74333,7 +74333,7 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
74333
74333
  window.location.href = currUrl;
74334
74334
  }
74335
74335
  } else {
74336
- ElMessage.error(res[$messageField]);
74336
+ ElMessage.error(res[$messageField2]);
74337
74337
  }
74338
74338
  });
74339
74339
  } else {
@@ -74359,11 +74359,11 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
74359
74359
  if (!res) {
74360
74360
  return;
74361
74361
  }
74362
- if (!res[$eventData.data] && res[$codeField] == $success) {
74363
- ElMessage.success(res[$messageField]);
74362
+ if (!res[$eventData.data] && res[$codeField2] == $success2) {
74363
+ ElMessage.success(res[$messageField2]);
74364
74364
  return;
74365
- } else if (!res[$eventData.data] && res[$codeField] != $success) {
74366
- ElMessage.error(res[$messageField]);
74365
+ } else if (!res[$eventData.data] && res[$codeField2] != $success2) {
74366
+ ElMessage.error(res[$messageField2]);
74367
74367
  return;
74368
74368
  }
74369
74369
  res[$eventData.data].forEach((action) => {
@@ -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-5Au5l5Jf.js");
75058
+ return import("./innerItem-DxZoiM2C.js");
75059
75059
  });
75060
75060
  const { getValue: getValue2 } = useProps();
75061
75061
  const tagID = getValue2("tagID");
@@ -75523,7 +75523,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
75523
75523
  props: designerProps,
75524
75524
  emits: ["update:modelValue", "update:templateValue"],
75525
75525
  setup(__props, { expose: __expose, emit: __emit }) {
75526
- const { $codeField, $messageField, $success } = utils.getApiConfig();
75526
+ const { $codeField: $codeField2, $messageField: $messageField2, $success: $success2 } = utils.getApiConfig();
75527
75527
  const props2 = __props;
75528
75528
  const emits2 = __emit;
75529
75529
  const { setValue, formNodeProps } = useProps(props2);
@@ -75752,7 +75752,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
75752
75752
  data: JSON.stringify(data)
75753
75753
  }).then((res) => {
75754
75754
  var _a, _b, _c;
75755
- if (res[$codeField] == $success) {
75755
+ if (res[$codeField2] == $success2) {
75756
75756
  if ((_a = res.Data) == null ? void 0 : _a.ID) {
75757
75757
  data.id = (_b = res.Data) == null ? void 0 : _b.ID;
75758
75758
  data.componentType.id = (_c = res.Data) == null ? void 0 : _c.ID;
@@ -75776,7 +75776,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
75776
75776
  currComponentTypes.value.push(data.componentType);
75777
75777
  resolve2(true);
75778
75778
  } else {
75779
- ProxyElsMessage.warning(res[$messageField]);
75779
+ ProxyElsMessage.warning(res[$messageField2]);
75780
75780
  resolve2(false);
75781
75781
  }
75782
75782
  }).catch((res) => {
@@ -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-Ba84wZRD.js").then((n) => n.i);
76096
+ return import("./inner-PWU9A8AN.js").then((n) => n.i);
76097
76097
  });
76098
76098
  const DynamicRenderForm = defineAsyncComponent(() => {
76099
- return import("./inner-Ba84wZRD.js").then((n) => n.f);
76099
+ return import("./inner-PWU9A8AN.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-Ba84wZRD.js").then((n) => n.i);
76339
+ return import("./inner-PWU9A8AN.js").then((n) => n.i);
76340
76340
  });
76341
76341
  const DynamicRenderFormAsync = defineAsyncComponent(() => {
76342
- return import("./inner-Ba84wZRD.js").then((n) => n.f);
76342
+ return import("./inner-PWU9A8AN.js").then((n) => n.f);
76343
76343
  });
76344
76344
  const props2 = __props;
76345
76345
  const { getValue: getValue2, setValue, formNodeProps } = useProps(props2);
@@ -79584,6 +79584,7 @@ const designerViewProps = buildProps({
79584
79584
  default: () => []
79585
79585
  }
79586
79586
  });
79587
+ const { $codeField, $messageField, $success, $dataField } = utils.getApiConfig();
79587
79588
  const AI_SYSTEM_PROMPT = `你是一个低代码表单配置生成器。根据用户描述,输出符合以下格式的 JSON 数组。只输出 JSON,不要有任何额外文字、注释或代码块标记。
79588
79589
 
79589
79590
  # 节点结构
@@ -80062,17 +80063,22 @@ Table 表格适合需要用户编辑多行数据的场景,isEdit:true 开启
80062
80063
  ]
80063
80064
  \`\`\``;
80064
80065
  async function callAI(url, userPrompt, options2) {
80065
- var _a, _b, _c;
80066
80066
  const sys = (options2 == null ? void 0 : options2.systemPrompt) || AI_SYSTEM_PROMPT;
80067
80067
  const body = (options2 == null ? void 0 : options2.buildRequest) ? options2.buildRequest(sys, userPrompt) : { system: sys, user: userPrompt };
80068
- const res = await fetch(url, {
80069
- method: "POST",
80070
- headers: { "Content-Type": "application/json" },
80071
- body: JSON.stringify(body)
80072
- });
80073
- const data = await res.json();
80074
- const text = (options2 == null ? void 0 : options2.pickResponse) ? options2.pickResponse(data) : ((_c = (_b = (_a = data == null ? void 0 : data.choices) == null ? void 0 : _a[0]) == null ? void 0 : _b.message) == null ? void 0 : _c.content) ?? (data == null ? void 0 : data.content) ?? (data == null ? void 0 : data.data) ?? "";
80075
- return JSON.parse(text);
80068
+ const res = await url.post(body);
80069
+ if (res[$codeField] != $success) {
80070
+ ProxyElsMessage.warning(`${res[$messageField]}`);
80071
+ return [];
80072
+ }
80073
+ let text = (options2 == null ? void 0 : options2.pickResponse) ? options2.pickResponse(res[$dataField]) : res[$dataField];
80074
+ text = text.replace(/^```(?:json)?\s*/i, "").replace(/\s*```\s*$/, "").trim();
80075
+ try {
80076
+ const data = JSON.parse(text);
80077
+ return Array.isArray(data) ? data : [data];
80078
+ } catch {
80079
+ ProxyElsMessage.warning("AI 返回格式无效,请重试");
80080
+ return [];
80081
+ }
80076
80082
  }
80077
80083
  const useDesign = defineStore("dynamic-design", () => {
80078
80084
  const queue = ref([]);
@@ -82683,31 +82689,31 @@ let AceEditor$1 = class AceEditor extends TBaseFormItem {
82683
82689
  __publicField(this, "editor", ref());
82684
82690
  onMounted(() => {
82685
82691
  if (props2.language === "json") {
82686
- const currModule = import("./mode-json-B_6Rc56R.js").then((n) => n.m);
82692
+ const currModule = import("./mode-json-DvMBn-gb.js").then((n) => n.m);
82687
82693
  currModule.then((res) => {
82688
82694
  ace.config.setModuleUrl("ace/mode/json", res);
82689
82695
  this.init();
82690
82696
  });
82691
82697
  } else if (props2.language === "javascript") {
82692
- const currModule = import("./mode-javascript-B4nfmHwI.js").then((n) => n.m);
82698
+ const currModule = import("./mode-javascript-BA7c9L6f.js").then((n) => n.m);
82693
82699
  currModule.then((res) => {
82694
82700
  ace.config.setModuleUrl("ace/mode/javascript", res);
82695
82701
  this.init();
82696
82702
  });
82697
82703
  } else if (props2.language === "csharp") {
82698
- const currModule = import("./mode-csharp-DpcfdC7v.js").then((n) => n.m);
82704
+ const currModule = import("./mode-csharp-ujSwp4Ss.js").then((n) => n.m);
82699
82705
  currModule.then((res) => {
82700
82706
  ace.config.setModuleUrl("ace/mode/csharp", res);
82701
82707
  this.init();
82702
82708
  });
82703
82709
  } else if (props2.language === "mysql") {
82704
- const currModule = import("./mode-mysql-D25NsOyA.js").then((n) => n.m);
82710
+ const currModule = import("./mode-mysql-68NS3DBE.js").then((n) => n.m);
82705
82711
  currModule.then((res) => {
82706
82712
  ace.config.setModuleUrl("ace/mode/mysql", res);
82707
82713
  this.init();
82708
82714
  });
82709
82715
  } else if (props2.language === "css") {
82710
- const currModule = import("./mode-css-Bw3HxevP.js").then((n) => n.m);
82716
+ const currModule = import("./mode-css-BE9lm-IQ.js").then((n) => n.m);
82711
82717
  currModule.then((res) => {
82712
82718
  ace.config.setModuleUrl("ace/mode/css", res);
82713
82719
  this.init();
@@ -82842,7 +82848,7 @@ class MdEditor extends TBaseFormItem {
82842
82848
  __publicField(this, "uploadImg", async (files, callback) => {
82843
82849
  const apiConfig = utils.getApiConfig();
82844
82850
  const {
82845
- $dataField,
82851
+ $dataField: $dataField2,
82846
82852
  $pathField
82847
82853
  } = utils.getUploadConfig();
82848
82854
  const urls = await Promise.all(files.map((file) => {
@@ -82854,7 +82860,7 @@ class MdEditor extends TBaseFormItem {
82854
82860
  return "";
82855
82861
  }
82856
82862
  let currRes = res[apiConfig.$dataField];
82857
- if ($dataField) currRes = currRes[$dataField];
82863
+ if ($dataField2) currRes = currRes[$dataField2];
82858
82864
  return currRes[$pathField] ?? "";
82859
82865
  });
82860
82866
  }));
@@ -83165,12 +83171,12 @@ let WangEditor$1 = class WangEditor extends TBaseFormItem {
83165
83171
  this.serverUrl.value = this.serverUrl.value.addUrlParameter("ResourceCode", props2.resourceCode).addUrlParameter("RestrictCode", props2.restrictCode);
83166
83172
  }
83167
83173
  const {
83168
- $codeField,
83169
- $success,
83174
+ $codeField: $codeField2,
83175
+ $success: $success2,
83170
83176
  $dataField: apiDataField
83171
83177
  } = utils.getApiConfig();
83172
83178
  const {
83173
- $dataField,
83179
+ $dataField: $dataField2,
83174
83180
  $pathField
83175
83181
  } = utils.getUploadConfig();
83176
83182
  this.editorConfig.value = {
@@ -83199,8 +83205,8 @@ let WangEditor$1 = class WangEditor extends TBaseFormItem {
83199
83205
  console.log(`${file.name} 上传出错`, err, res);
83200
83206
  },
83201
83207
  customInsert(res, insertFn) {
83202
- if (res[$codeField] === $success) {
83203
- insertFn(res[apiDataField][$dataField][$pathField], "");
83208
+ if (res[$codeField2] === $success2) {
83209
+ insertFn(res[apiDataField][$dataField2][$pathField], "");
83204
83210
  }
83205
83211
  }
83206
83212
  }
@@ -85065,7 +85071,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
85065
85071
  aindex: {}
85066
85072
  },
85067
85073
  setup(__props) {
85068
- const { $dataField } = utils.getApiConfig();
85074
+ const { $dataField: $dataField2 } = utils.getApiConfig();
85069
85075
  const props2 = __props;
85070
85076
  const { getValue: getValue2 } = useProps(props2);
85071
85077
  const formValidate = ref(true);
@@ -85114,8 +85120,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
85114
85120
  }
85115
85121
  if (currInputs.AssignedPrincipal) {
85116
85122
  userUrl.post({ idString: currInputs.AssignedPrincipal }).then((res) => {
85117
- if (res[$dataField]) {
85118
- currInputs.AssignedPrincipal = res[$dataField].toString();
85123
+ if (res[$dataField2]) {
85124
+ currInputs.AssignedPrincipal = res[$dataField2].toString();
85119
85125
  itemContent.value = getDynamicAttrContent(props2.item.data.StepType, currInputs);
85120
85126
  }
85121
85127
  });
@@ -85766,7 +85772,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
85766
85772
  props: workFlowProps,
85767
85773
  emits: ["update:modelValue"],
85768
85774
  setup(__props, { expose: __expose, emit: __emit }) {
85769
- const { $codeField, $dataField, $success } = utils.getApiConfig();
85775
+ const { $codeField: $codeField2, $dataField: $dataField2, $success: $success2 } = utils.getApiConfig();
85770
85776
  let bgColors = ref(["87, 106, 149", "255, 148, 62", "50, 150, 250"]);
85771
85777
  const props2 = __props;
85772
85778
  const { setValue } = useProps(props2);
@@ -85807,9 +85813,9 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
85807
85813
  initLoading.value = true;
85808
85814
  if (props2.configUrl) {
85809
85815
  props2.configUrl.post({}).then((res) => {
85810
- if (res[$codeField] == $success) {
85816
+ if (res[$codeField2] == $success2) {
85811
85817
  configData.value.length = 0;
85812
- configData.value.push(...res[$dataField]);
85818
+ configData.value.push(...res[$dataField2]);
85813
85819
  initLoading.value = false;
85814
85820
  }
85815
85821
  });
@@ -91284,7 +91290,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
91284
91290
  props: waterFallProps,
91285
91291
  emits: ["loadMore", "changePage", "changeSize"],
91286
91292
  setup(__props, { expose: __expose, emit: __emit }) {
91287
- const { $codeField, $messageField, $dataField, $success } = utils.getApiConfig();
91293
+ const { $codeField: $codeField2, $messageField: $messageField2, $dataField: $dataField2, $success: $success2 } = utils.getApiConfig();
91288
91294
  const { $pageDataField, $menuField, $pageSizeField, $currentPageField, $totalField, $pageCountField, $avgDayField } = utils.getTableConfig();
91289
91295
  const emits2 = __emit;
91290
91296
  const props2 = __props;
@@ -91338,8 +91344,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
91338
91344
  if (props2.nextPageType === "page" || currPageIndex.value === 1) {
91339
91345
  wallfallData.value.length = 0;
91340
91346
  }
91341
- if (res[$codeField] === $success) {
91342
- const dataField = res[$dataField];
91347
+ if (res[$codeField2] === $success2) {
91348
+ const dataField = res[$dataField2];
91343
91349
  if (dataField[$pageSizeField] !== void 0) {
91344
91350
  if (dataField[$pageDataField]) {
91345
91351
  wallfallData.value.push(...dataField[$pageDataField]);
@@ -91365,7 +91371,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
91365
91371
  wallfallData.value = props2.afterReadData(wallfallData.value);
91366
91372
  }
91367
91373
  } else {
91368
- ProxyElsMessage.error(res[$messageField]);
91374
+ ProxyElsMessage.error(res[$messageField2]);
91369
91375
  }
91370
91376
  remoteLoading.value = false;
91371
91377
  resolve2(true);