Merge branch 'develop-1.0.0' of github.com:ant-design/ant-design into develop-1.0.0

This commit is contained in:
afc163 2016-04-26 14:54:54 +08:00
commit 52d5026229
5 changed files with 10 additions and 23 deletions

View File

@ -9,16 +9,11 @@ title: 国际化
import { DatePicker } from 'antd';
import enUS from 'antd/lib/date-picker/locale/en_US';
const App = React.createClass({
render() {
const customLocale = {
timezoneOffset: 0 * 60,
firstDayOfWeek: 0,
minimalDaysInFirstWeek: 1,
};
return <DatePicker locale={{ ...enUS, ...customLocale }} />;
}
});
const customLocale = {
timezoneOffset: 0 * 60,
firstDayOfWeek: 0,
minimalDaysInFirstWeek: 1,
};
ReactDOM.render(<App />, mountNode);
ReactDOM.render(<DatePicker locale={{ ...enUS, ...customLocale }} />, mountNode);
````

View File

@ -2,9 +2,7 @@ import React from 'react';
import classNames from 'classnames';
function prefixClsFn(prefixCls, ...args) {
return args.map((s) => {
return `${prefixCls}-${s}`;
}).join(' ');
return args.map((s) => `${prefixCls}-${s}`).join(' ');
}
export default class FormItem extends React.Component {

View File

@ -289,9 +289,7 @@ export default class Table extends React.Component {
if (checked) {
selectedRowKeys.push(this.getRecordKey(record, rowIndex));
} else {
selectedRowKeys = selectedRowKeys.filter((i) => {
return key !== i;
});
selectedRowKeys = selectedRowKeys.filter((i) => key !== i);
}
this.setState({
selectionDirty: true,

View File

@ -117,9 +117,7 @@ export default class MainContent extends React.Component {
}
if (Array.isArray(menu)) {
return menu.reduce((acc, item) => {
return acc.concat(this.flattenMenu(item));
}, []);
return menu.reduce((acc, item) => acc.concat(this.flattenMenu(item)), []);
}
return this.flattenMenu(menu.props.children);

View File

@ -51,9 +51,7 @@ export function generateContainer(data) {
export function generateIndex(data) {
const menuItems = getMenuItems(data);
const firstChild = menuItems.topLevel.topLevel.filter((item) => {
return !item.disabled;
})[0];
const firstChild = menuItems.topLevel.topLevel.filter((item) => !item.disabled)[0];
return (
<IndexRedirect key="index"
to={fileNameToPath(firstChild.fileName)} />