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

@beisen-platform/ux-standard-search

v1.0.25

Published

# 1 介绍

Readme

SearchForm

1 介绍

该组件用于筛选,内置了元数据解析功能

2 API

2.1 props 列表

注意!元数据是以解构方式传递的

| name | type | default | description | | --------------------------- | -------- | ------- | :------------------------------------------------------ | | biz_data | object | none | 搜索结果的默认值,只在初始化时生效 | | isInPopUp | boolean | false | 是否被放在弹层中,筛选弹层的 z-index 会自动增加 | | containerZIndex | number | none | 外部容器的层级,若有值,筛选弹层的 z-index 会以此为基础 | | extendedFieldMapByFieldName | Function | none | 根据字段名扩展组件 | | onSearch | Function | none | 搜索结果改变后的回调 |

2.2 元数据

const metadata = {
  cmp_id: 'feabf9d6-ca5c-4201-8e6e-f1cc1bad88db',
  cmp_name: 'BeisenCloudDemo_sousousou',
  cmp_type: 'SearchForm',
  version: '20181219142750122',
  form_parts: null,
  common_fields: null,
  cmp_data: {},
  sub_cmps: []
};

return <SearchForm {...metadata} />;

2.3 onSearch

const handleSearch = (searchData, isSearch, customview_biz_data) => {
  // searchData是搜索结果
  // isSearch这里写死为true
  // customview_biz_data是回传了this.props.customview_biz_data
  // ......
};

return <SearchForm onSearch={handleSearch} />;

2.4 extendedFieldMapByFieldName

const extendedFieldMapByFieldName = {
  // field_name: 字段元数据中cmp_data.field_name
  [field_name]: (props, OriginFieldComponent) => {
    // OriginFieldComponent是当前字段对应的默认组件
    // 可以根据自己的需求,自定义数据和组件
    return <MyCustomComponent {...myCustomProps} >;
  }
};

return <SearchForm extendedFieldMapByFieldName={extendedFieldMapByFieldName} />;