yxuse 3.0.52 → 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.cjs6.js +1 -1
- package/lib/index.cjs6.js.gz +0 -0
- package/lib/index.cjs6.js.map +1 -1
- package/lib/index.es6.js +25 -8
- package/lib/index.es6.js.gz +0 -0
- package/lib/index.es6.js.map +1 -1
- package/lib/style.css +1 -1
- package/lib/style.css.gz +0 -0
- package/package.json +1 -1
- package/types/components/YxForm/index.vue.d.ts +3 -3
- package/types/components/YxForm/type.d.ts +1 -1
package/lib/index.es6.js
CHANGED
|
@@ -20491,7 +20491,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
20491
20491
|
startSort();
|
|
20492
20492
|
});
|
|
20493
20493
|
});
|
|
20494
|
+
watch(() => props.columns, () => {
|
|
20495
|
+
initTable();
|
|
20496
|
+
});
|
|
20494
20497
|
onBeforeMount(() => __async(this, null, function* () {
|
|
20498
|
+
yield initTable();
|
|
20499
|
+
}));
|
|
20500
|
+
const initTable = () => __async(this, null, function* () {
|
|
20495
20501
|
columns.value = typeof props.columns === "function" ? yield props.columns() : props.columns;
|
|
20496
20502
|
columns.value.forEach((col) => {
|
|
20497
20503
|
var _a;
|
|
@@ -20500,7 +20506,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
20500
20506
|
loadOptions(col.config);
|
|
20501
20507
|
}
|
|
20502
20508
|
});
|
|
20503
|
-
})
|
|
20509
|
+
});
|
|
20504
20510
|
const loadOptions = (config) => __async(this, null, function* () {
|
|
20505
20511
|
if ((config == null ? void 0 : config.options) && (config == null ? void 0 : config.options.length) === 0 && (config == null ? void 0 : config.loadOptions) && typeof (config == null ? void 0 : config.loadOptions) === "function") {
|
|
20506
20512
|
config.options = yield config == null ? void 0 : config.loadOptions();
|
|
@@ -20709,16 +20715,27 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
20709
20715
|
};
|
|
20710
20716
|
formColumn.value.forEach((item) => fillFormData(item));
|
|
20711
20717
|
if (formParams && Object.keys(formParams).length > 0) {
|
|
20712
|
-
|
|
20713
|
-
|
|
20714
|
-
|
|
20715
|
-
|
|
20716
|
-
|
|
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
|
+
}
|
|
20717
20725
|
}
|
|
20726
|
+
} else {
|
|
20727
|
+
formData.value = formParams;
|
|
20718
20728
|
}
|
|
20729
|
+
} else {
|
|
20730
|
+
formData.value = initialData;
|
|
20719
20731
|
}
|
|
20720
|
-
formData.value = initialData;
|
|
20721
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
|
+
};
|
|
20722
20739
|
const loadOptions = (_0) => __async(this, [_0], function* ({
|
|
20723
20740
|
config,
|
|
20724
20741
|
prop
|
|
@@ -20945,7 +20962,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
20945
20962
|
};
|
|
20946
20963
|
}
|
|
20947
20964
|
}));
|
|
20948
|
-
const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
20965
|
+
const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-38c8b601"]]);
|
|
20949
20966
|
let versionKey, curVersion, updateApp;
|
|
20950
20967
|
const updateSysVersion = () => {
|
|
20951
20968
|
localStorage.setItem(versionKey, curVersion);
|
package/lib/index.es6.js.gz
CHANGED
|
Binary file
|