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

@beisen-phoenix/select

v3.3.55

Published

## 概述

Downloads

677

Readme

#Select

概述

select 下拉选择框

API

| 参数 | 说明 | 类型 | 默认值 | 必须 | | ------------- | ----------------------------------------------------------------------- | --------------------- | -------- | ---- | | size | 选择框的大小,选项(small, normal, large) | String | normal | No | | isSearch | 是否开启搜索功能(是否可输入) | Boolean | false | No | | value | 当前选择框中显示的选项 | String 或 Array | 无 | No | | showDelete | 单选模式下是否显示清空图标 | Boolean | true | No | | isMultiSelect | 是否为多选选择器 | Boolean | false | No | | readOnly | 是否只读 | Boolean | false | No | | isActive | 是否处于边框高亮状态 | Boolean | false | No | | placeHolder | 选择框的占位符 | String | ‘请输入’ | No | | disabled | 是否禁用选择器 | boolean | false | No | | error | 校验错误 | boolean | false | No | | onChange | 选择框的值发生变化后的回调,返回值 (value, searchWord) | Function | 无 | No | | onDelete | 删除选项后的回调,返回值 (value) | Function | 无 | No | | onSearch | 可搜索情况下,输入框的值变化后的回调,返回值 (searchWord) | Function | 无 | No | | extraCls | 自定义组件容器 class,一般用于覆盖组件默认样式使用 (2019-09-11 新增 api) | string | 无 | 否 | | onClick | 点击选择器回调 | Function ,返回值(e) | 无 | No | | suffix | 后缀元素,用于替换下拉箭头 | React.ReactNode | - | 否 | | lang | 当前语言环境(zh_CN,en_US,zh_TW) | string | zh_CN | 否 |

item

传人的数据是数组,每一项的结构如下:

| 参数 | 说明 | 类型 | 默认值 | 必须 | | -------- | -------------- | ------- | ------ | ---- | | label | 实际显示的文案 | String | 无 | Yes | | value | 选项的实际值 | String | 无 | Yes | | disabled | 禁止该选项 | boolean | false | No |

多语言

| 参数 | 说明 | 类型 | 默认值 | 必须 | | ----------- | --------------------------- | --------------------- | ----------------------- | ---- | | translation | 语言包 用于翻译组件内置常量 | {placeHolder: string} | {placeHolder: '请选择'} | NO |

2019-08-27

  1. 修改交互,单选可输入选择器,激活输入框时,当前选中项变为提示文字 http://nature.beisen.co/NaturedesignSpec/Naturedesign3.0/NaturedesignSpec-PC/preview/%5bPC%5dNaturedesign3.0.5/4DataEntry-05-Selector/
  2. 修改交互,单选可输入选择器,激活输入框时,点击清空,输入框保持激活
  3. 添加 showDelete,是否显示清空图标

2019-11-19

新增 lang 属性,用于表示当前的语言环境,取值范围为“zh_CN,zh_TW,en_US”内部新增中文简体、英文、中文繁体语言包。

2019-09-26

需要外部控制激活态【边框高亮】,除点击可输入框激活时会高亮外,内部不处理可输入及不可输入激活失焦问题 | isActive | 是否处于边框高亮状态 | Boolean | false | No |

2019-09-17

新增 | suffix | 后缀元素,用于替换下拉箭头 | React.ReactNode | - | 否 |