import React from 'react'; import type { FormFieldProps } from '@sheinx/base'; export interface ExtendsFieldProps extends Omit, 'value' | 'defaultValue' | 'children' | 'onChange' | 'name' | 'getProps' | 'getValidateProps'> { /** * @en The key access data in the Form * @cn Form 内存取数据的 key */ name?: Name; defaultValue?: T; /** * @en The callback before the value is changed, when the return value is not empty, it will be used as the new value of the component * @cn 值改变前的回调,当返回值不为空时将作为组件的新值 */ beforeChange?: (value: T) => T | undefined | void; /** * @private for rule */ title?: string; } export interface FieldItemCommonProps { defaultValue?: any; onChange?: (...args: any) => void; beforeChange?: (value: any) => any; } export type GetWithFieldProps = Omit & ExtendsFieldProps; declare const useFieldCommon: (props: GetWithFieldProps, Origin: React.ComponentType, type?: 'number' | 'string' | 'array') => import("react/jsx-runtime").JSX.Element; export default useFieldCommon;