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

region-select

v0.4.12

Published

地区级联选择框

Downloads

66

Readme

region-select

引入

yarn add region-select
npm i region-select

依赖项:
element-ui

版本迭代

RegionSelect 0.4.3 版本
取消外部数据源,由于组件维护全国地区树JSON (如有个性化数据源,可通过data重置数据源)
如需部分地区地区树,可用filter筛选

测试版本
为0.1.0版本号开头

引入

yarn add region-select
npm i region-select

简介

region-select 是基于 Element Cascader 开发的全国地区级联选择组件,组件内置全国通用地区数据,支持指定地区、层级过滤(如只需要贵州省所属州市选择)。

使用

地区级联选择组件,根据所选最后一级id数据级联选中

<RegionSelect 
    v-model="areaCode"          选中地区 code
/>

全局配置

如需在项目中对组件进行一些公共配置,可在 main.js 注册组件时,注入 config 属性对象

* 在页面中对 config 中属性进入重复设置,会覆盖全局设置 * 

import RegionSelect from 'region-select'

Vue.use(RegionSelect,{
    filter:'520000000000',     地区过滤,是否只需要其子类地区
    level = '2'                地区树显示层级(如有地区过滤,则为过滤后地区树的层级)   
    placeholder = '所属地区'   占位文本
    props = option.props       属性绑定
    data = areaTree            全局自定义地区树
})

地区选择级联属性

element 级联原生属性

Props

事件

自定义数据源格式

[
    {
        label: "呼和浩特市",
        value: '001',
        children: [
            {
                label: "市辖区",
                value: '0011'
            },
            {
                label: "东河区",
                value: '0012'
            },
            {
                label: "昆都仑区",
                value: '0013'
            },
        ]
    }
]