mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-13 07:39:10 +08:00
50 lines
826 B
Markdown
50 lines
826 B
Markdown
|
---
|
||
|
order: 999
|
||
|
title:
|
||
|
zh-CN: _InternalPanelDoNotUseOrYouWillBeFired
|
||
|
en-US: _InternalPanelDoNotUseOrYouWillBeFired
|
||
|
debug: true
|
||
|
---
|
||
|
|
||
|
## zh-CN
|
||
|
|
||
|
调试用组件,请勿直接使用。
|
||
|
|
||
|
## en-US
|
||
|
|
||
|
Debug usage. Do not use in your production.
|
||
|
|
||
|
```tsx
|
||
|
import { TreeSelect } from 'antd';
|
||
|
import React from 'react';
|
||
|
|
||
|
const { _InternalPanelDoNotUseOrYouWillBeFired: InternalTreeSelect } = TreeSelect;
|
||
|
|
||
|
const treeData = [
|
||
|
{
|
||
|
title: 'Node1',
|
||
|
value: '0-0',
|
||
|
children: [
|
||
|
{
|
||
|
title: 'Child Node1',
|
||
|
value: '0-0-1',
|
||
|
},
|
||
|
{
|
||
|
title: 'Child Node2',
|
||
|
value: '0-0-2',
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
{
|
||
|
title: 'Node2',
|
||
|
value: '0-1',
|
||
|
},
|
||
|
];
|
||
|
|
||
|
const App: React.FC = () => (
|
||
|
<InternalTreeSelect defaultValue="lucy" style={{ width: '100%' }} treeData={treeData} />
|
||
|
);
|
||
|
|
||
|
export default App;
|
||
|
```
|