@vunk/form 1.1.13 → 1.1.14
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.
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
|
|
2
|
-
import { buttonProps, buttonEmits, ElButton
|
|
2
|
+
import { buttonProps, buttonEmits, ElButton } from 'element-plus';
|
|
3
3
|
import { defineComponent, inject, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, createVNode, mergeProps, toHandlers, createSlots, renderSlot, createTextVNode, toDisplayString, renderList, resolveDynamicComponent } from 'vue';
|
|
4
4
|
import { createButtonBindProps, createButtonOnEmits } from '@vunk/form/shared/element-plus';
|
|
5
|
+
import { validateCatch } from '@vunk/form/shared/form';
|
|
5
6
|
|
|
6
7
|
var __defProp = Object.defineProperty;
|
|
7
8
|
var __defProps = Object.defineProperties;
|
|
@@ -66,18 +67,7 @@ const _sfc_main = defineComponent({
|
|
|
66
67
|
if (flag) {
|
|
67
68
|
emit("click", e);
|
|
68
69
|
}
|
|
69
|
-
}).catch(
|
|
70
|
-
let msg = "";
|
|
71
|
-
for (const key in err) {
|
|
72
|
-
err[key].forEach((v) => {
|
|
73
|
-
msg += v.message + ";";
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
ElMessage({
|
|
77
|
-
type: "warning",
|
|
78
|
-
message: msg
|
|
79
|
-
});
|
|
80
|
-
});
|
|
70
|
+
}).catch(validateCatch);
|
|
81
71
|
};
|
|
82
72
|
return {
|
|
83
73
|
formBindProps,
|
|
@@ -334,7 +334,7 @@ export declare const props: {
|
|
|
334
334
|
default: boolean;
|
|
335
335
|
};
|
|
336
336
|
/**
|
|
337
|
-
*
|
|
337
|
+
* layout 为 true 时,
|
|
338
338
|
* 该值生效
|
|
339
339
|
* el-row 添加额外属性
|
|
340
340
|
*/
|
|
@@ -343,7 +343,7 @@ export declare const props: {
|
|
|
343
343
|
default: () => {};
|
|
344
344
|
};
|
|
345
345
|
/**
|
|
346
|
-
*
|
|
346
|
+
* layout 为 true 时,
|
|
347
347
|
* 该值生效
|
|
348
348
|
* el-col 添加额外属性
|
|
349
349
|
*/
|
package/package.json
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ElMessage } from 'element-plus';
|
|
2
|
+
|
|
3
|
+
const validateCatch = (err) => {
|
|
4
|
+
let msg = "";
|
|
5
|
+
for (const key in err) {
|
|
6
|
+
err[key].forEach((v) => {
|
|
7
|
+
msg += v.message + ";";
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
ElMessage({
|
|
11
|
+
type: "warning",
|
|
12
|
+
message: msg
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { validateCatch };
|