UNPKG

@aliretail/react-materials-components

Version:
77 lines (76 loc) 1.79 kB
import { Component } from 'react'; import { TCodeList, IGetAreaByCodeListResultItem } from './model'; declare type TProps = typeof AreaSelect.defaultProps & { handleChange: { (list: TCodeList): void; }; appCode: string; areaApi: string; areaApiUrl: string; initValues: IGetAreaByCodeListResultItem[]; }; declare class AreaSelect extends Component<TProps, { areaList: Array<{ label: string; value: string; isLeaf?: boolean; tips?: string; }>; }> { static propTypes: { handleChange: any; }; static defaultProps: { handleChange: () => void; appCode: string; areaApi: string; initValues: any[]; }; state: { areaList: any[]; }; constructor(props: any); /** * 异步加载地域组件的选项 * @param data 选中的值,如果没有的话视为初次渲染 */ onLoadData: (data?: { value: string; _source: any; }) => Promise<void>; handleCityData: (data: any, extra: any) => { id: any; city: { value: any; }; area: { value: string; }; street: { value: string; }; province: {}; }; handleAreaData: (data: any, extra: any) => { id: any; area: { value: any; }; street: { value: string; }; city: {}; province: {}; }; handleStreetData: (data: any, extra: any) => { id: any; area: {}; street: {}; city: {}; province: {}; }; handleData: (data: any, extra: any) => any[]; handleChange: (value: any) => void; render(): JSX.Element; } export default AreaSelect;