mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 03:29:59 +08:00
Fix feedback in form control, close #1619
This commit is contained in:
parent
98998984fe
commit
5bcb23dd27
@ -6,7 +6,6 @@
|
||||
.@{cascader-prefix-cls} {
|
||||
font-size: @font-size-base;
|
||||
&-input {
|
||||
width: 172px;
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
@ -7,12 +7,25 @@ title: 表单组合
|
||||
|
||||
````jsx
|
||||
import { Form, Select, InputNumber, DatePicker, TimePicker, Switch, Radio,
|
||||
Slider, Button, Col, Upload, Icon } from 'antd';
|
||||
Cascader, Slider, Button, Col, Upload, Icon } from 'antd';
|
||||
const FormItem = Form.Item;
|
||||
const Option = Select.Option;
|
||||
const RadioButton = Radio.Button;
|
||||
const RadioGroup = Radio.Group;
|
||||
|
||||
const areaData = [{
|
||||
value: 'shanghai',
|
||||
label: '上海',
|
||||
children: [{
|
||||
value: 'shanghaishi',
|
||||
label: '上海市',
|
||||
children: [{
|
||||
value: 'pudongxinqu',
|
||||
label: '浦东新区',
|
||||
}],
|
||||
}],
|
||||
}];
|
||||
|
||||
let Demo = React.createClass({
|
||||
handleSubmit(e) {
|
||||
e.preventDefault();
|
||||
@ -79,6 +92,15 @@ let Demo = React.createClass({
|
||||
</Select>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
label="级联选择:"
|
||||
labelCol={{ span: 8 }}
|
||||
wrapperCol={{ span: 16 }}
|
||||
required
|
||||
hasFeedback>
|
||||
<Cascader style={{ width: 200 }} options={areaData} {...getFieldProps('area')} />
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
label="DatePicker 日期选择框:"
|
||||
labelCol={{ span: 8 }}
|
||||
|
@ -27,11 +27,6 @@ label {
|
||||
color: @label-required-color;
|
||||
}
|
||||
|
||||
//== Input type: with extra icon
|
||||
.has-feedback {
|
||||
.input-with-icon();
|
||||
}
|
||||
|
||||
//== Style for input-group: input with label, with button or dropdown...
|
||||
.ant-input-group {
|
||||
.input-group(~"ant-input");
|
||||
@ -122,10 +117,6 @@ input[type="checkbox"] {
|
||||
// 表单下的输入框尺寸唯一: 大尺寸
|
||||
form {
|
||||
.has-feedback {
|
||||
.@{iconfont-css-prefix} {
|
||||
.square(@input-height-lg);
|
||||
line-height: @input-height-lg;
|
||||
}
|
||||
.ant-input {
|
||||
padding-right: 24px;
|
||||
}
|
||||
@ -176,7 +167,8 @@ form {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.ant-select {
|
||||
.ant-select,
|
||||
.ant-cascader-picker {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user