# mobile-multiple-select

> 一个基于react的移动端多选组件。

Latest version **1.0.9** (published 2019-06-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install mobile-multiple-select
pnpm add mobile-multiple-select
yarn add mobile-multiple-select
bun add mobile-multiple-select
```

## 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.9 |
| Published | 2019-06-27 |
| First published | 2019-02-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 23.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | skyfish |

## Links

- npm: https://www.npmjs.com/package/mobile-multiple-select
- Repository: https://github.com/yujiyuan/mobile-multiple-select
- Homepage: https://github.com/yujiyuan/mobile-multiple-select#readme
- Issues: https://github.com/yujiyuan/mobile-multiple-select/issues
- npm.io page: https://npm.io/package/mobile-multiple-select

## Dependencies (4)

- [scss](https://npm.io/package/scss.md) ^0.2.4
- [react](https://npm.io/package/react.md) ^16.8.4
- [react-dom](https://npm.io/package/react-dom.md) ^16.8.4
- [@babel/polyfill](https://npm.io/package/@babel/polyfill.md) ^7.2.5

## Recent versions

- 1.0.9 (latest) — 2019-06-27
- 1.0.8 — 2019-06-27
- 1.0.7 — 2019-03-15
- 1.0.6 — 2019-03-15
- 1.0.5 — 2019-03-13
- 1.0.4 — 2019-03-13
- 1.0.3 — 2019-03-13
- 1.0.2 — 2019-03-13
- 1.0.1 — 2019-02-27
- 1.0.0 — 2019-02-27

## README

# mobile-multiple-select

一个基于 react 的移动端多选组件。

## 引用

```javascript
const data = [
  { name: '樱花庄', code: 1 },
  { name: '有罪受', code: 2 },
  { name: '忽然', code: 3 },
  { name: '还给我', code: 4 }
]

class App extends Component {
  state = {
    val: []
  }
  handleChange = val => {
    console.log('val=====>', val)
    this.setState({ val })
  }
  render() {
    return (
      <MobileMultipleSelect
        data={data}
        label="人员名称"
        checkbox
        serviceData={['2', '3']}
        onChange={this.handleChange}
      />
    )
  }
}
```

## API

| 名称        | 类型     | 默认值 | 是否必填 | 注释                                             |
| ----------- | -------- | ------ | -------- | ------------------------------------------------ |
| data        | array    | []     | 是       | 多选列表的数据                                   |
| serviceData | array    | []     | 否       | 从后台返回的数据，一般用于设置默认选择值         |
| isRequired  | boolean  | true   | 否       | 是否显示必填的红色星号                           |
| label       | string   | ""     | 是       | 多选列表的文字                                   |
| checkbox    | boolean  | true   | 否       | 是否是 checkbok 类型                             |
| onChange    | function | ()=>{} | 是       | 点击 checkbox 时通过该方法将选中的值传回给使用者 |

## 注意事项

serviceData 数组里的值必须为字符串，否则无法正确设置默认值

---
_Source: https://npm.io/package/mobile-multiple-select · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
