import { CascaderOption } from './types'; declare type SourceKeys = 'code' | 'name' | 'children'; declare type Options = Record; declare class DivisionUtil { private divisions; private cache; private sourceOptions; private outputOptions; constructor(list?: S[], options?: { source?: Partial; output?: Partial; }); /** * 获取数据源 */ getSourceData: () => S[]; /** * 获取省级别的数据 */ getProvinces: () => O[]; _getCodes: (code: string) => string[]; _getProvinceData: (code: string) => S; _formatDivision: (item: any) => { [x: string]: any; }; /** * 获取指定省市区编码的下一级数据。若不指定,则获取省一级数据 * @param code 省市区编码 */ getChildrenByCode: (code?: string) => O[]; /** * 通过省市区编码获取省市区名称 * @param code */ getNameByCode: (code: string) => string; /** * 根据Code获取节点信息 * @param code */ getDivisionByCode: (code: string) => O | null; } export default DivisionUtil;