ant-design/components/auto-complete/demo/form-debug.md
二货机器人 2ea28af6ed
Virtual select component (#18658)
* init

* fix firefox

* add active style

* adjust arrow style

* update select

* update icon logic

* render empty

* init multiple

* fix ff display style

* sync font size

* adjust padding style

* add padding

* padding it

* hotfix of chrome

* single sm

* multiple size

* update option group style

* update snapshot

* clean up transition

* rm combobox in ts define

* auto complete init

* fix auto option def

* update demo

* update demo

* update uncertain demo

* update demo

* warning if user set `size` on AutoComplete

* add debug demo

* updat demo

* update demo of disabled

* update snapshot

* rm useless test

* fix pagination test

* fix Table test

* fix calendar test case

* fix calendar test case

* adjust style

* add big data demo

* support clean up

* fix ts define

* fix lint

* fix demo lint

* fix style lint fix

* rm useless deps

* update snapshot

* stop mock

* add space
2019-09-12 20:15:17 +08:00

1.6 KiB

order title debug
999
zh-CN en-US
在 Form 中 Debug Debug in Form
true
import { Input, AutoComplete, Form, TreeSelect } from 'antd';
import { Search } from '@ant-design/icons';

const formItemLayout = {
  labelCol: {
    xs: { span: 24 },
    sm: { span: 8 },
  },
  wrapperCol: {
    xs: { span: 24 },
    sm: { span: 16 },
  },
};

ReactDOM.render(
  <Form style={{ margin: '0 auto' }}>
    <Form.Item label="单独 AutoComplete" {...formItemLayout}>
      <AutoComplete />
    </Form.Item>
    <Form.Item label="单独 TreeSelect" {...formItemLayout}>
      <TreeSelect />
    </Form.Item>
    <Form.Item label="添加 Input.Group 正常" {...formItemLayout}>
      <Input.Group compact>
        <TreeSelect style={{ width: '30%' }} />
        <AutoComplete />
      </Input.Group>
    </Form.Item>
    <Form.Item label="包含 search 图标正常" {...formItemLayout}>
      <AutoComplete>
        <Input suffix={<Search />} />
      </AutoComplete>
    </Form.Item>
    <Form.Item label="同时有 Input.Group 和图标发生移位" {...formItemLayout}>
      <Input.Group compact>
        <TreeSelect style={{ width: '30%' }} />
        <AutoComplete>
          <Input suffix={<Search />} />
        </AutoComplete>
      </Input.Group>
    </Form.Item>
    <Form.Item label="同时有 Input.Group 和 Search 组件发生移位" {...formItemLayout}>
      <Input.Group compact>
        <TreeSelect style={{ width: '30%' }} />
        <AutoComplete>
          <Input.Search />
        </AutoComplete>
      </Input.Group>
    </Form.Item>
  </Form>,
  mountNode,
);