mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 13:47:02 +08:00
Merge branch 'develop-1.0.0' of github.com:ant-design/ant-design into develop-1.0.0
This commit is contained in:
commit
52d5026229
@ -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);
|
||||
````
|
||||
|
@ -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 {
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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)} />
|
||||
|
Loading…
Reference in New Issue
Block a user