@teamias/rex-pro 0.0.5 → 0.0.6

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
- getValues: function getValues() {
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$current2, _formRef$current2$set;
150
- (_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 || (_formRef$current2$set = _formRef$current2.setFieldsValue) === null || _formRef$current2$set === void 0 || _formRef$current2$set.call(_formRef$current2, data);
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$current3, _formRef$current3$res;
158
- (_formRef$current3 = formRef.current) === null || _formRef$current3 === void 0 || (_formRef$current3$res = _formRef$current3.resetFields) === null || _formRef$current3$res === void 0 || _formRef$current3$res.call(_formRef$current3);
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.5",
3
+ "version": "0.0.6",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",