3.16.0 • Published 8 months ago

towlang-rc-cascader v3.16.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

rc-cascader

React Cascader Component

NPM version npm download build status Codecov bundle size dumi

Browser Support

IE / EdgeFirefoxChromeSafariElectron
IE11, Edgelast 2 versionslast 2 versionslast 2 versionslast 2 versions

Screenshots

Example

http://react-component.github.io/cascader/

Install

rc-cascader

$ npm install rc-cascader --save

Usage

import React from 'react';
import Cascader from 'rc-cascader';

const options = [{
  'label': '福建',
  'value': 'fj',
  'children': [{
    'label': '福州',
    'value': 'fuzhou',
    'children': [{
      'label': '马尾',
      'value': 'mawei',
    }],
  }, {
    'label': '泉州',
    'value': 'quanzhou',
  }],
}, {
  'label': '浙江',
  'value': 'zj',
  'children': [{
    'label': '杭州',
    'value': 'hangzhou',
    'children': [{
      'label': '余杭',
      'value': 'yuhang',
    }],
  }],
}, {
  'label': '北京',
  'value': 'bj',
  'children': [{
    'label': '朝阳区',
    'value': 'chaoyang',
  }, {
    'label': '海淀区',
    'value': 'haidian',
  }],
}];

React.render(
  <Cascader options={options}>
    ...
  </Cascader>
, container);

API

props

option

Development

$ npm install
$ npm start

Test Case

$ npm test

Coverage

$ npm run coverage

License

rc-cascader is released under the MIT license.