yxuse 3.0.58 → 3.0.59

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
@@ -1,4 +1,4 @@
1
- import { defineComponent, reactive, resolveComponent, createBlock, openBlock, createSlots, withCtx, renderSlot, createElementVNode, createVNode, createTextVNode, watch, resolveDynamicComponent, mergeProps, createElementBlock, createCommentVNode, Fragment, renderList, useSlots, useAttrs, ref, onMounted, nextTick, onBeforeMount, withModifiers, isVNode, toDisplayString, unref, normalizeStyle, normalizeClass, version, createApp } from "vue";
1
+ import { defineComponent, reactive, resolveComponent, createBlock, openBlock, createSlots, withCtx, renderSlot, createElementVNode, createVNode, createTextVNode, watch, resolveDynamicComponent, mergeProps, createElementBlock, createCommentVNode, Fragment, renderList, useSlots, useAttrs, ref, onMounted, nextTick, onBeforeMount, withModifiers, isVNode, onUnmounted, toDisplayString, unref, normalizeStyle, normalizeClass, version, createApp } from "vue";
2
2
  import { S as Sortable, _ as _export_sfc, T as Toolbar } from "./index.es5.js";
3
3
  import { genFileId } from "element-plus";
4
4
  import { j as jumpToHome, b as getUserConfig } from "./index.es12.js";
@@ -20682,7 +20682,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
20682
20682
  };
20683
20683
  const handleLinkOptions = (item) => {
20684
20684
  var _a, _b;
20685
- if (!((_a = item.config) == null ? void 0 : _a.linkOptions)) return;
20685
+ if (!((_a = item.config) == null ? void 0 : _a.linkOptions) || (item == null ? void 0 : item._linkedHandled)) return;
20686
20686
  const linkOptions = item.config.linkOptions;
20687
20687
  const originOnChange = (_b = item.event) == null ? void 0 : _b.onChange;
20688
20688
  const newOnChange = async (e) => {
@@ -20699,6 +20699,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
20699
20699
  ...item.event,
20700
20700
  onChange: newOnChange
20701
20701
  };
20702
+ item._linkedHandled = true;
20702
20703
  };
20703
20704
  const hasLoadOptions = () => {
20704
20705
  return formColumn.value.some((item) => {
@@ -20711,12 +20712,26 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
20711
20712
  prop
20712
20713
  }) => {
20713
20714
  var _a;
20714
- if (config == null ? void 0 : config.notAutoLoadOptions) return;
20715
- if ((config == null ? void 0 : config.options) && (config == null ? void 0 : config.loadOptions) && typeof (config == null ? void 0 : config.loadOptions) === "function") {
20716
- config.options = await (config == null ? void 0 : config.loadOptions());
20717
- if (prop && ((_a = props == null ? void 0 : props.formParams) == null ? void 0 : _a[prop])) {
20718
- formData.value[prop] = props == null ? void 0 : props.formParams[prop];
20715
+ if (!config || config.notAutoLoadOptions) return;
20716
+ const {
20717
+ loadOptions: loadOptions2,
20718
+ options
20719
+ } = config;
20720
+ if (!options || typeof loadOptions2 !== "function") return;
20721
+ const {
20722
+ formParams
20723
+ } = props;
20724
+ const parentProp = (_a = formColumn.value.find((item) => {
20725
+ var _a2;
20726
+ return ((_a2 = item == null ? void 0 : item.config) == null ? void 0 : _a2.linkOptions) === prop;
20727
+ })) == null ? void 0 : _a.prop;
20728
+ const parentValue = parentProp ? formParams == null ? void 0 : formParams[parentProp] : void 0;
20729
+ try {
20730
+ config.options = await loadOptions2(parentValue);
20731
+ if (prop && (formParams == null ? void 0 : formParams[prop])) {
20732
+ formData.value[prop] = formParams[prop];
20719
20733
  }
20734
+ } catch (err) {
20720
20735
  }
20721
20736
  };
20722
20737
  const slots = useSlots();
@@ -20765,6 +20780,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
20765
20780
  getRules();
20766
20781
  }
20767
20782
  });
20783
+ onUnmounted(() => {
20784
+ });
20768
20785
  const formRef = ref();
20769
20786
  const getFormStyle = () => {
20770
20787
  const {
@@ -20812,11 +20829,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
20812
20829
  if (!prop) return;
20813
20830
  const Component = resolveComponent("el-" + renderType);
20814
20831
  const renderChildComponent = () => {
20815
- if (renderType === "select") return config == null ? void 0 : config.options.map((item) => createVNode(resolveComponent("el-option"), {
20832
+ if (renderType === "select" && (config == null ? void 0 : config.options)) return config == null ? void 0 : config.options.map((item) => createVNode(resolveComponent("el-option"), {
20816
20833
  "label": item.label,
20817
20834
  "value": item.value
20818
20835
  }, null));
20819
- if (renderType === "radio-group") return config == null ? void 0 : config.options.map((item) => createVNode(resolveComponent("el-radio"), {
20836
+ if (renderType === "radio-group" && (config == null ? void 0 : config.options)) return config == null ? void 0 : config.options.map((item) => createVNode(resolveComponent("el-radio"), {
20820
20837
  "label": item.label,
20821
20838
  "value": item.value
20822
20839
  }, null));
@@ -20934,7 +20951,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
20934
20951
  };
20935
20952
  }
20936
20953
  });
20937
- const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-7efd15a3"]]);
20954
+ const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-99f2b938"]]);
20938
20955
  let versionKey, curVersion, updateApp;
20939
20956
  const updateSysVersion = () => {
20940
20957
  localStorage.setItem(versionKey, curVersion);
Binary file