@iimm/formily-mui
Version:
form field components based on @mui/material and @formily/react
37 lines (36 loc) • 2.03 kB
TypeScript
import { type CSSProperties, type ReactNode } from "react";
import { type AutocompleteProps, type FormLabelProps } from "@mui/material";
import { type FormItemBaseProps, type FormItemExtraProps } from "../../layout";
import type { FieldBaseProps, IFieldOptionItem, IFieldPropOptions, RefreshOptionsProps } from "../../types";
import "../../styles/refresh.scss";
export declare const SelectBase: (props: SelectBaseProps) => import("react/jsx-runtime").JSX.Element;
export interface SelectBaseProps<V extends IFieldOptionItem = IFieldOptionItem> extends FieldBaseProps<V | V[] | null | undefined>, Partial<Omit<AutocompleteProps<unknown, boolean | undefined, boolean | undefined, boolean | undefined>, "value" | "onChange" | "defaultValue" | "options">>, Omit<FormItemBaseProps, "className" | "style" | "prefixCls">, RefreshOptionsProps, FormItemExtraProps {
options?: IFieldPropOptions;
/**当只有一个可选项时自动选择?仅单选模式时生效 */
autoSelectSingleOption?: boolean;
label?: string;
/** 显示内部label? */
/** 仅showInnerLabel=true时传递给内部Label */
innerLabelProps?: FormLabelProps;
showInnerLabel?: boolean;
placeholder?: string;
required?: boolean;
tooltip?: ReactNode;
variant?: "outlined" | "filled" | "standard";
/** 允许不再options里的值? */
allowExtraValue?: boolean;
/** 不从Field获取信息 */
noField?: boolean;
/** 不从FormLayout获取fullWidth信息 */
noFormLayout?: boolean;
/** 外层包裹FormItemBase? */
withFormItem?: boolean;
/** 当 withFormItem=true时传递给FormItemBase的className*/
formItemCls?: string;
/** 当 withFormItem=true时传递给FormItemBase的style*/
formItemStyle?: CSSProperties;
/** 当 withFormItem=true时,传递给formItem的内部className的前缀,可以在引入自定义样式时使用
* @default iimm 可以通过样式覆盖来修改FormItem内部样式(不需要传递此值)
*/
formItemPrefixCls?: string;
}