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<any>;
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: return [2 /*return*/, _c.sent()];
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({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkutils",
3
- "version": "2.0.9",
3
+ "version": "2.1.0",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",