https://github.com/future-team/eg-multicheck
eagle-ui多选组件
https://github.com/future-team/eg-multicheck
eagle-ui
Last synced: 10 months ago
JSON representation
eagle-ui多选组件
- Host: GitHub
- URL: https://github.com/future-team/eg-multicheck
- Owner: future-team
- License: other
- Created: 2017-04-10T07:28:19.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-09-28T00:56:30.000Z (almost 6 years ago)
- Last Synced: 2025-08-09T05:24:43.679Z (11 months ago)
- Topics: eagle-ui
- Language: JavaScript
- Size: 479 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eg-multicheck
搭配 eagle-ui 使用的多选组件
## 参数说明
- `title`: 类型`String`,设置多选组的lebal显示的字
- `defaultChecked`: 类型`String`|`Array`,设置默认选中的选项,默认为空,可选值为字符串或者数组
- `checkCallback`: 类型`Function`,选中事件的回调,其回调的参数值为选中的value值
- `spacing`: 类型`Number`, 设置选项距离label的偏移量,如果不指定,则会根据label的宽度自动计算
## 使用
```bash
$ npm install eg-multicheck --save
```
```javascript
import React, { Component ,PropTypes} from 'react';
import ReactDom from 'react/lib/ReactDOM';
import {Input} from 'eagle-ui';
import EgMultiCheck from 'eg-multicheck'
class Demo extends Component {
constructor(props){
super(props)
}
multiCheck(values) {
console.log('multiCheck', values)
}
render(){
return (
)
}
}
```
详细的使用请参见[example](https://future-team.github.io/eg-multicheck/examples/index.html)
## ⚠️注意
若要结合`LabelGroup`一起使用,达到父子如下效果时,注意需要添加一个class名为`eg-multicheck-wrap`的标签包裹`EgMultiCheck`,具体场景请参见 [example](https://future-team.github.io/eg-multicheck/examples/index.html)
## Command
```
#测试
npm run test
#打包
npm run build
#例子演示
npm start
```