@teamias/rex-pro 0.0.15 → 0.0.16
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.
|
@@ -6,7 +6,7 @@ import { ReactNode, Ref } from 'react';
|
|
|
6
6
|
* FilterForm 组件 - 支持多语言的筛选表单
|
|
7
7
|
* @param T 表单数据类型
|
|
8
8
|
*/
|
|
9
|
-
export declare const FilterForm: <T extends object>({ itemWidth, displayType, form: outForm, formRef: outFormRef, requestFields, requestFieldsUrl, requestFieldsParams, fieldPropsFn, requestOptions, initialValues: outInitialValues, fieldsConfig, actionRef, onInit: outInit, firstTriggerInitEvent, children, ...otherProps }: IFilterFormProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const FilterForm: <T extends object>({ itemWidth, displayType, form: outForm, formRef: outFormRef, requestFields, requestFieldsUrl, requestFieldsParams, fieldPropsFn, requestOptions, initialValues: outInitialValues, fieldsConfig, actionRef, onInit: outInit, firstTriggerInitEvent, children, buttonExtend, ...otherProps }: IFilterFormProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export interface IFilterFormProps<T extends object = object> extends Omit<TRawProFormProps<T>, 'form' | 'layout' | 'initialValues' | 'children'>, Omit<IBaseFormProps, 'fields' | 'fieldProps'> {
|
|
11
11
|
/** 配置数据, 优先级高于url的 */
|
|
12
12
|
requestFields?: () => Promise<TFields>;
|
|
@@ -42,6 +42,8 @@ export interface IFilterFormProps<T extends object = object> extends Omit<TRawPr
|
|
|
42
42
|
displayType: IFilterFormProps['displayType'];
|
|
43
43
|
handlerSelectStyle: (fields: TFields) => TFields;
|
|
44
44
|
}) => ReactNode;
|
|
45
|
+
/** 自定义按钮扩展 */
|
|
46
|
+
buttonExtend?: (form: TForm<T>) => ReactNode;
|
|
45
47
|
}
|
|
46
48
|
type TFieldItem = Exclude<IBaseFormProps['fields'], undefined>[number] & {
|
|
47
49
|
/** 是否作为 可控显隐 的表单项 */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["itemWidth", "displayType", "form", "formRef", "requestFields", "requestFieldsUrl", "requestFieldsParams", "fieldPropsFn", "requestOptions", "initialValues", "fieldsConfig", "actionRef", "onInit", "firstTriggerInitEvent", "children"];
|
|
2
|
+
var _excluded = ["itemWidth", "displayType", "form", "formRef", "requestFields", "requestFieldsUrl", "requestFieldsParams", "fieldPropsFn", "requestOptions", "initialValues", "fieldsConfig", "actionRef", "onInit", "firstTriggerInitEvent", "children", "buttonExtend"];
|
|
3
3
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
4
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
5
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
@@ -50,6 +50,7 @@ export var FilterForm = function FilterForm(_ref) {
|
|
|
50
50
|
outInit = _ref.onInit,
|
|
51
51
|
firstTriggerInitEvent = _ref.firstTriggerInitEvent,
|
|
52
52
|
children = _ref.children,
|
|
53
|
+
buttonExtend = _ref.buttonExtend,
|
|
53
54
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
54
55
|
var _useRexProConfigProvi = useRexProConfigProvider(),
|
|
55
56
|
formatMessage = _useRexProConfigProvi.intl.formatMessage;
|
|
@@ -339,7 +340,7 @@ export var FilterForm = function FilterForm(_ref) {
|
|
|
339
340
|
defaultMessage: '自定义筛选条件'
|
|
340
341
|
})
|
|
341
342
|
})
|
|
342
|
-
})]
|
|
343
|
+
}), buttonExtend === null || buttonExtend === void 0 ? void 0 : buttonExtend(form)]
|
|
343
344
|
});
|
|
344
345
|
}
|
|
345
346
|
},
|