From b72d18fd4404a14e1be0ec3451e201437233166f Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Thu, 7 Jan 2016 17:46:46 +0800 Subject: [PATCH] style: update code style to please the fucking lint --- components/alert/index.jsx | 28 +++---- components/date-picker/RangePicker.jsx | 14 ++-- components/date-picker/index.jsx | 28 +++---- components/input/index.jsx | 19 +++-- components/layout/col.jsx | 2 +- components/layout/row.jsx | 2 +- components/menu/index.jsx | 20 ++--- components/message/index.jsx | 28 +++---- components/modal/confirm.jsx | 6 +- components/modal/index.jsx | 33 +++++--- components/notification/index.jsx | 36 ++++----- components/pagination/index.jsx | 6 +- components/popconfirm/index.jsx | 16 ++-- components/popover/index.jsx | 8 +- components/progress/index.jsx | 20 ++--- components/radio/group.jsx | 18 ++--- components/slider/index.jsx | 2 +- components/steps/index.jsx | 10 +-- components/table/filterDropdown.jsx | 29 ++++--- components/table/index.jsx | 69 +++++++++-------- components/tabs/index.jsx | 8 +- components/tag/index.jsx | 23 +++--- components/timeline/index.jsx | 6 +- components/tooltip/index.jsx | 2 +- components/transfer/index.jsx | 102 +++++++++++++------------ components/transfer/list.jsx | 36 ++++++--- components/transfer/search.jsx | 10 ++- components/upload/index.jsx | 10 +-- components/upload/uploadList.jsx | 8 +- index.js | 8 +- 30 files changed, 330 insertions(+), 277 deletions(-) diff --git a/components/alert/index.jsx b/components/alert/index.jsx index a5cf1fa569..91c0f8ad23 100644 --- a/components/alert/index.jsx +++ b/components/alert/index.jsx @@ -44,20 +44,20 @@ export default React.createClass({ let iconType = ''; switch (type) { - case 'success': - iconType = 'check-circle'; - break; - case 'info': - iconType = 'info-circle'; - break; - case 'error': - iconType = 'exclamation-circle'; - break; - case 'warn': - iconType = 'exclamation-circle'; - break; - default: - iconType = 'default'; + case 'success': + iconType = 'check-circle'; + break; + case 'info': + iconType = 'info-circle'; + break; + case 'error': + iconType = 'exclamation-circle'; + break; + case 'warn': + iconType = 'exclamation-circle'; + break; + default: + iconType = 'default'; } // use outline icon in alert with description diff --git a/components/date-picker/RangePicker.jsx b/components/date-picker/RangePicker.jsx index 6bda6ffc0e..34fc598891 100644 --- a/components/date-picker/RangePicker.jsx +++ b/components/date-picker/RangePicker.jsx @@ -78,13 +78,13 @@ export default React.createClass({ const calendar = ( + className={calendarClassName} + timePicker={timePicker} + disabledDate={disabledDate} + dateInputPlaceholder={[startPlaceholder, endPlaceholder]} + locale={locale.lang} + defaultValue={defaultCalendarValue} + showClear /> ); const pickerClass = classNames({ diff --git a/components/date-picker/index.jsx b/components/date-picker/index.jsx index 091e6c25f2..ad3d3af2b5 100644 --- a/components/date-picker/index.jsx +++ b/components/date-picker/index.jsx @@ -94,25 +94,25 @@ function createPicker(TheCalendar, defaultFormat) { return ( + disabled={this.props.disabled} + calendar={calendar} + value={this.state.value} + prefixCls="ant-calendar-picker-container" + style={this.props.popupStyle} + align={this.props.align} + onOpen={this.toggleOpen} + onClose={this.toggleOpen} + onChange={this.handleChange}> { ({ value }) => { return ( + onChange={this.handleInputChange} + value={value && this.getFormatter().format(value)} + placeholder={placeholder} + style={this.props.style} + className={'ant-calendar-picker-input ant-input' + sizeClass}/> ); diff --git a/components/input/index.jsx b/components/input/index.jsx index c699680d74..9bb54870bd 100644 --- a/components/input/index.jsx +++ b/components/input/index.jsx @@ -72,9 +72,9 @@ class Input extends React.Component { } switch (props.size) { - case 'small': inputClassName = prefixClsFn(prefixCls, 'input', 'input-sm'); break; - case 'large': inputClassName = prefixClsFn(prefixCls, 'input', 'input-lg'); break; - default: + case 'small': inputClassName = prefixClsFn(prefixCls, 'input', 'input-sm'); break; + case 'large': inputClassName = prefixClsFn(prefixCls, 'input', 'input-lg'); break; + default: } let placeholder = props.placeholder; if (placeholder && ieGT9()) { @@ -84,11 +84,14 @@ class Input extends React.Component { props.value = fixControlledValue(props.value); } switch (props.type) { - case 'textarea': - return