mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-12 15:19:58 +08:00
46 lines
1012 B
Markdown
46 lines
1012 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 { AutoComplete, Switch, Space } from 'antd';
|
||
|
import React from 'react';
|
||
|
|
||
|
const { _InternalPanelDoNotUseOrYouWillBeFired: InternalAutoComplete } = AutoComplete;
|
||
|
|
||
|
const App: React.FC = () => {
|
||
|
const [open, setOpen] = React.useState(false);
|
||
|
|
||
|
return (
|
||
|
<Space direction="vertical" style={{ display: 'flex' }}>
|
||
|
<Switch checked={open} onChange={() => setOpen(!open)} />
|
||
|
<InternalAutoComplete
|
||
|
defaultValue="lucy"
|
||
|
style={{ width: 120 }}
|
||
|
open={open}
|
||
|
options={[
|
||
|
{ label: 'Jack', value: 'jack' },
|
||
|
{ label: 'Lucy', value: 'lucy' },
|
||
|
{ label: 'Disabled', value: 'disabled' },
|
||
|
{ label: 'Bamboo', value: 'bamboo' },
|
||
|
]}
|
||
|
/>
|
||
|
</Space>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default App;
|
||
|
```
|