React Mobile Cascader Component (web and react-native)


npm i
npm starthttp://localhost:8000/examples/
online example: http://react-component.github.io/m-cascader/
npm run rn-init
npm run watch-tsc
react-native start
react-native run-ios| name | description | type | default |
|---|---|---|---|
| className(web) | additional css class of root dom node | String | '' |
| prefixCls(web) | prefix class | String | 'rmc-cascader' |
| pickerPrefixCls(web) | picker prefix class | String | 'rmc-picker' |
| pickerItemStyle | picker item style | {} | |
| data | The data of cascade | array | |
| value | selected value | array | |
| defaultValue | initial selected value | array | |
| onChange | Function(value) | - |
| name | description | type | default |
|---|---|---|---|
| className(web) | additional css class of modal node | String | '' |
| prefixCls(web) | prefix class | String | 'rmc-picker-popup' |
| style(web) | additional style | object | {} |
| value | selected value | array | |
| cascader | React Cascader element | ||
| onChange | exec on ok | Function(value) | |
| onDismiss | exec on dismiss | function | |
| okText | ok button text | String | 'Ok' |
| dismissText | dismiss button text | String | 'Dismiss' |
| title | Popup title | String | '' |
| visible | whether pop picker is visible | Boolean | |
| onVisibleChange | called when pop picker visible change | Function |
npm test
npm run chrome-testnpm run coverageopen coverage/ dir
rmc-cascader is released under the MIT license.