y-taro-ui
Version:
基于taro的表单解决方案 & 基础组件
38 lines (37 loc) • 1.37 kB
TypeScript
import React from 'react';
import { PickerMultiSelectorProps } from '@tarojs/components/types/Picker';
import { CommonEventFunction } from '@tarojs/components/types/common';
import { IconTypes } from '../Icon';
import { Layout } from '../Form/interface';
import './index.less';
export declare type Mode = 'selector' | 'multiSelector' | 'time' | 'date' | 'region';
export interface PickerProps {
icon?: IconTypes | 'none';
value?: any;
label?: string;
placeholder?: string;
disabled?: boolean;
mode?: Mode | 'city';
onChange?: (value: any, fieldId?: string) => void;
onColumnChange?: CommonEventFunction<PickerMultiSelectorProps.ColumnChangeEventDetail>;
rangeKey?: string;
vlidate?(value: any): boolean;
fieldId?: string;
start?: string;
end?: string;
fields?: 'year' | 'month' | 'day';
layout?: Layout;
range?: {
[key: string]: string | number;
}[];
onCancel?: boolean;
addonAfter?: React.ReactNode;
addonBefore?: React.ReactNode;
addonPlaceholderBefore?: React.ReactNode;
addonPlaceholderAfter?: React.ReactNode;
formatValue?: (value: any) => React.ReactNode;
textAlign?: 'right' | 'left';
valueKey?: string;
}
export declare const Picker: React.MemoExoticComponent<(props: PickerProps) => JSX.Element>;
export default Picker;