ztxkutils 2.0.9 → 2.1.0
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.
@@ -19,6 +19,6 @@ interface IColumns {
|
|
19
19
|
* @description 表格验证相关操作
|
20
20
|
*/
|
21
21
|
declare function useTableValidate(records: any, columns: IColumns[], tableName?: string): {
|
22
|
-
tableValidate: () => Promise<
|
22
|
+
tableValidate: () => Promise<void>;
|
23
23
|
};
|
24
24
|
export default useTableValidate;
|
package/dist/hooks.js
CHANGED
@@ -113,7 +113,9 @@ function useTableValidate(records, columns, tableName) {
|
|
113
113
|
if (!validate) return [3 /*break*/, 7];
|
114
114
|
if (!(typeof validate === 'function')) return [3 /*break*/, 4];
|
115
115
|
return [4 /*yield*/, validate(value, item, i + 1, title)];
|
116
|
-
case 3:
|
116
|
+
case 3:
|
117
|
+
_c.sent();
|
118
|
+
return [3 /*break*/, 6];
|
117
119
|
case 4:
|
118
120
|
if (!!((_b = validate.pattern) === null || _b === void 0 ? void 0 : _b.test(value))) return [3 /*break*/, 6];
|
119
121
|
return [4 /*yield*/, Promise.reject({
|