ztxkutils 2.3.4 → 2.3.5
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/constants.d.ts +2 -0
- package/dist/constants.js +5 -2
- package/dist/hooks/useTableValidate.d.ts +2 -2
- package/dist/hooks.js +3 -3
- package/package.json +1 -1
package/dist/constants.d.ts
CHANGED
package/dist/constants.js
CHANGED
@@ -5,6 +5,9 @@
|
|
5
5
|
// web端客户端类型
|
6
6
|
var clientType = 1;
|
7
7
|
// 微前端入口路由
|
8
|
-
var microPortalRoute = '/portal';
|
8
|
+
var microPortalRoute = '/portal';
|
9
|
+
// 流程中心相关常量
|
10
|
+
var WORKFLOW_HIDEFRAME_KEY = 'hideFrame';
|
11
|
+
var WORKFLOW_TOKEN = 'token';
|
9
12
|
|
10
|
-
export { clientType, microPortalRoute };
|
13
|
+
export { WORKFLOW_HIDEFRAME_KEY, WORKFLOW_TOKEN, clientType, microPortalRoute };
|
@@ -4,7 +4,7 @@
|
|
4
4
|
* index 当前第几行
|
5
5
|
* title 当前列标题
|
6
6
|
*/
|
7
|
-
declare type validateFn = (value: any, record: any, index: number, title: string) => any;
|
7
|
+
declare type validateFn = (value: any, record: any, index: number, title: string, expandProps?: any) => any;
|
8
8
|
interface IColumns {
|
9
9
|
dataIndex: string;
|
10
10
|
title: string;
|
@@ -18,7 +18,7 @@ interface IColumns {
|
|
18
18
|
/**
|
19
19
|
* @description 表格验证相关操作
|
20
20
|
*/
|
21
|
-
declare function useTableValidate(records: any, columns: IColumns[], tableName?: string): {
|
21
|
+
declare function useTableValidate(records: any, columns: IColumns[], tableName?: string, expandProps?: any): {
|
22
22
|
tableValidate: () => Promise<void>;
|
23
23
|
};
|
24
24
|
export default useTableValidate;
|
package/dist/hooks.js
CHANGED
@@ -79,7 +79,7 @@ function useFetchState(props) {
|
|
79
79
|
/**
|
80
80
|
* @description 表格验证相关操作
|
81
81
|
*/
|
82
|
-
function useTableValidate(records, columns, tableName) {
|
82
|
+
function useTableValidate(records, columns, tableName, expandProps) {
|
83
83
|
var _this = this;
|
84
84
|
var tableValidate = useCallback(function () { return __awaiter(_this, void 0, void 0, function () {
|
85
85
|
var requiredFileds, i, item, j, _a, key, title, validate, value;
|
@@ -118,7 +118,7 @@ function useTableValidate(records, columns, tableName) {
|
|
118
118
|
value = item[key];
|
119
119
|
if (!validate) return [3 /*break*/, 7];
|
120
120
|
if (!(typeof validate === 'function')) return [3 /*break*/, 4];
|
121
|
-
return [4 /*yield*/, validate(value, item, i + 1, title)];
|
121
|
+
return [4 /*yield*/, validate(value, item, i + 1, title, expandProps)];
|
122
122
|
case 3:
|
123
123
|
_c.sent();
|
124
124
|
return [3 /*break*/, 6];
|
@@ -154,7 +154,7 @@ function useTableValidate(records, columns, tableName) {
|
|
154
154
|
case 11: return [2 /*return*/];
|
155
155
|
}
|
156
156
|
});
|
157
|
-
}); }, [records, columns]);
|
157
|
+
}); }, [records, columns, expandProps]);
|
158
158
|
return {
|
159
159
|
tableValidate: tableValidate,
|
160
160
|
};
|