--- order: 3 title: zh-CN: 输入框组合 en-US: Input Group --- ## zh-CN 输入框的组合展现。 注意:使用 `compact` 模式时,不需要通过 `Col` 来控制宽度。 ## en-US Input.Group example. Note: You don't need `Col` to control the width in the `compact` mode. ```tsx import { CopyOutlined } from '@ant-design/icons'; import { AutoComplete, Button, Cascader, Col, DatePicker, Input, InputNumber, Row, Select, Tooltip, } from 'antd'; import React from 'react'; const { Option } = Select; const options = [ { value: 'zhejiang', label: 'Zhejiang', children: [ { value: 'hangzhou', label: 'Hangzhou', children: [ { value: 'xihu', label: 'West Lake', }, ], }, ], }, { value: 'jiangsu', label: 'Jiangsu', children: [ { value: 'nanjing', label: 'Nanjing', children: [ { value: 'zhonghuamen', label: 'Zhong Hua Men', }, ], }, ], }, ]; const App: React.FC = () => (



); export default App; ``` ```css .site-input-group-wrapper .site-input-split { background-color: #fff !important; } .site-input-group-wrapper .site-input-right { border-left-width: 0; } .site-input-group-wrapper .site-input-right:hover, .site-input-group-wrapper .site-input-right:focus { border-left-width: 1px; } .site-input-group-wrapper .ant-input-rtl.site-input-right { border-right-width: 0; } .site-input-group-wrapper .ant-input-rtl.site-input-right:hover, .site-input-group-wrapper .ant-input-rtl.site-input-right:focus { border-right-width: 1px; } ```