Skip to content

Instantly share code, notes, and snippets.

View wenlittleoil's full-sized avatar

West wenlittleoil

  • GuangZhou China.
View GitHub Profile
@afc163
afc163 / cascader-address-options.js
Last active August 24, 2024 15:24
Address options for antd cascader
import provinces from 'china-division/dist/provinces.json';
import cities from 'china-division/dist/cities.json';
import areas from 'china-division/dist/areas.json';
areas.forEach((area) => {
const matchCity = cities.filter(city => city.code === area.cityCode)[0];
if (matchCity) {
matchCity.children = matchCity.children || [];
matchCity.children.push({
label: area.name,