import { useMemo } from 'react'; import { Select } from 'antd'; import { getDistrictOptionsByCityCode } from '../lib/china-region'; type Props = { cityCode?: string | null; value?: string[]; onChange?: (value: string[]) => void; placeholder?: string; disabled?: boolean; }; /** 已选开城城市后,仅多选该市下区县(不再选省/市) */ export default function CityDistrictMultiSelect({ cityCode, value, onChange, placeholder, disabled, }: Props) { const options = useMemo(() => getDistrictOptionsByCityCode(cityCode), [cityCode]); const ready = Boolean(cityCode) && options.length > 0; return (