yxuse 3.0.53 → 3.0.54

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/lib/index.es6.js CHANGED
@@ -20715,16 +20715,27 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
20715
20715
  };
20716
20716
  formColumn.value.forEach((item) => fillFormData(item));
20717
20717
  if (formParams && Object.keys(formParams).length > 0) {
20718
- for (const item of formColumn.value) {
20719
- if (!item.prop) continue;
20720
- const isAsyncOption = ((_a = item.config) == null ? void 0 : _a.loadOptions) && typeof item.config.loadOptions === "function";
20721
- if (!(isAsyncOption && formParams[item.prop] !== void 0)) {
20722
- initialData[item.prop] = formParams[item.prop];
20718
+ if (hasLoadOptions()) {
20719
+ for (const item of formColumn.value) {
20720
+ if (!item.prop) continue;
20721
+ const isAsyncOption = ((_a = item.config) == null ? void 0 : _a.loadOptions) && typeof item.config.loadOptions === "function";
20722
+ if (!(isAsyncOption && formParams[item.prop] !== void 0)) {
20723
+ initialData[item.prop] = formParams[item.prop];
20724
+ }
20723
20725
  }
20726
+ } else {
20727
+ formData.value = formParams;
20724
20728
  }
20729
+ } else {
20730
+ formData.value = initialData;
20725
20731
  }
20726
- formData.value = initialData;
20727
20732
  });
20733
+ const hasLoadOptions = () => {
20734
+ return formColumn.value.some((item) => {
20735
+ var _a;
20736
+ return ((_a = item.config) == null ? void 0 : _a.loadOptions) && typeof item.config.loadOptions === "function";
20737
+ });
20738
+ };
20728
20739
  const loadOptions = (_0) => __async(this, [_0], function* ({
20729
20740
  config,
20730
20741
  prop
@@ -20951,7 +20962,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
20951
20962
  };
20952
20963
  }
20953
20964
  }));
20954
- const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-4196aa66"]]);
20965
+ const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-38c8b601"]]);
20955
20966
  let versionKey, curVersion, updateApp;
20956
20967
  const updateSysVersion = () => {
20957
20968
  localStorage.setItem(versionKey, curVersion);
Binary file