const Component = () => {
const [value, setValue] = useState(['0-0-0']);
const tProps = {
treeData,
treeNodeFilterProp="title" // title或value, 添加搜索功能一般用title
maxTagCount="responsive" // 最多显示多少个 tag
value,
treeCheckable: true,//显示勾选框
showCheckedStrategy: TreeSelect.SHOW_ALL,//显示父子节点
// showCheckedStrategy: TreeSelect.SHOW_PARENT,显示父节点
// showCheckedStrategy: TreeSelect.SHOW_CHILD,显示子节点
};
return <TreeSelect {...tProps} />;
};
TreeSelect
于 2023-04-10 20:17:22 首次发布