# @beisen-platform/search

> 可输入文本进行搜索内容。

Latest version **1.0.17-rc.2** (published 2019-06-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install @beisen-platform/search
pnpm add @beisen-platform/search
yarn add @beisen-platform/search
bun add @beisen-platform/search
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.17-rc.2 |
| Published | 2019-06-03 |
| First published | 2018-11-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 891.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | beisen |
| Maintainers | beisencorp |
| Keywords | beisen, react-component, es6 |

## Links

- npm: https://www.npmjs.com/package/@beisen-platform/search
- Repository: git@gitlab.beisencorp.com:ux-cnpm/ux-search
- npm.io page: https://npm.io/package/@beisen-platform/search

## Dependencies (3)

- [@beisen-platform/common-func](https://npm.io/package/@beisen-platform/common-func.md)
- [@beisen-platform/react-icons](https://npm.io/package/@beisen-platform/react-icons.md)
- [@beisen/es6-promise-debounce](https://npm.io/package/@beisen/es6-promise-debounce.md)

## Recent versions

- 1.0.17-rc.2 (latest) — 2019-06-03
- 1.0.17-rc.1 — 2019-04-29
- 1.0.17 — 2019-04-16
- 1.0.16 — 2019-03-26
- 1.0.15 — 2019-03-15
- 1.0.14 — 2019-02-01
- 1.0.13 — 2019-02-01
- 1.0.12 — 2019-02-01
- 1.0.11 — 2019-01-31
- 1.0.10 — 2019-01-25
- 1.0.9 — 2018-11-28

## README

# Search使用说明

## 项目运行

1. cnpm install 或 npm install cnpm使用教程

2. npm run dev （开发环境打包 port:8080）

3. npm run test （测试用例）

4. npm run build （生产环境打包）

## Search参数

```javascript
const props = {
  /**
   * 没有值的时候显示的内容
   */
  placeholder: '搜索',

  /**
   * 文字前面的图标IconName
   */
  iconName: 'sys-icon-sousuo',

  /**
   * 搜索框中的默认值
   */
  value: '111',

  /**
   * 初始状态时是否激活
   */
  active: false,

  /**
   * 设置隐藏
   */
  hidden: false,

  /**
   * 设置只读
   */
  readonly: false,

  /**
   * 不可用状态
   */
  disabled: false,

  /**
   * 只读
   */
  readonly:false,

  /**
   * 使用input的placeholder
   * 将placeholder传给原生<input>元素
   * 值为true时原生<input>和Search组件的包装都有placeholder，
   * 否则只有Search组件的包装有placeholder
   */
  useInputPlaceHolder:false,

  /**
   * 支持的事件
   */
  onClick: function (val) { console.log(val) },
  onBlur: function (val) { console.log(val) },
  onFocus: function (val) { console.log(val) },
  onChange: function (val) { console.log(val) },
  onKeyDown: function (val) { console.log(val) }
}

```


## Search调用方法

1.安装npm组件包

```
npm install @beisen/search --save-dev
```

2.引用组件

  ```javascript
import Search from "@beisen/search"
  ```
3. 传入参数

  该参数为上述参数，传入方式使用: data={参数}

  ```javascript
  state= {
    SearchData :{
      "placeholder":"搜索"        /**没有值的时候显示的内容(string)**/
      ,"iconName":"icon-sousuo"     /**IconName 文字前面的图标**/
      ,"value":""  //搜索框中的默认值
      ,"active":true //input框激活
      ,"hidden":false             //隐藏搜索框
      ,"readonly":false           //搜索框只读
      ,"disabled":false           //搜索框禁用
      ,"onClick":function(val){console.log(val)}
      ,"onBlur":function(val){console.log(val)}
      ,"onFocus":function(val){console.log(val)}
      ,"onChange":function(val){console.log(val)}
    }
  }
  render () {
      return (
        <Search {...this.state.SearchData} />
      )
    }
  ```

---
_Source: https://npm.io/package/@beisen-platform/search · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
