Coder Social home page Coder Social logo

sunmoone / antdcascaderdatemethod Goto Github PK

View Code? Open in Web Editor NEW

This project forked from heerey525/antdcascaderdatemethod

0.0 0.0 0.0 90 KB

作为获取https://github.com/heerey525/antdCascaderDate 此数据的方法,授人以鱼不如授人以渔

JavaScript 19.80% HTML 80.20%

antdcascaderdatemethod's Introduction

antdCascaderDateMethod

作为获取https://github.com/heerey525/antdCascaderDate 此数据的方法,授人以鱼不如授人以渔

代码中例子是爬取 2020年10月中华人民共和国县以上行政区划代码 http://www.mca.gov.cn/article/sj/xzqh/2020/2020/2020112010001.html 生成json文件

将生成的json文件根据省市区的特征用js遍历成为[{children: [children:[children]]}]的格式,并此数据最终导出到cities.js

操作步骤

1、下载

git clone https://github.com/heerey525/antdCascaderDateMethod.git

2、获取最新区域代码->生成gov.json

// 进入getDate文件夹 将http://www.mca.gov.cn/article/sj/xzqh/2020/2020/2020112010001.html 替换成最新的代码地址
cd getDate
node crawler.js // 运行生成gov.json

3、生成cities.js、province.json、city.json

// 进入setDate文件夹,双击index.html 生成cities.js(省市区三级联动)、province.json(二级联动省级数据)、city.json(二级联动市级数据)文件

antdcascaderdatemethod's People

Contributors

dependabot[bot] avatar heerey525 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.