npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

element-china-category-data

v1.0.4

Published

Element UI 级联 国民经济行业划分数据

Downloads

8

Readme

Element UI 国民经济行业分类

npm npm

在日常开发过程中,有区域级联下拉选择的需求,发现了 element-china-area-data 项目。之后又有《国民经济行业分类》数据选择的需求, 所以参考element-china-area-data实现了基于element-ui的国民经济行业分类级联选择器组件。

安装

npm install element-china-category-data -S

在线示例

地址在此,网页打开会比较慢

使用

import { categoryData,  CodeToText, TextToCode } from 'element-china-category-data'
  1. categoryData是国民经济行业分类数据集
  2. CodeToText是个大对象,属性是分类码,属性值是汉字 用法例如:CodeToText['0111']输出稻谷种植
  3. TextToCode是个大对象,属性是汉字,属性值是区域码 用法例如:TextToCode['稻谷种植'].code输出0111
  4. CodeToTextTextToCode的用法可参考 element-china-area-data 文档,使用方法是一致的
  • 省市区三级联动(不带“全部”选项)

    <template>
      <div id="app">
        <el-cascader
          size="large"
          :options="options"
          v-model="selectedOptions"
          @change="handleChange">
        </el-cascader>
      </div>
    </template>
    
    <script>
      import { categoryData } from 'element-china-category-data'
      export default {
        data () {
          return {
            options: categoryData,
            selectedOptions: []
          }
        },
    
        methods: {
          handleChange (value) {
            console.log(value)
          }
        }
      }
    </script>

数据来源

国家统计局《国民经济行业分类》2019修正版

开发过程

npm run dev 是开发

npm run build + npm run build-commonjs + npm run docs 是准备发布