rc-tree 在反应时不显示导航箭头(+,-)
rc-tree not showing navigation arrows(+,-) on react
我尝试在 React 中实现简单的 rc-tree 组件,但它没有显示我可以展开的“+”按钮,它只显示根父名称。
这是我创建的沙箱 link https://codesandbox.io/s/flamboyant-stonebraker-ythlr?file=/src/App.js
示例代码
<Tree
defaultExpandAll={false}
style={{ border: "1px solid #000" }}
treeData={[
{
key: "0",
title: "node 0",
children: [
{
key: "0-2",
title: "node 0-2",
children: [
{ key: "0-2-0", title: "node 0-2-0" },
{ key: "0-2-1", title: "node 0-2-1" }
]
},
{ key: "0-4", title: "node 0-4" }
]
},
{
key: "1",
title: "node 1",
children: [
{
key: "1-0",
title: "node 1-0",
children: []
}
]
}
]}
/>
我尝试在 React 中实现简单的 rc-tree 组件,但它没有显示我可以展开的“+”按钮,它只显示根父名称。
这是我创建的沙箱 link https://codesandbox.io/s/flamboyant-stonebraker-ythlr?file=/src/App.js
示例代码
<Tree
defaultExpandAll={false}
style={{ border: "1px solid #000" }}
treeData={[
{
key: "0",
title: "node 0",
children: [
{
key: "0-2",
title: "node 0-2",
children: [
{ key: "0-2-0", title: "node 0-2-0" },
{ key: "0-2-1", title: "node 0-2-1" }
]
},
{ key: "0-4", title: "node 0-4" }
]
},
{
key: "1",
title: "node 1",
children: [
{
key: "1-0",
title: "node 1-0",
children: []
}
]
}
]}
/>