check 树形控件,支持层级关系关联检查、受控与非受控设置、异步加载数据、自定义图标等。
npm install rsuite-check-tree --save
@import "~rsuite-check-tree/lib/less/index";
import CheckTree from 'rsuite-check-tree';
<CheckTree
defaultExpandAll
data={treeData}
height={300}
defaultValue={['Dave']}
onExpand={(activeNode, layer) => {
console.log(activeNode, layer);
}}
onChange={(activeNode, layer) => {
console.log(activeNode, layer);
}}
/>