@teamias/rex-pro 0.0.5 → 0.0.7
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.
|
@@ -50,6 +50,8 @@ type TForm<T> = ReturnType<typeof ProForm.useForm<T>>[0];
|
|
|
50
50
|
export interface IFilterFormActionRef {
|
|
51
51
|
/** 获取过滤条件 */
|
|
52
52
|
getValues: () => Record<string, unknown>;
|
|
53
|
+
/** 获取过滤条件, 所有数据,即使不被 form 管理 */
|
|
54
|
+
getAllValues: () => Record<string, unknown>;
|
|
53
55
|
/** 设置表单数据 */
|
|
54
56
|
setValues: (data: Record<string, unknown>) => void;
|
|
55
57
|
/** 设置默认值 */
|
|
@@ -21,9 +21,9 @@ import { cloneDeep } from 'lodash';
|
|
|
21
21
|
import { useEffect, useImperativeHandle, useRef } from 'react';
|
|
22
22
|
import { FilterFormAutoWidthStyle, FilterFormStyle } from "./style";
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
* FilterForm 组件 - 支持多语言的筛选表单
|
|
26
|
-
* @param T 表单数据类型
|
|
24
|
+
/**
|
|
25
|
+
* FilterForm 组件 - 支持多语言的筛选表单
|
|
26
|
+
* @param T 表单数据类型
|
|
27
27
|
*/
|
|
28
28
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
29
29
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -141,21 +141,25 @@ export var FilterForm = function FilterForm(_ref) {
|
|
|
141
141
|
}, [fields]);
|
|
142
142
|
useImperativeHandle(actionRef, function () {
|
|
143
143
|
return {
|
|
144
|
-
|
|
144
|
+
getAllValues: function getAllValues() {
|
|
145
145
|
var _formRef$current, _formRef$current$getF;
|
|
146
|
-
return (_formRef$current = formRef.current) === null || _formRef$current === void 0 || (_formRef$current$getF = _formRef$current.getFieldsFormatValue) === null || _formRef$current$getF === void 0 ? void 0 : _formRef$current$getF.call(_formRef$current);
|
|
146
|
+
return (_formRef$current = formRef.current) === null || _formRef$current === void 0 || (_formRef$current$getF = _formRef$current.getFieldsFormatValue) === null || _formRef$current$getF === void 0 ? void 0 : _formRef$current$getF.call(_formRef$current, true);
|
|
147
|
+
},
|
|
148
|
+
getValues: function getValues() {
|
|
149
|
+
var _formRef$current2, _formRef$current2$get;
|
|
150
|
+
return (_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 || (_formRef$current2$get = _formRef$current2.getFieldsFormatValue) === null || _formRef$current2$get === void 0 ? void 0 : _formRef$current2$get.call(_formRef$current2);
|
|
147
151
|
},
|
|
148
152
|
setValues: function setValues(data) {
|
|
149
|
-
var _formRef$
|
|
150
|
-
(_formRef$
|
|
153
|
+
var _formRef$current3, _formRef$current3$set;
|
|
154
|
+
(_formRef$current3 = formRef.current) === null || _formRef$current3 === void 0 || (_formRef$current3$set = _formRef$current3.setFieldsValue) === null || _formRef$current3$set === void 0 || _formRef$current3$set.call(_formRef$current3, data);
|
|
151
155
|
},
|
|
152
156
|
setInitValues: function setInitValues(data) {
|
|
153
157
|
state.initialValues = cloneDeep(data);
|
|
154
158
|
update();
|
|
155
159
|
},
|
|
156
160
|
resetValues: function resetValues() {
|
|
157
|
-
var _formRef$
|
|
158
|
-
(_formRef$
|
|
161
|
+
var _formRef$current4, _formRef$current4$res;
|
|
162
|
+
(_formRef$current4 = formRef.current) === null || _formRef$current4 === void 0 || (_formRef$current4$res = _formRef$current4.resetFields) === null || _formRef$current4$res === void 0 || _formRef$current4$res.call(_formRef$current4);
|
|
159
163
|
},
|
|
160
164
|
setLoading: function setLoading(val) {
|
|
161
165
|
state.fetchLoading = val;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamias/rex-pro",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "A react library developed with dumi",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@ant-design/icons": "^6.0.0",
|
|
52
52
|
"@ant-design/pro-components": "^2.8.10",
|
|
53
|
-
"@teamias/rex-design": "^0.0.
|
|
53
|
+
"@teamias/rex-design": "^0.0.10",
|
|
54
54
|
"ahooks": "^3.9.0",
|
|
55
55
|
"antd": "^5.26.7",
|
|
56
56
|
"classnames": "^2.5.1",
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"@commitlint/cli": "^17.1.2",
|
|
66
66
|
"@commitlint/config-conventional": "^17.1.0",
|
|
67
67
|
"@teamias/umi-loader-source-plugin": "^0.0.6",
|
|
68
|
+
"@teamias/umi-plugin-upload-build": "^0.0.2",
|
|
68
69
|
"@types/lodash": "^4.17.20",
|
|
69
70
|
"@types/react": "^18.0.0",
|
|
70
71
|
"@types/react-dom": "^18.0.0",
|
|
@@ -79,8 +80,7 @@
|
|
|
79
80
|
"prettier-plugin-packagejson": "^2.2.18",
|
|
80
81
|
"react": "^18.0.0",
|
|
81
82
|
"react-dom": "^18.0.0",
|
|
82
|
-
"stylelint": "^14.9.1"
|
|
83
|
-
"umi-plugin-upload-build": "^1.1.0"
|
|
83
|
+
"stylelint": "^14.9.1"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"@ant-design/icons": ">=5.0.0",
|