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 🙏

© 2025 – Pkg Stats / Ryan Hefner

databrain-region-markets

v0.0.52

Published

<!-- * @Author: zenghao * @Date: 2022-03-09 17:53:12 * @LastEditors: zenghao * @LastEditTime: 2022-04-26 15:14:35 * @Description: 请填写简介 --> # component--pc-region-markets

Downloads

6

Readme

component--pc-region-markets

用法

import { RegionSelect } from 'dbc-region-markets'
const [regionsObj, setRegionsObj] = useState(null) // 存储选中的region或market的数据,选完直接点Confirm用
const [regionMarketSelectArr, setRegionMarketSelectArr] = useState([]) // 选中的region或market数据
const regionType = 'region' // 筛选的类型,region或market
const regionCountry = [
    {
        country:[
            {country_name_abbre:'AO',country_name_cn:'安哥拉',country_name_en:'Angola'},
            {country_name_abbre:'BJ',country_name_cn:'贝宁',country_name_en:'Benin'}
        ],
        region_abbre: 'af',
        region_key:'AF',
        region_name_cn: '非洲',
        region_name_en: 'Africa'
    },
    {
        country:[
            {country_name_abbre:'HK',country_name_cn:'中国香港',country_name_en:'中国香港'},
            {country_name_abbre:'MO',country_name_cn:'中国澳门',country_name_en:'Macau'},
            {country_name_abbre:'TW',country_name_cn:'中国台湾',country_name_en:'Taiwan'}
        ],
        region_abbre: 'hmt',
        region_key:'HMT',
        region_name_cn: '港澳台',
        region_name_en: 'China(HK,MO,TW)'
    },
] // 筛选器展示的可选的所有的region和market

<RegionSelect
    regionType={regionType}
    regionCountry={regionCountry}
    defaultValue={regionMarketSelectArr}
    value={regionMarketSelectArr}
    onChange={tags => {
        // tags 选中的数据
        if (tags?.regions?.length > 0) {
            // 执行后续逻辑
        }
    }}
/>

版本更新

v0.0.51

  • date: 20230306
  • change:
    1. 国家筛选器文案调整

版本更新

v0.0.36

  • date: 20220802
  • change:
    1. 新增 onTabChange 功能

v0.0.35

  • date: 20220802
  • change:
    1. 修复地区国家筛选器 global 文案偏移问题

v0.0.34

  • date: 20220727
  • change:
    1. 修复国家选择不灵的问题

v0.0.33

  • date: 20220715
  • change:
    1. 调整中文文案

v0.0.32

  • date: 20220714
  • change:
    1. popular 国家支持匹配 key、英文名、中文名

v0.0.31

  • date: 20220714
  • change:
    1. 增加翻译功能

v0.0.30

  • date: 20220621
  • change:
    1. 增加 dropdownClassName

v0.0.26

  • date: 20220621
  • change:
    1. 修复下拉框未对齐问题

v0.0.24

  • date: 20220617
  • change:
    1. 增加 global 配置 nodata 文案功能

v0.0.23

  • date: 20220617
  • change:
    1. 增加配置 nodata 文案功能

v0.0.22

  • date: 20220526
  • change:
    1. 新增属性closeAutoPosition,是否关闭自动调整位置功能

v0.0.21

  • date: 20220525
  • change:
    1. 港澳台区旗换成国旗

v0.0.20

  • date: 20220524
  • change:
    1. 增加 uk 国旗 svg 资源

v0.0.19

  • date: 20220507
  • change:
    1. 更新国旗

v0.0.18

  • date: 20220506
  • change:
    1. 俄罗斯国旗更新

v0.0.17

  • date: 20220427
  • change:
    1. 修复在舆情中重置筛选失效

v0.0.16

  • date: 20220426
  • change:
    1. 过滤掉 id 为空的 region 和 market
    2. 若未匹配到国旗则显示 default.svg

v0.0.15

  • date: 20220331
  • change:
    1. 添加 unidentified 的受控逻辑
    2. 返回的 market 数据添加 unidentified
    3. 添加未分类评论的单选逻辑

v0.0.14

  • date: 20220331
  • change:
    1. 新增国旗 svg 资源
    2. 新增 importImg 方法,用于处理获取图片资源报错的场景

v0.0.12

  • date: 20220324
  • change:
    1. 调整全局清除按钮显示逻辑,当前有选择项才展示
    2. 调整 rollup 配置,打包后的代码支持低版本浏览器,并支持 es2020 可选链语法

v0.0.10

  • date: 20220323
  • change:
    1. 新增 global 提示内容自定义功能
    2. 新增 global except china mainland 隐藏 props
    3. 新增自定义级联 title 功能
    4. 新增 showUnidentified
    5. confirm 结果增加 renderList
    6. 新增中文内容显示隐藏的功能
    7. 修复搜索时内容为空,提示文本未对齐
    8. 修复当外层传入的默认列表为动态时,无法正常显示的问题
    9. 修复提示 icon 未对齐的问题