@iimm/formily-taro-vantui
Version:
form field components based on @antmjs/vantui and @formily/react
31 lines (30 loc) • 1.14 kB
TypeScript
/// <reference types="react" />
import { type PickerProps, type PopupProps } from "@antmjs/vantui";
import type { CommonFieldProps } from "../../types";
interface PickerOption extends Record<string, any> {
value?: any;
label?: string;
disabled?: boolean;
}
interface Value extends PickerOption {
index: number;
}
export interface PickerBaseProps extends Omit<PickerProps, "value" | "onChange" | "columns" | "onClose" | "title" | "valueKey">, CommonFieldProps<Value, any[]> {
show?: boolean;
/**弹窗开关触发 */
onShowChange?: (visible?: boolean) => void;
defaultShow?: boolean;
/**没有选择值时的字符显示
* @default '-请选择-''
*/
placeholder?: string;
pickerTitle?: string;
/**传递给Popup组件的Props */
popupProps?: Omit<PopupProps, "show" | "onClose">;
/**选项为对象时,显示文本的字段名
* @default 'label'
*/
valueKey?: string;
}
export declare const PickerBase: import("react").ForwardRefExoticComponent<Omit<PickerBaseProps, "ref"> & import("react").RefAttributes<unknown>>;
export {};