Merge branch 'master' of github.com:ant-design/ant-design

This commit is contained in:
偏右 2016-02-23 00:09:44 +08:00
commit 3cf6696dad
56 changed files with 260 additions and 212 deletions

View File

@ -7,9 +7,12 @@
"jest": true, "jest": true,
"es6": true "es6": true
}, },
"ecmaFeatures": { "parserOptions": {
"jsx": true, "ecmaVersion": 6,
"experimentalObjectRestSpread": true "ecmaFeatures": {
"jsx": true,
"experimentalObjectRestSpread": true
}
}, },
"plugins": [ "plugins": [
"markdown", "markdown",
@ -28,6 +31,8 @@
"react/jsx-closing-bracket-location": 0, "react/jsx-closing-bracket-location": 0,
"react/jsx-no-bind": 0, "react/jsx-no-bind": 0,
"no-param-reassign": 0, "no-param-reassign": 0,
"max-len": 0 "no-return-assign": 0,
"max-len": 0,
"consistent-return": 0
} }
} }

View File

@ -4,6 +4,18 @@
--- ---
## 0.12.4
`2016-02-22`
- Radio 的 value 支持更多类型。[#1043](https://github.com/ant-design/ant-design/pull/1043)
- 修复 Spin 组件的大小、居中等样式问题。
- FormItem 补充 extra 属性的文档。[#931](https://github.com/ant-design/ant-design/issues/931)
- 修复的 Table 下树形数据和选择框配合时的样式问题。
- 修复一个水平表单的错误提示的样式错位问题。[#1040](https://github.com/ant-design/ant-design/issues/1040)
- 改进 Input disabled 的样式。
- 添加了一个轻微的 Button 点击动效。
## 0.12.3 ## 0.12.3
`2016-02-19` `2016-02-19`

View File

@ -4,10 +4,6 @@ import ScrollNumber from './ScrollNumber';
import classNames from 'classnames'; import classNames from 'classnames';
class AntBadge extends React.Component { class AntBadge extends React.Component {
constructor(props) {
super(props);
}
render() { render() {
let { count, prefixCls, overflowCount, className, style, children } = this.props; let { count, prefixCls, overflowCount, className, style, children } = this.props;
const dot = this.props.dot; const dot = this.props.dot;

View File

@ -30,9 +30,17 @@ export default class Button extends React.Component {
window.PIE.attach(findDOMNode(this)); window.PIE.attach(findDOMNode(this));
} }
} }
handleClick(...args) {
const buttonNode = findDOMNode(this);
buttonNode.className = buttonNode.className.replace(`${prefix}clicked`, '');
setTimeout(() => {
buttonNode.className += ` ${prefix}clicked`;
}, 10);
this.props.onClick(...args);
}
render() { render() {
const props = this.props; const props = this.props;
const { type, shape, size, onClick, className, htmlType, children, ...others } = props; const { type, shape, size, className, htmlType, children, ...others } = props;
// large => lg // large => lg
// small => sm // small => sm
@ -53,7 +61,7 @@ export default class Button extends React.Component {
const kids = React.Children.map(children, insertSpace); const kids = React.Children.map(children, insertSpace);
return ( return (
<button {...others} type={htmlType || 'button'} className={classes} onClick={onClick}> <button {...others} type={htmlType || 'button'} className={classes} onClick={this.handleClick.bind(this)}>
{kids} {kids}
</button> </button>
); );

View File

@ -15,6 +15,6 @@ function onPanelChange(value, mode) {
} }
ReactDOM.render( ReactDOM.render(
<Calendar onPanelChange={onPanelChange} locale={enUS}/> <Calendar onPanelChange={onPanelChange} locale={enUS} />
, mountNode); , mountNode);
```` ````

View File

@ -92,7 +92,7 @@ class Calendar extends Component {
locale={locale.lang} locale={locale.lang}
prefixCls={prefixCls} prefixCls={prefixCls}
onTypeChange={this.setType.bind(this)} onTypeChange={this.setType.bind(this)}
onValueChange={this.setValue.bind(this)}/> onValueChange={this.setValue.bind(this)} />
<FullCalendar <FullCalendar
{...props} {...props}
Select={noop} Select={noop}

View File

@ -16,10 +16,14 @@ export default React.createClass({
onChange: React.PropTypes.func, onChange: React.PropTypes.func,
}, },
getInitialState() { getInitialState() {
const { value, defaultValue } = this.props; const props = this.props;
return { let value;
value: value || defaultValue, if ('value' in props) {
}; value = props.value;
} else if ('defaultValue' in props) {
value = props.defaultValue;
}
return { value };
}, },
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
if ('value' in nextProps) { if ('value' in nextProps) {

View File

@ -2,7 +2,7 @@
- order: 3 - order: 3
方便的生成一个 Checkbox 组。 方便的从数组生成 Checkbox 组。若需要 label 和 value 分离请直接使用 Checkbox。
--- ---

View File

@ -18,13 +18,13 @@ const text = `
ReactDOM.render( ReactDOM.render(
<Collapse accordion> <Collapse accordion>
<Panel header={`This is panel header 1`} key="1"> <Panel header={'This is panel header 1'} key="1">
<p>{text}</p> <p>{text}</p>
</Panel> </Panel>
<Panel header={`This is panel header 2`} key="2"> <Panel header={'This is panel header 2'} key="2">
<p>{text}</p> <p>{text}</p>
</Panel> </Panel>
<Panel header={`This is panel header 3`} key="3"> <Panel header={'This is panel header 3'} key="3">
<p>{text}</p> <p>{text}</p>
</Panel> </Panel>
</Collapse> </Collapse>

View File

@ -22,17 +22,17 @@ const text = `
ReactDOM.render( ReactDOM.render(
<Collapse onChange={callback} accordion> <Collapse onChange={callback} accordion>
<Panel header={`This is panel header 1`} key="1"> <Panel header={'This is panel header 1'} key="1">
<Collapse defaultActiveKey="1"> <Collapse defaultActiveKey="1">
<Panel header={`This is panel nest panel`} key="1"> <Panel header={'This is panel nest panel'} key="1">
<p>{text}</p> <p>{text}</p>
</Panel> </Panel>
</Collapse> </Collapse>
</Panel> </Panel>
<Panel header={`This is panel header 2`} key="2"> <Panel header={'This is panel header 2'} key="2">
<p>{text}</p> <p>{text}</p>
</Panel> </Panel>
<Panel header={`This is panel header 3`} key="3"> <Panel header={'This is panel header 3'} key="3">
<p>{text}</p> <p>{text}</p>
</Panel> </Panel>
</Collapse> </Collapse>

View File

@ -74,7 +74,7 @@ export default React.createClass({
timePicker = (<TimePicker timePicker = (<TimePicker
prefixCls="ant-time-picker" prefixCls="ant-time-picker"
placeholder={locale.lang.timePlaceholder} placeholder={locale.lang.timePlaceholder}
transitionName="slide-up"/>); transitionName="slide-up" />);
} }
const calendarClassName = classNames({ const calendarClassName = classNames({
@ -151,15 +151,15 @@ export default React.createClass({
onChange={this.handleInputChange} onChange={this.handleInputChange}
value={start && this.getFormatter().format(start)} value={start && this.getFormatter().format(start)}
placeholder={startPlaceholder} placeholder={startPlaceholder}
className="ant-calendar-range-picker-input"/> className="ant-calendar-range-picker-input" />
<span className="ant-calendar-range-picker-separator"> ~ </span> <span className="ant-calendar-range-picker-separator"> ~ </span>
<input <input
disabled={disabled} disabled={disabled}
onChange={this.handleInputChange} onChange={this.handleInputChange}
value={end && this.getFormatter().format(end)} value={end && this.getFormatter().format(end)}
placeholder={endPlaceholder} placeholder={endPlaceholder}
className="ant-calendar-range-picker-input"/> className="ant-calendar-range-picker-input" />
<span className="ant-calendar-picker-icon"/> <span className="ant-calendar-picker-icon" />
</span> </span>
); );
} }

View File

@ -61,7 +61,7 @@ function createPicker(TheCalendar, defaultFormat) {
const timePicker = this.props.showTime ? (<TimePicker const timePicker = this.props.showTime ? (<TimePicker
prefixCls="ant-time-picker" prefixCls="ant-time-picker"
placeholder={locale.lang.timePlaceholder} placeholder={locale.lang.timePlaceholder}
transitionName="slide-up"/>) transitionName="slide-up" />)
: null; : null;
const disabledTime = this.props.showTime ? this.props.disabledTime : null; const disabledTime = this.props.showTime ? this.props.disabledTime : null;
@ -139,8 +139,8 @@ function createPicker(TheCalendar, defaultFormat) {
value={value && this.getFormatter().format(value)} value={value && this.getFormatter().format(value)}
placeholder={placeholder} placeholder={placeholder}
style={this.props.style} style={this.props.style}
className={`ant-calendar-picker-input ant-input${sizeClass}`}/> className={`ant-calendar-picker-input ant-input${sizeClass}`} />
<span className="ant-calendar-picker-icon"/> <span className="ant-calendar-picker-icon" />
</span> </span>
); );
} }

View File

@ -17,7 +17,7 @@ const menu = (
<Menu.Item key="1"> <Menu.Item key="1">
<a target="_blank" href="http://www.taobao.com/">第二个菜单项</a> <a target="_blank" href="http://www.taobao.com/">第二个菜单项</a>
</Menu.Item> </Menu.Item>
<Menu.Divider/> <Menu.Divider />
<Menu.Item key="3" disabled>第三个菜单项(不可用)</Menu.Item> <Menu.Item key="3" disabled>第三个菜单项(不可用)</Menu.Item>
</Menu> </Menu>
); );

View File

@ -17,7 +17,7 @@ const menu = (
<Menu.Item key="1"> <Menu.Item key="1">
<a href="http://www.taobao.com/">第二个菜单项</a> <a href="http://www.taobao.com/">第二个菜单项</a>
</Menu.Item> </Menu.Item>
<Menu.Divider/> <Menu.Divider />
<Menu.Item key="3">第三个菜单项</Menu.Item> <Menu.Item key="3">第三个菜单项</Menu.Item>
</Menu> </Menu>
); );

View File

@ -58,6 +58,8 @@ class FormItem extends React.Component {
} else if (getFieldValue(field) !== undefined) { } else if (getFieldValue(field) !== undefined) {
return 'success'; return 'success';
} }
return '';
} }
renderValidateWrapper(c1, c2, c3) { renderValidateWrapper(c1, c2, c3) {

View File

@ -1,14 +1,3 @@
function merge() {
const ret = {};
const args = [].slice.call(arguments, 0);
args.forEach((a) => {
Object.keys(a).forEach((k) => {
ret[k] = a[k];
});
});
return ret;
}
const ValueMixin = { const ValueMixin = {
setValue(field, e) { setValue(field, e) {
let v = e; let v = e;
@ -24,7 +13,10 @@ const ValueMixin = {
const newFormData = {}; const newFormData = {};
newFormData[field] = v; newFormData[field] = v;
this.setState({ this.setState({
formData: merge(this.state.formData, newFormData), formData: {
...this.state.formData,
...newFormData,
},
}); });
}, },
}; };

View File

@ -1,50 +0,0 @@
# 禁用状态
- order: 7
1) 单独为输入控件设置 `disabled` 属性;
2) 为 `<fieldset>` 设置 `disabled` 属性,可以禁用 `<fieldset>` 中包含的所有控件。
---
````jsx
import { Row, Col, Button, Input, Form } from 'antd';
const FormItem = Form.Item;
ReactDOM.render(
<Form horizontal>
<FormItem
label="单独禁用输入框:"
labelCol={{ span: 5 }}
wrapperCol={{ span: 12 }}>
<Input defaultValue="我是禁用的" disabled />
</FormItem>
<fieldset disabled>
<legend>禁用的 fieldset</legend>
<FormItem
id="userName"
label="用户名:"
labelCol={{ span: 5 }}
wrapperCol={{ span: 12 }}
required>
<p className="ant-form-text">大眼萌 minion</p>
</FormItem>
<FormItem
id="password"
label="密码:"
labelCol={{ span: 5 }}
wrapperCol={{ span: 12 }}
required>
<Input type="password" defaultValue="123456" id="password" />
</FormItem>
<Row>
<Col span="12" offset="5">
<Button htmlType="submit" type="primary">确定</Button>
</Col>
</Row>
</fieldset>
</Form>
, mountNode);
````

View File

@ -18,14 +18,14 @@ ReactDOM.render(
label="标签输入框:" label="标签输入框:"
labelCol={{ span: 6 }} labelCol={{ span: 6 }}
wrapperCol={{ span: 16 }}> wrapperCol={{ span: 16 }}>
<Input addonBefore="Http://" defaultValue="mysite.com" id="site1"/> <Input addonBefore="Http://" defaultValue="mysite.com" id="site1" />
</FormItem> </FormItem>
<FormItem <FormItem
label="标签输入框:" label="标签输入框:"
labelCol={{ span: 6 }} labelCol={{ span: 6 }}
wrapperCol={{ span: 16 }}> wrapperCol={{ span: 16 }}>
<Input addonBefore="Http://" addonAfter=".com" defaultValue="mysite" id="site2"/> <Input addonBefore="Http://" addonAfter=".com" defaultValue="mysite" id="site2" />
</FormItem> </FormItem>
<FormItem <FormItem

View File

@ -63,7 +63,7 @@ let Demo = React.createClass({
labelCol={{ span: 8 }} labelCol={{ span: 8 }}
wrapperCol={{ span: 10 }} wrapperCol={{ span: 10 }}
required> required>
<Slider marks={['A', 'B', 'C', 'D', 'E', 'F', 'G']} {...getFieldProps('slider')}/> <Slider marks={['A', 'B', 'C', 'D', 'E', 'F', 'G']} {...getFieldProps('slider')} />
</FormItem> </FormItem>
<FormItem <FormItem
@ -85,7 +85,7 @@ let Demo = React.createClass({
labelCol={{ span: 8 }} labelCol={{ span: 8 }}
required> required>
<Col span="6"> <Col span="6">
<DatePicker {...getFieldProps('startDate')}/> <DatePicker {...getFieldProps('startDate')} />
</Col> </Col>
<Col span="1"> <Col span="1">
<p className="ant-form-split">-</p> <p className="ant-form-split">-</p>
@ -100,7 +100,7 @@ let Demo = React.createClass({
labelCol={{ span: 8 }} labelCol={{ span: 8 }}
wrapperCol={{ span: 16 }} wrapperCol={{ span: 16 }}
required> required>
<TimePicker {...getFieldProps('time')}/> <TimePicker {...getFieldProps('time')} />
</FormItem> </FormItem>
<FormItem <FormItem

View File

@ -114,7 +114,7 @@ class BasicDemo extends React.Component {
], ],
trigger: ['onBlur', 'onChange'], trigger: ['onBlur', 'onChange'],
}] }]
})}/> })} />
</FormItem> </FormItem>
<FormItem <FormItem
@ -129,7 +129,7 @@ class BasicDemo extends React.Component {
{ validator: this.checkPass.bind(this) }, { validator: this.checkPass.bind(this) },
], ],
})} })}
onContextMenu={noop} onPaste={noop} onCopy={noop} onCut={noop}/> onContextMenu={noop} onPaste={noop} onCopy={noop} onCut={noop} />
</FormItem> </FormItem>
<FormItem <FormItem
@ -147,7 +147,7 @@ class BasicDemo extends React.Component {
}, { }, {
validator: this.checkPass2.bind(this), validator: this.checkPass2.bind(this),
}], }],
})}/> })} />
</FormItem> </FormItem>
<FormItem <FormItem
@ -159,7 +159,7 @@ class BasicDemo extends React.Component {
rules: [ rules: [
{ required: true, message: '真的不打算写点什么吗?' }, { required: true, message: '真的不打算写点什么吗?' },
], ],
})}/> })} />
</FormItem> </FormItem>
<FormItem wrapperCol={{ span: 12, offset: 7 }} > <FormItem wrapperCol={{ span: 12, offset: 7 }} >

View File

@ -101,6 +101,7 @@ CustomizedForm = Form.create({})(CustomizedForm);
| labelCol | label 标签布局,通 `<Col>` 组件,设置 `span` `offset` 值,如 `{span: 3, offset: 12}` | object | | | | labelCol | label 标签布局,通 `<Col>` 组件,设置 `span` `offset` 值,如 `{span: 3, offset: 12}` | object | | |
| wrapperCol | 需要为输入控件设置布局样式时,使用该属性,用法同 labelCol | object | | | | wrapperCol | 需要为输入控件设置布局样式时,使用该属性,用法同 labelCol | object | | |
| help | 提示信息,如不设置,则会根据校验规则自动生成 | string | | | | help | 提示信息,如不设置,则会根据校验规则自动生成 | string | | |
| extra | 额外的提示信息,和 help 类似,当需要错误信息和提示文案同时出现时,可以使用这个。 | string | | |
| required | 是否必填,如不设置,则会根据校验规则自动生成 | bool | | false | | required | 是否必填,如不设置,则会根据校验规则自动生成 | bool | | false |
| validateStatus | 校验状态,如不设置,则会根据校验规则自动生成 | string | 'success' 'warning' 'error' 'validating' | | | validateStatus | 校验状态,如不设置,则会根据校验规则自动生成 | string | 'success' 'warning' 'error' 'validating' | |
| hasFeedback | 配合 validateStatus 属性使用,是否展示校验状态图标 | bool | | false | | hasFeedback | 配合 validateStatus 属性使用,是否展示校验状态图标 | bool | | false |

View File

@ -99,7 +99,7 @@ class Input extends React.Component {
); );
default: default:
inputClassName = props.className ? props.className : inputClassName; inputClassName = props.className ? props.className : inputClassName;
return <input {...props} placeholder={placeholder} className={inputClassName} ref="input"/>; return <input {...props} placeholder={placeholder} className={inputClassName} ref="input" />;
} }
} }

View File

@ -55,5 +55,5 @@ const Test = React.createClass({
} }
}); });
ReactDOM.render(<Test/>, mountNode); ReactDOM.render(<Test />, mountNode);
```` ````

View File

@ -56,5 +56,5 @@ const Test = React.createClass({
} }
}); });
ReactDOM.render(<Test/>, mountNode); ReactDOM.render(<Test />, mountNode);
```` ````

View File

@ -38,7 +38,7 @@ const Test = React.createClass({
<div className="ant-form-item" key="password"> <div className="ant-form-item" key="password">
<label htmlFor="password" className="col-6" required>密码:</label> <label htmlFor="password" className="col-6" required>密码:</label>
<div className="col-14"> <div className="col-14">
<input className="ant-input" type="password" id="password" placeholder="请输入密码"/> <input className="ant-input" type="password" id="password" placeholder="请输入密码" />
</div> </div>
</div>, </div>,
<div className="ant-form-item ant-form-item-compact" key="sex"> <div className="ant-form-item ant-form-item-compact" key="sex">

View File

@ -29,7 +29,7 @@ const App = React.createClass({
</Menu.Item> </Menu.Item>
</Menu> </Menu>
<QueueAnim type={['right', 'left']} className="demo-router-wrap"> <QueueAnim type={['right', 'left']} className="demo-router-wrap">
{React.cloneElement(this.props.children || <Home/>, { key })} {React.cloneElement(this.props.children || <Home />, { key })}
</QueueAnim> </QueueAnim>
</div> </div>
); );

View File

@ -13,11 +13,11 @@ const RadioGroup = Radio.Group;
const App = React.createClass({ const App = React.createClass({
getInitialState() { getInitialState() {
return { return {
value: 'a' value: 1
}; };
}, },
onChange(e) { onChange(e) {
console.log(`radio checked:${e.target.value}`); console.log('radio checked', e.target.value);
this.setState({ this.setState({
value: e.target.value value: e.target.value
}); });
@ -26,12 +26,11 @@ const App = React.createClass({
return ( return (
<div> <div>
<RadioGroup onChange={this.onChange} value={this.state.value}> <RadioGroup onChange={this.onChange} value={this.state.value}>
<Radio value="a">A</Radio> <Radio key="a" value={1}>A</Radio>
<Radio value="b">B</Radio> <Radio key="b" value={2}>B</Radio>
<Radio value="c">C</Radio> <Radio key="c" value={3}>C</Radio>
<Radio value="d">D</Radio> <Radio key="d" value={null}>D</Radio>
</RadioGroup> </RadioGroup>
<div style={{ marginTop: 20 }}>你选中的: {this.state.value}</div>
</div> </div>
); );
} }

View File

@ -1,13 +1,15 @@
import React from 'react'; import React from 'react';
function getCheckedValue(children) { function getCheckedValue(children) {
let checkedValue = null; let value = null;
let matched = false;
React.Children.forEach(children, (radio) => { React.Children.forEach(children, (radio) => {
if (radio.props && radio.props.checked) { if (radio.props && radio.props.checked) {
checkedValue = radio.props.value; value = radio.props.value;
matched = true;
} }
}); });
return checkedValue; return matched ? { value } : undefined;
} }
export default React.createClass({ export default React.createClass({
@ -16,34 +18,56 @@ export default React.createClass({
prefixCls: 'ant-radio-group', prefixCls: 'ant-radio-group',
disabled: false, disabled: false,
onChange() { onChange() {
} },
}; };
}, },
getInitialState() { getInitialState() {
let props = this.props; let props = this.props;
let value;
if ('value' in props) {
value = props.value;
} else if ('defaultValue' in props) {
value = props.defaultValue;
} else {
const checkedValue = getCheckedValue(props.children);
value = checkedValue && checkedValue.value;
}
return { return {
value: props.value || props.defaultValue || getCheckedValue(props.children) value,
}; };
}, },
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
if ('value' in nextProps || getCheckedValue(nextProps.children)) { if ('value' in nextProps) {
this.setState({ this.setState({
value: nextProps.value || getCheckedValue(nextProps.children) value: nextProps.value,
}); });
} else {
const checkedValue = getCheckedValue(nextProps.children);
if (checkedValue) {
this.setState({
value: checkedValue.value,
});
}
} }
}, },
onRadioChange(ev) { onRadioChange(ev) {
this.setState({ if (!('value' in this.props)) {
value: ev.target.value this.setState({
}); value: ev.target.value,
});
}
this.props.onChange(ev); this.props.onChange(ev);
}, },
render() { render() {
const props = this.props; const props = this.props;
const children = React.Children.map(props.children, (radio) => { const children = React.Children.map(props.children, (radio) => {
if (radio.props) { if (radio.props) {
const keyProps = {};
if (!('key' in radio) && typeof radio.props.value === 'string') {
keyProps.key = radio.props.value;
}
return React.cloneElement(radio, { return React.cloneElement(radio, {
key: radio.props.value, ...keyProps,
...radio.props, ...radio.props,
onChange: this.onRadioChange, onChange: this.onRadioChange,
checked: this.state.value === radio.props.value, checked: this.state.value === radio.props.value,

View File

@ -78,7 +78,7 @@ const data = [{
}]; }];
ReactDOM.render( ReactDOM.render(
<Table columns={columns} dataSource={data} indentSize={30} />, <Table columns={columns} dataSource={data} indentSize={20} />,
mountNode mountNode
); );
```` ````

View File

@ -59,9 +59,7 @@ let FilterMenu = React.createClass({
const keyPathOfSelectedItem = this.state.keyPathOfSelectedItem; const keyPathOfSelectedItem = this.state.keyPathOfSelectedItem;
const containSelected = Object.keys(keyPathOfSelectedItem).some(key => { const containSelected = Object.keys(keyPathOfSelectedItem).some(key => {
const keyPath = keyPathOfSelectedItem[key]; const keyPath = keyPathOfSelectedItem[key];
if (keyPath.indexOf(item.value) >= 0) { return keyPath.indexOf(item.value) >= 0;
return true;
}
}); });
const subMenuCls = containSelected ? 'ant-dropdown-submenu-contain-selected' : ''; const subMenuCls = containSelected ? 'ant-dropdown-submenu-contain-selected' : '';
return ( return (

View File

@ -134,8 +134,8 @@ let AntTable = React.createClass({
} }
} }
if (typeof column.sorter === 'function') { if (typeof column.sorter === 'function') {
sorter = function () { sorter = function (...args) {
let result = column.sorter.apply(this, arguments); let result = column.sorter.apply(this, args);
if (sortOrder === 'ascend') { if (sortOrder === 'ascend') {
return result; return result;
} else if (sortOrder === 'descend') { } else if (sortOrder === 'descend') {
@ -296,7 +296,7 @@ let AntTable = React.createClass({
return ( return (
<Radio disabled={props.disabled} <Radio disabled={props.disabled}
onChange={this.handleRadioSelect.bind(this, record, rowIndex)} onChange={this.handleRadioSelect.bind(this, record, rowIndex)}
value={rowIndex} checked={checked}/> value={rowIndex} checked={checked} />
); );
}, },
@ -315,7 +315,7 @@ let AntTable = React.createClass({
} }
return ( return (
<Checkbox checked={checked} disabled={props.disabled} <Checkbox checked={checked} disabled={props.disabled}
onChange={this.handleSelect.bind(this, record, rowIndex)}/> onChange={this.handleSelect.bind(this, record, rowIndex)} />
); );
}, },
@ -408,7 +408,7 @@ let AntTable = React.createClass({
filterDropdown = ( filterDropdown = (
<FilterDropdown locale={locale} column={column} <FilterDropdown locale={locale} column={column}
selectedKeys={colFilters} selectedKeys={colFilters}
confirmFilter={this.handleFilter}/> confirmFilter={this.handleFilter} />
); );
} }
if (column.sorter) { if (column.sorter) {
@ -427,12 +427,12 @@ let AntTable = React.createClass({
<span className={`ant-table-column-sorter-up ${isAscend ? 'on' : 'off'}`} <span className={`ant-table-column-sorter-up ${isAscend ? 'on' : 'off'}`}
title="↑" title="↑"
onClick={this.toggleSortOrder.bind(this, 'ascend', column)}> onClick={this.toggleSortOrder.bind(this, 'ascend', column)}>
<Icon type="caret-up"/> <Icon type="caret-up" />
</span> </span>
<span className={`ant-table-column-sorter-down ${isDescend ? 'on' : 'off'}`} <span className={`ant-table-column-sorter-down ${isDescend ? 'on' : 'off'}`}
title="↓" title="↓"
onClick={this.toggleSortOrder.bind(this, 'descend', column)}> onClick={this.toggleSortOrder.bind(this, 'descend', column)}>
<Icon type="caret-down"/> <Icon type="caret-down" />
</span> </span>
</div> </div>
); );
@ -517,10 +517,7 @@ let AntTable = React.createClass({
// //
if (data.length > pageSize || pageSize === Number.MAX_VALUE) { if (data.length > pageSize || pageSize === Number.MAX_VALUE) {
data = data.filter((item, i) => { data = data.filter((item, i) => {
if (i >= (current - 1) * pageSize && return i >= (current - 1) * pageSize && i < current * pageSize;
i < current * pageSize) {
return item;
}
}); });
} }
return data; return data;
@ -575,7 +572,7 @@ let AntTable = React.createClass({
if (!data || data.length === 0) { if (!data || data.length === 0) {
emptyText = ( emptyText = (
<div className="ant-table-placeholder"> <div className="ant-table-placeholder">
<Icon type="frown"/>{locale.emptyText} <Icon type="frown" />{locale.emptyText}
</div> </div>
); );
emptyClass = ' ant-table-empty'; emptyClass = ' ant-table-empty';
@ -587,6 +584,7 @@ let AntTable = React.createClass({
data={data} data={data}
columns={columns} columns={columns}
className={classString} className={classString}
expandIconColumnIndex={columns[0].key === 'selection-column' ? 1 : 0}
expandIconAsCell={expandIconAsCell} /> expandIconAsCell={expandIconAsCell} />
{emptyText} {emptyText}
</div> </div>

View File

@ -29,7 +29,7 @@ class AntTabs extends React.Component {
let { prefixCls, size, tabPosition, animation, type, let { prefixCls, size, tabPosition, animation, type,
children, tabBarExtraContent } = this.props; children, tabBarExtraContent } = this.props;
let className = classNames({ let className = classNames({
[this.props.className]: !!this. props.className, [this.props.className]: !!this.props.className,
[`${prefixCls}-mini`]: size === 'small' || size === 'mini', [`${prefixCls}-mini`]: size === 'small' || size === 'mini',
[`${prefixCls}-vertical`]: tabPosition === 'left' || tabPosition === 'right', [`${prefixCls}-vertical`]: tabPosition === 'left' || tabPosition === 'right',
[`${prefixCls}-card`]: type.indexOf('card') >= 0, [`${prefixCls}-card`]: type.indexOf('card') >= 0,

View File

@ -8,7 +8,6 @@
````jsx ````jsx
import { Transfer, Button } from 'antd'; import { Transfer, Button } from 'antd';
const container = mountNode;
const App = React.createClass({ const App = React.createClass({
getInitialState() { getInitialState() {
@ -66,5 +65,5 @@ const App = React.createClass({
} }
}); });
ReactDOM.render(<App />, container); ReactDOM.render(<App />, mountNode);
```` ````

View File

@ -33,6 +33,7 @@ class Transfer extends Component {
leftDataSource.splice(index, 1); leftDataSource.splice(index, 1);
return true; return true;
} }
return false;
})[0]); })[0]);
}); });
} }
@ -181,14 +182,14 @@ class Transfer extends Component {
searchPlaceholder={searchPlaceholder} searchPlaceholder={searchPlaceholder}
body={body} body={body}
footer={footer} footer={footer}
prefixCls={`${prefixCls}-list`}/> prefixCls={`${prefixCls}-list`} />
<Operation rightActive={rightActive} <Operation rightActive={rightActive}
rightArrowText={operations[0]} rightArrowText={operations[0]}
moveToRight={this.moveTo.bind(this, 'right')} moveToRight={this.moveTo.bind(this, 'right')}
leftActive={leftActive} leftActive={leftActive}
leftArrowText={operations[1]} leftArrowText={operations[1]}
moveToLeft={this.moveTo.bind(this, 'left')} moveToLeft={this.moveTo.bind(this, 'left')}
className={`${prefixCls}-operation`}/> className={`${prefixCls}-operation`} />
<List titleText={titles[1]} <List titleText={titles[1]}
dataSource={rightDataSource} dataSource={rightDataSource}
filter={rightFilter} filter={rightFilter}
@ -205,7 +206,7 @@ class Transfer extends Component {
searchPlaceholder={searchPlaceholder} searchPlaceholder={searchPlaceholder}
body={body} body={body}
footer={footer} footer={footer}
prefixCls={`${prefixCls}-list`}/> prefixCls={`${prefixCls}-list`} />
</div> </div>
); );
} }

View File

@ -81,21 +81,19 @@ class TransferList extends Component {
[`${prefixCls}-with-footer`]: !!footerDom, [`${prefixCls}-with-footer`]: !!footerDom,
}); });
const showItems = dataSource.map((item) => { const showItems = dataSource.filter((item) => {
// apply filter
const itemText = this.props.render(item); const itemText = this.props.render(item);
const filterResult = this.matchFilter(itemText, filter); const filterResult = this.matchFilter(itemText, filter);
return !!filterResult;
}).map((item) => {
const renderedText = this.props.render(item); const renderedText = this.props.render(item);
return (
if (filterResult) { <li onClick={this.handleSelect.bind(this, item)} key={item.key} title={renderedText}>
return ( <Checkbox checked={checkedKeys.some(key => key === item.key)} />
<li onClick={this.handleSelect.bind(this, item)} key={item.key} title={renderedText}> {renderedText}
<Checkbox checked={checkedKeys.some(key => key === item.key)} /> </li>
{renderedText} );
</li> });
);
}
}).filter(item => !!item);
return ( return (
<div className={listCls} {...this.props}> <div className={listCls} {...this.props}>
@ -104,7 +102,7 @@ class TransferList extends Component {
prefixCls: 'ant-transfer', prefixCls: 'ant-transfer',
checked: checkStatus === 'all', checked: checkStatus === 'all',
checkPart: checkStatus === 'part', checkPart: checkStatus === 'part',
checkable: <span className={`ant-transfer-checkbox-inner`}></span> checkable: <span className={'ant-transfer-checkbox-inner'}></span>
})}<span className={`${prefixCls}-header-selected`}><span>{(checkedKeys.length > 0 ? `${checkedKeys.length}/` : '') + dataSource.length} </span> })}<span className={`${prefixCls}-header-selected`}><span>{(checkedKeys.length > 0 ? `${checkedKeys.length}/` : '') + dataSource.length} </span>
<span className={`${prefixCls}-header-title`}>{titleText}</span></span> <span className={`${prefixCls}-header-title`}>{titleText}</span></span>
</div> </div>

View File

@ -4,10 +4,6 @@ function noop() {
} }
class Search extends Component { class Search extends Component {
constructor(props) {
super(props);
}
handleChange(e) { handleChange(e) {
this.props.onChange(e); this.props.onChange(e);
} }
@ -22,7 +18,7 @@ class Search extends Component {
return ( return (
<div> <div>
<input placeholder={placeholder} className={ `${prefixCls} ant-input` } value={ value } ref="input" <input placeholder={placeholder} className={ `${prefixCls} ant-input` } value={ value } ref="input"
onChange={this.handleChange.bind(this)}/> onChange={this.handleChange.bind(this)} />
{ value && value.length > 0 ? { value && value.length > 0 ?
<a href="#" className={ `${prefixCls}-action` } onClick={this.handleClear.bind(this)}> <a href="#" className={ `${prefixCls}-action` } onClick={this.handleClear.bind(this)}>
<Icon type="cross-circle" /> <Icon type="cross-circle" />

View File

@ -22,7 +22,7 @@ const Demo = React.createClass({
}, },
render() { render() {
return ( return (
<TreeSelect style={{ width: 360 }} <TreeSelect style={{ width: 300 }}
value={this.state.value} value={this.state.value}
dropdownMenuStyle={{ maxHeight: 400, overflow: 'auto' }} dropdownMenuStyle={{ maxHeight: 400, overflow: 'auto' }}
placeholder="请选择" placeholder="请选择"

View File

@ -54,9 +54,10 @@ const Demo = React.createClass({
onChange: this.onChange, onChange: this.onChange,
multiple: true, multiple: true,
treeCheckable: true, treeCheckable: true,
searchPlaceholder: '请选择',
treeDefaultExpandAll: true, treeDefaultExpandAll: true,
style: { style: {
width: 360, width: 300,
}, },
}; };
return <TreeSelect {...tProps} />; return <TreeSelect {...tProps} />;

View File

@ -40,7 +40,7 @@ const Demo = React.createClass({
}, },
render() { render() {
return ( return (
<TreeSelect style={{ width: 360 }} <TreeSelect style={{ width: 300 }}
value={this.state.value} value={this.state.value}
dropdownMenuStyle={{ maxHeight: 400, overflow: 'auto' }} dropdownMenuStyle={{ maxHeight: 400, overflow: 'auto' }}
treeData={treeData} treeData={treeData}

View File

@ -117,7 +117,7 @@ const Demo = React.createClass({
</TreeNode> </TreeNode>
); );
} }
return <TreeNode key={item.key} title={item.key}/>; return <TreeNode key={item.key} title={item.key} />;
}); });
return ( return (
<Tree checkable multiple={this.props.multiple} defaultExpandAll <Tree checkable multiple={this.props.multiple} defaultExpandAll

View File

@ -28,7 +28,7 @@ ReactDOM.render(
<div className="ant-upload-text">上传照片</div> <div className="ant-upload-text">上传照片</div>
</Upload> </Upload>
<a href="https://os.alipayobjects.com/rmsportal/NDbkJhpzmLxtPhB.png" target="_blank" className="upload-example"> <a href="https://os.alipayobjects.com/rmsportal/NDbkJhpzmLxtPhB.png" target="_blank" className="upload-example">
<img src="https://os.alipayobjects.com/rmsportal/NDbkJhpzmLxtPhB.png"/> <img src="https://os.alipayobjects.com/rmsportal/NDbkJhpzmLxtPhB.png" />
<span>示例</span> <span>示例</span>
</a> </a>
</div> </div>

View File

@ -235,7 +235,7 @@ const AntUpload = React.createClass({
uploadList = ( uploadList = (
<UploadList listType={this.props.listType} <UploadList listType={this.props.listType}
items={this.state.fileList} items={this.state.fileList}
onRemove={this.handleManualRemove}/> onRemove={this.handleManualRemove} />
); );
} }
if (type === 'drag') { if (type === 'drag') {
@ -292,7 +292,7 @@ const AntUpload = React.createClass({
AntUpload.Dragger = React.createClass({ AntUpload.Dragger = React.createClass({
render() { render() {
return <AntUpload {...this.props} type="drag" style={{ height: this.props.height }}/>; return <AntUpload {...this.props} type="drag" style={{ height: this.props.height }} />;
} }
}); });

View File

@ -102,7 +102,7 @@ Ant Design React 支持所有的现代浏览器和 IE8+。
<style> <style>
.code-line-highlight { .code-line-highlight {
box-shadow: 0px 190px 0px rgba(255, 207, 0, 0.16); box-shadow: 0px 195px 0px rgba(255, 207, 0, 0.16);
height: 42px; height: 42px;
margin-top: -42px; margin-top: -42px;
position: relative; position: relative;

View File

@ -1,6 +1,6 @@
{ {
"name": "antd", "name": "antd",
"version": "0.12.3", "version": "0.12.4",
"title": "Ant Design", "title": "Ant Design",
"description": "一个 UI 设计语言", "description": "一个 UI 设计语言",
"homepage": "http://ant.design/", "homepage": "http://ant.design/",
@ -41,7 +41,7 @@
"rc-animate": "~2.0.2", "rc-animate": "~2.0.2",
"rc-calendar": "~5.4.0", "rc-calendar": "~5.4.0",
"rc-cascader": "~0.9.0", "rc-cascader": "~0.9.0",
"rc-checkbox": "~1.2.0", "rc-checkbox": "~1.3.0",
"rc-collapse": "~1.4.4", "rc-collapse": "~1.4.4",
"rc-dialog": "~5.3.1", "rc-dialog": "~5.3.1",
"rc-dropdown": "~1.4.3", "rc-dropdown": "~1.4.3",
@ -58,7 +58,7 @@
"rc-slider": "~3.3.0", "rc-slider": "~3.3.0",
"rc-steps": "~1.4.1", "rc-steps": "~1.4.1",
"rc-switch": "~1.3.2", "rc-switch": "~1.3.2",
"rc-table": "~3.9.0", "rc-table": "~3.10.1",
"rc-tabs": "~5.7.0", "rc-tabs": "~5.7.0",
"rc-time-picker": "~1.1.0", "rc-time-picker": "~1.1.0",
"rc-tooltip": "~3.3.1", "rc-tooltip": "~3.3.1",
@ -86,12 +86,12 @@
"css-loader": "^0.23.0", "css-loader": "^0.23.0",
"cz-conventional-changelog": "^1.1.5", "cz-conventional-changelog": "^1.1.5",
"es3ify-loader": "^0.1.0", "es3ify-loader": "^0.1.0",
"eslint": "^1.1.0", "eslint": "^2.2.0",
"eslint-config-airbnb": "latest", "eslint-config-airbnb": "^6.0.1",
"eslint-plugin-babel": "^3.0.0", "eslint-plugin-babel": "^3.0.0",
"eslint-plugin-markdown": "*", "eslint-plugin-markdown": "*",
"eslint-plugin-react": "^3.3.1", "eslint-plugin-react": "^4.0.0",
"eslint-tinker": "~0.2.0", "eslint-tinker": "^0.3.1",
"extract-text-webpack-plugin": "^1.0.1", "extract-text-webpack-plugin": "^1.0.1",
"gh-pages": "^0.9.0", "gh-pages": "^0.9.0",
"history": "^1.17.0", "history": "^1.17.0",
@ -130,7 +130,7 @@
"just-deploy": "npm run site && node scripts/deploy.js", "just-deploy": "npm run site && node scripts/deploy.js",
"lint": "npm run srclint && npm run mdlint && npm run lesshint", "lint": "npm run srclint && npm run mdlint && npm run lesshint",
"srclint": "eslint components test index.js --ext '.js,.jsx'", "srclint": "eslint components test index.js --ext '.js,.jsx'",
"mdlint": "eslint components/*/demo/*.md --ext '.md' --global 'React,ReactDOM,mountNode' --rule 'no-console: 0,eol-last: 0'", "mdlint": "eslint components/*/demo/*.md --ext '.md' --global 'React,ReactDOM,mountNode' --rule 'no-console: 0, eol-last: 0, prefer-rest-params: 0'",
"lesshint": "lesshint style/ -e 'style/+(core|mixins)/+(base|iconfont|normalize|layouts|compatibility|grid).less'", "lesshint": "lesshint style/ -e 'style/+(core|mixins)/+(base|iconfont|normalize|layouts|compatibility|grid).less'",
"eslint-fix": "eslint --fix components test index.js --ext '.js,.jsx' && eslint-tinker ./components/*/demo/*.md", "eslint-fix": "eslint --fix components test index.js --ext '.js,.jsx' && eslint-tinker ./components/*/demo/*.md",
"test": "npm run lint && webpack && npm run jest", "test": "npm run lint && webpack && npm run jest",

View File

@ -361,7 +361,6 @@ footer ul li > h2 {
} }
footer ul li > div { footer ul li > div {
text-align: left;
margin: auto; margin: auto;
margin: 10px 0; margin: 10px 0;
} }
@ -1541,6 +1540,10 @@ a.entry-link:hover .anticon-smile {
padding-right: 30px; padding-right: 30px;
} }
.prev-next-nav {
padding-left: 0;
}
footer { footer {
text-align: center; text-align: center;
} }

View File

@ -51,6 +51,6 @@ pre code {
border: 1px solid #e9e9e9; border: 1px solid #e9e9e9;
padding: 10px 15px; padding: 10px 15px;
border-radius: 6px; border-radius: 6px;
font-size: 0.9rem; font-size: 14px;
white-space: pre; white-space: pre;
} }

View File

@ -97,4 +97,26 @@
> span + .@{iconfont-css-prefix} { > span + .@{iconfont-css-prefix} {
margin-left: 0.5em; margin-left: 0.5em;
} }
&-clicked:before {
content: '';
position: absolute;
top: -6px;
left: -6px;
bottom: -6px;
right: -6px;
border-radius: inherit;
z-index: -1;
background: inherit;
opacity: 1;
transform: scale3d(0.5, 0.5, 1);
animation: buttonEffect 0.48s ease forwards;
}
}
@keyframes buttonEffect {
to {
opacity: 0;
transform: scale3d(1, 1, 1);
}
} }

View File

@ -268,6 +268,11 @@ form {
.has-feedback { .has-feedback {
display: inline-block; display: inline-block;
} }
// Fix https://github.com/ant-design/ant-design/issues/1040
.@{css-prefix}form-explain {
position: absolute;
}
} }
.@{css-prefix}form-horizontal, .@{css-prefix}form-horizontal,

View File

@ -6,6 +6,7 @@
z-index: 1050; z-index: 1050;
width: 100%; width: 100%;
top: 16px; top: 16px;
left: 0;
&-notice { &-notice {
width: auto; width: auto;

View File

@ -10,12 +10,13 @@
.@{spin-prefix-cls} { .@{spin-prefix-cls} {
color: @primary-color; color: @primary-color;
display: inline-block; display: inline-block;
font-size: @spin-dot-size; vertical-align: middle;
text-align: center; text-align: center;
opacity: 0; opacity: 0;
position: absolute; position: absolute;
visibility: hidden; visibility: hidden;
transition: opacity 0.3s @ease-in-out-circ; transition: opacity 0.3s @ease-in-out-circ;
font-size: @font-size-base;
&-spining { &-spining {
opacity: 1; opacity: 1;
@ -30,10 +31,12 @@
&-nested-loading & { &-nested-loading & {
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; height: 20px;
margin-top: -0.75em; line-height: 20px;
margin-left: -2.5em; margin-top: -10px;
z-index: 4; z-index: 4;
text-align: center;
width: 100%;
} }
&-container { &-container {
@ -42,6 +45,7 @@
&-nested-loading > &-container { &-nested-loading > &-container {
opacity: 0.7; opacity: 0.7;
-webkit-filter: blur(1px);
filter: blur(1px); filter: blur(1px);
filter: ~"progid\:DXImageTransform\.Microsoft\.Blur(PixelRadius\=1, MakeShadow\=false)"; /* IE6~IE9 */ filter: ~"progid\:DXImageTransform\.Microsoft\.Blur(PixelRadius\=1, MakeShadow\=false)"; /* IE6~IE9 */
pointer-events: none; pointer-events: none;
@ -52,30 +56,38 @@
&-dot { &-dot {
.animation(antSpinPulse 1.2s infinite @ease-in-out-circ); .animation(antSpinPulse 1.2s infinite @ease-in-out-circ);
.square(1em); .square(@spin-dot-size);
border-radius: 50%; border-radius: 50%;
display: inline-block; display: inline-block;
background-color: @primary-color; background-color: @primary-color;
} }
&-dot-second { &-dot-second {
.animation-delay(200ms); .animation-delay(200ms);
margin-left: 1em;
} }
&-dot-third { &-dot-third {
.animation-delay(400ms); .animation-delay(400ms);
margin-left: 1em; }
&-dot + &-dot {
margin-left: @spin-dot-size;
} }
// Sizes // Sizes
// ------------------------------ // ------------------------------
// small // small
&-sm { &-sm &-dot {
font-size: @spin-dot-size-sm; .square(@spin-dot-size-sm);
+ & {
margin-left: @spin-dot-size-sm;
}
} }
// large // large
&-lg { &-lg &-dot {
font-size: @spin-dot-size-lg; .square(@spin-dot-size-lg);
+ & {
margin-left: @spin-dot-size-lg;
}
} }
} }

View File

@ -318,6 +318,15 @@
content: '.'; content: '.';
} }
} }
// Hide selection component in children data
&[class*="@{table-prefix-cls}-row-level-"] .@{table-prefix-cls}-selection-column > span {
display: none;
}
&[class*="@{table-prefix-cls}-row-level-0"] .@{table-prefix-cls}-selection-column > span {
display: inline-block;
}
} }
tr&-expanded-row { tr&-expanded-row {
&, &,

View File

@ -231,12 +231,21 @@
.@{tree-select-prefix-cls}-selection--multiple { .@{tree-select-prefix-cls}-selection--multiple {
min-height: 32px; min-height: 32px;
.@{tree-select-prefix-cls}-search__field__placeholder {
left: 10px;
margin-top: 4px;
font-size: 14px;
line-height: 24px;
height: 24px;
}
.@{tree-select-prefix-cls}-selection__rendered { .@{tree-select-prefix-cls}-selection__rendered {
li { li {
height: 24px; height: 22px;
.@{tree-select-prefix-cls}-selection__choice__content { .@{tree-select-prefix-cls}-selection__choice__content {
font-size: 14px; font-size: 14px;
line-height: 24px; line-height: 22px;
} }
} }
} }
@ -259,7 +268,8 @@
li { li {
height: 14px; height: 14px;
.@{tree-select-prefix-cls}-selection__choice__content { .@{tree-select-prefix-cls}-selection__choice__content {
line-height: 14px; line-height: 10px;
font-size: 8px;
position: relative; position: relative;
top: -3px; top: -3px;
} }
@ -315,8 +325,10 @@
cursor: text; cursor: text;
.@{tree-select-prefix-cls}-search__field__placeholder { .@{tree-select-prefix-cls}-search__field__placeholder {
top: 6px;
left: 10px; left: 10px;
margin-top: 4px;
height: 20px;
line-height: 20px;
} }
.@{tree-select-prefix-cls}-search--inline { .@{tree-select-prefix-cls}-search--inline {

View File

@ -250,8 +250,8 @@
.@{btnClassName}:not(:first-child):not(:last-child) { .@{btnClassName}:not(:first-child):not(:last-child) {
border-radius: 0; border-radius: 0;
padding-left: 7px; padding-left: 8px;
padding-right: 7px; padding-right: 8px;
} }
> .@{btnClassName}:first-child { > .@{btnClassName}:first-child {
@ -259,14 +259,14 @@
&:not(:last-child) { &:not(:last-child) {
border-bottom-right-radius: 0; border-bottom-right-radius: 0;
border-top-right-radius: 0; border-top-right-radius: 0;
padding-right: 7px; padding-right: 8px;
} }
} }
> .@{btnClassName}:last-child:not(:first-child) { > .@{btnClassName}:last-child:not(:first-child) {
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
border-top-left-radius: 0; border-top-left-radius: 0;
padding-left: 7px; padding-left: 8px;
} }
& > & { & > & {
@ -281,13 +281,13 @@
> .@{btnClassName}:last-child { > .@{btnClassName}:last-child {
border-bottom-right-radius: 0; border-bottom-right-radius: 0;
border-top-right-radius: 0; border-top-right-radius: 0;
padding-right: 7px; padding-right: 8px;
} }
} }
& > &:last-child:not(:first-child) > .@{btnClassName}:first-child { & > &:last-child:not(:first-child) > .@{btnClassName}:first-child {
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
border-top-left-radius: 0; border-top-left-radius: 0;
padding-left: 7px; padding-left: 8px;
} }
} }

View File

@ -10,7 +10,6 @@
.make-row(@gutter: @grid-gutter-width) { .make-row(@gutter: @grid-gutter-width) {
position: relative; position: relative;
width: 100%;
margin-left: (@gutter / -2); margin-left: (@gutter / -2);
margin-right: (@gutter / -2); margin-right: (@gutter / -2);
height: auto; height: auto;
@ -69,4 +68,4 @@
.make-grid() { .make-grid() {
.loop-grid-columns(@grid-columns); .loop-grid-columns(@grid-columns);
} }

View File

@ -27,6 +27,7 @@
background-color: @input-disabled-bg; background-color: @input-disabled-bg;
opacity: 1; opacity: 1;
cursor: @cursor-disabled; cursor: @cursor-disabled;
color: #ccc;
&:hover { &:hover {
.hover(@input-border-color); .hover(@input-border-color);
} }

View File

@ -67,13 +67,13 @@
@btn-ghost-border : @border-color-base; @btn-ghost-border : @border-color-base;
@btn-disable-color : #ccc; @btn-disable-color : #ccc;
@btn-disable-bg : #f3f5f7; @btn-disable-bg : #f4f4f4;
@btn-disable-border : @border-color-base; @btn-disable-border : @border-color-base;
@btn-padding-base : 4px 11px; @btn-padding-base : 4px 15px;
@btn-font-size-lg : 14px; @btn-font-size-lg : 14px;
@btn-padding-lg : 4px 11px 5px 11px; @btn-padding-lg : 4px 15px 5px 15px;
@btn-padding-sm : 1px 7px; @btn-padding-sm : 1px 7px;
@ -136,6 +136,6 @@
@input-hover-border-color : @primary-color; @input-hover-border-color : @primary-color;
@input-focus-border-color : @primary-color; @input-focus-border-color : @primary-color;
@input-disabled-bg : #f3f5f7; @input-disabled-bg : #f4f4f4;
@form-item-margin-bottom : 24px; @form-item-margin-bottom : 24px;