;
+ );
}
dateCellRender(value) {
const prefixCls = this.props.prefixCls;
- return
-
- {zerofixed(value.getDayOfMonth())}
-
-
- {this.props.dateCellRender(value)}
+ return (
+
+
+ {zerofixed(value.getDayOfMonth())}
+
+
+ {this.props.dateCellRender(value)}
+
-
;
+ );
}
setValue(value) {
if (!('value' in this.props) && this.state.value !== value) {
diff --git a/components/checkbox/Group.jsx b/components/checkbox/Group.jsx
index 50cbd9229f1dfa153042b6962b6a42fe003c7589..b0e795c7d4426997213a99e5faa844a7ae352627 100644
--- a/components/checkbox/Group.jsx
+++ b/components/checkbox/Group.jsx
@@ -42,17 +42,19 @@ export default React.createClass({
},
render() {
const options = this.props.options;
- return
- {
- options.map(option =>
-
- )
- }
-
;
+ return (
+
+ {
+ options.map(option =>
+
+ )
+ }
+
+ );
},
});
diff --git a/components/date-picker/RangePicker.jsx b/components/date-picker/RangePicker.jsx
index e5aaa57414f5575b84f9e6b1d9f626d6a0d79354..6bda6ffc0ea10b12195328b26a86a37247296341 100644
--- a/components/date-picker/RangePicker.jsx
+++ b/components/date-picker/RangePicker.jsx
@@ -76,14 +76,16 @@ export default React.createClass({
['ant-calendar-time']: this.props.showTime,
});
- const calendar =
;
+ const calendar = (
+
+ );
const pickerClass = classNames({
'ant-calendar-picker': true,
diff --git a/components/date-picker/index.jsx b/components/date-picker/index.jsx
index beea4abec2359e35111b9e8a3797a0c9ac6ea327..091e6c25f29596b13e42f0e22861f4976872f80a 100644
--- a/components/date-picker/index.jsx
+++ b/components/date-picker/index.jsx
@@ -91,35 +91,36 @@ function createPicker(TheCalendar, defaultFormat) {
pickerClass += ' ant-calendar-picker-open';
}
- return
-
- {
- ({ value }) => {
- return (
-
-
-
-
- );
+ return (
+
+
+ {
+ ({ value }) => {
+ return (
+
+
+
+
+ );
+ }
}
- }
-
- ;
+
+
+ );
}
});
}
diff --git a/components/dropdown/dropdown-button.jsx b/components/dropdown/dropdown-button.jsx
index a986201455dbc95a16d71bfd68791659cf65c862..df05003e2c08ecee926aaf0bdb56cbfb965f414d 100644
--- a/components/dropdown/dropdown-button.jsx
+++ b/components/dropdown/dropdown-button.jsx
@@ -22,15 +22,17 @@ export default React.createClass({
};
},
render() {
- return
-
-
+ return (
+
-
- ;
+
+
+
+
+ );
}
});
diff --git a/components/form/FormItem.jsx b/components/form/FormItem.jsx
index 8c9e9ea08fbf9f2fb2ef7d00642770d39cd5f2e2..7fc94a47c41429a57a9151a443723a4fe2a146a7 100644
--- a/components/form/FormItem.jsx
+++ b/components/form/FormItem.jsx
@@ -85,10 +85,8 @@ class FormItem extends React.Component {
const compactControls = ['checkbox', 'radio', 'radio-group', 'static', 'file'];
let isCompact = false;
- if (!Array.isArray(children)) {
- children = [children];
- }
- children.map((child) => {
+ const childrenArray = Array.isArray(children) ? children : [children];
+ childrenArray.map((child) => {
const type = child.props && child.props.type;
let prefixCls = child.props && child.props.prefixCls;
prefixCls = prefixCls ? prefixCls.substring(prefixCls.indexOf('-') + 1) : '';
diff --git a/components/input/index.jsx b/components/input/index.jsx
index a1385db08960342b8e855d0722bba4c9951f4b8f..c699680d74a22b1f0e14382b9c3b9ce63a44c09d 100644
--- a/components/input/index.jsx
+++ b/components/input/index.jsx
@@ -72,12 +72,12 @@ 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()){
+ if (placeholder && ieGT9()) {
placeholder = null;
}
if ('value' in props) {
diff --git a/components/modal/confirm.jsx b/components/modal/confirm.jsx
index 9b8eb43d4625a218e84a1e683057cc1087431a59..21b9356407f93fbb729dd262a76776adf3d16a3e 100644
--- a/components/modal/confirm.jsx
+++ b/components/modal/confirm.jsx
@@ -4,12 +4,11 @@ import Dialog from './index';
import Icon from '../icon';
import Button from '../button';
-export default function (props) {
+export default function (props = {}) {
let div = document.createElement('div');
document.body.appendChild(div);
let d;
- props = props || {};
props.iconClassName = props.iconClassName || 'question-circle';
let iconClassType = props.iconClassName;
@@ -72,28 +71,34 @@ export default function (props) {
}
}
- let body =
-
-
{props.title}
-
{props.content}
-
;
+ let body = (
+
+
+
{props.title}
+
{props.content}
+
+ );
let footer = null;
if (props.okCancel) {
- footer =
-
-
-
;
+ footer = (
+
+
+
+
+ );
} else {
- footer =
-
-
;
+ footer = (
+
+
+
+ );
}
ReactDOM.render(