lew-ui 2.3.2 → 2.3.4
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/components/form/src/LewForm.vue.d.ts +1 -0
- package/dist/index.mjs +11 -6
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -49,6 +49,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
49
49
|
}, {
|
|
50
50
|
getForm: () => {};
|
|
51
51
|
setForm: (value?: any) => void;
|
|
52
|
+
resetError: () => void;
|
|
52
53
|
validate: () => Promise<boolean>;
|
|
53
54
|
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
54
55
|
change: (...args: any[]) => void;
|
package/dist/index.mjs
CHANGED
|
@@ -11415,14 +11415,19 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
11415
11415
|
componentOptions.forEach((item) => {
|
|
11416
11416
|
var _a2;
|
|
11417
11417
|
const v2 = getNestedFieldValue(value, item.field);
|
|
11418
|
+
if (value !== void 0 && item.field) {
|
|
11419
|
+
(_a2 = formItemRefMap.value[item.field]) == null ? void 0 : _a2.setError("");
|
|
11420
|
+
formMap.value[item.field] = v2;
|
|
11421
|
+
}
|
|
11422
|
+
});
|
|
11423
|
+
};
|
|
11424
|
+
const resetError = () => {
|
|
11425
|
+
componentOptions.forEach((item) => {
|
|
11426
|
+
var _a2;
|
|
11418
11427
|
if (item.field) {
|
|
11419
11428
|
(_a2 = formItemRefMap.value[item.field]) == null ? void 0 : _a2.setError("");
|
|
11420
|
-
if (value !== void 0 && item.field) {
|
|
11421
|
-
formMap.value[item.field] = v2;
|
|
11422
|
-
}
|
|
11423
11429
|
}
|
|
11424
11430
|
});
|
|
11425
|
-
emit("change", getForm());
|
|
11426
11431
|
};
|
|
11427
11432
|
const getNestedFieldValue = (obj, field) => {
|
|
11428
11433
|
if (!field) {
|
|
@@ -11474,7 +11479,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
11474
11479
|
});
|
|
11475
11480
|
}
|
|
11476
11481
|
);
|
|
11477
|
-
__expose({ getForm, setForm, validate });
|
|
11482
|
+
__expose({ getForm, setForm, resetError, validate });
|
|
11478
11483
|
return (_ctx, _cache) => {
|
|
11479
11484
|
return openBlock(), createElementBlock("div", {
|
|
11480
11485
|
class: normalizeClass(["lew-form", unref(getFormClassNames)]),
|
|
@@ -11510,7 +11515,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
11510
11515
|
};
|
|
11511
11516
|
}
|
|
11512
11517
|
});
|
|
11513
|
-
const LewForm = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-
|
|
11518
|
+
const LewForm = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-cf8d2885"]]);
|
|
11514
11519
|
const checkboxModel = {
|
|
11515
11520
|
modelValue: {
|
|
11516
11521
|
type: Boolean,
|