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-selector

v5.1.1

Published

region-selector of custom

Downloads

6

Readme

region-selector (全屏遮罩层式)

Have full functionality to choose the region u want, but my want is yours, temporarily, lol.

🤟🌟🥴🤠🤸🤺🤾🧟‍♂️🧛🏿‍♂️🧙‍♂️👨‍🎤🌳🏅

数据来源 (正规渠道,最新数据,每次更新都获取这里的数据)

http://www.mca.gov.cn/article/sj/xzqh/2019/201901-06/201906211421.html

暂定功能

可自定义热门城市 ❌

支持城市可多选(省,区县暂不支持) ✅

提供搜索 ✅

使用方式 (当前版本5.1.1)

npm install region-selector ---save
Vue.use(regionSelector)
<regionSelector></regionSelector>

2019.8.21

功能一 (选择省/市/区)

功能二 (设置初始化数据)

2019.8.22

功能三 (搜索省/市/区)

2019.8.25

功能四 (切换选择模式: 省/市(可多选)/区)

2019.11.27

新增全国选项

自定义属性

属性名|数据格式|默认值|说明 ---|---|---|---| selected|String 或 Array(表示多选,仅在城市选择的多选模式下才能完全匹配,否则默认匹配第一个值)|''| 1、初始化的值与当前的选择模式相匹配(比如初始值为城市的code在选择模式为区的情况下无效) 2、可以为城市选择的多选模式提供一个城市code 数组,如果城市列表中不包含数组中的值会被自动过滤掉 search|Boolean|false|调用搜索框 areaGet|Boolean|true|默认选择到区域,如设置了省或市模式,则会被显示为省模式或市模式 cityGet|Boolean|false|选择到城市,如果同时设置了省,则会显示为省模式 provinceGet|Boolean|false|选择到省份 multipleCity|Boolean|false|城市多选,如果需要使用此属性,必须启用市模式(设置cityGet = true),且provinceGet不能为true fullrange|Boolean|false|无区域限制选择,在设置的选择范围内选择更上一级的值,例如设置的选择为cityGet,可选择省或市的值,设置的是areaGet,则可选择省或市或区,注意:multpleCity属性 必须为false

自定义方法

方法名|返回值|说明 ---|---|---| cRegion|{    province: {code: '000000', 'name': '省'}   city: {code: '000000', 'name': '市'}   area: {code: '000000', 'name': '区'} }|返回完整的省份数据,城市数据和区域数据, 在城市的多选模式下,city属性返回的是city数组